How to Check Memory Usage in Linux based Server Come controllare utilizzo della memoria basato su Linux Server
Memory is one of the most critical resource components on a server to ensure that the smooth and fast operation. La memoria è uno dei più critica di risorse componenti su un server per garantire che il buon funzionamento e veloce. Thus, the availability of adequate and abundant physical memory size is vital especially for any server, especially high load web host that are also running database server such as Oracle or MySQL, which is famous for memory intensive. Quindi, la disponibilità di adeguati e abbondanti dimensioni della memoria fisica è di vitale importanza soprattutto per qualsiasi server, soprattutto ad alto carico host web che sono anche in esecuzione il server di database come Oracle o MySQL, che è famosa per intensivo di memoria. Linux, including CentOS which is popular on cPanel and Plesk web hosting server, comes with several commands and tools to check memory usage on server. Linux, tra cui CentOS che è popolare a cPanel e Plesk hosting web server, viene fornito con numerosi comandi e strumenti per controllare l'uso della memoria sul server.
free libero
free command displays amount of total, free and used physical memory (RAM) in the system, as well as shoing information on shared memory, buffers, cached memory and swap space used by the Linux kernel. libero comando visualizza importo del totale, libero e utilizzati memoria fisica (RAM) del sistema, così come shoing informazioni sulla memoria condivisa, buffer, cache di memoria e lo spazio di swap utilizzato dal kernel Linux.
Syntax of free Sintassi della libera
free -[options] libero - [opzioni]
Example usage of free Esempio di uso del libero
free -m free-m
The command will display information about physical memory in MB. Il comando per visualizzare informazioni sulla memoria fisica in MB.
free -m -s 5 free-m-s 5
The command will activate continuous polling delay at 5 seconds apart, and then display memory status in megabytes on terminal. Il comando si attiva il polling continuo ritardo a oltre 5 secondi, quindi visualizzare lo stato della memoria in megabyte sul terminale. Any floating point number for delay can be specified. Qualsiasi numero in virgola mobile per il ritardo può essere specificato.
free -t -m libero-t-m
Same with “free -m”, but -t switch will display a line containing the totals of physical memory and swap space. Stesso con "free-m", ma-t viene visualizzata una riga contenente i totali di memoria fisica e lo spazio di swap.
vmstat vmstat
vmstat reports report virtual memory statistics, which has information about processes, swap, free, buffer and cache memory, paging space, disk IO activity, traps, interrupts, context switches and CPU activity. vmstat relazione relazioni statistiche della memoria virtuale, che ha informazioni su processi, di swap, libero, buffer e cache di memoria, spazio per il paging, disco IO attività, trappole, interrupt, quadro interruttori e attività della CPU. With vmstat command, administrators can has instantaneous reports on memory usage. Con comando vmstat, gli amministratori possono istantanea ha relazioni su l'uso della memoria.
Syntax of vmstat Sintassi di vmstat
vmstat -[options] [delay count] vmstat - [opzioni] [ritardo count]
Example usage of vmstat Esempio di uso di vmstat
vmstat
The command will display report based on averages since last reboot. Il comando per visualizzare relazione basata sulle medie dallo scorso il riavvio.
vmstat 5 vmstat 5
The command will pool average system resources usage level for a sampling period of 5 seconds at interval of 5 seconds, except the first result that is averages since the last reboot. Il comando pool di risorse di sistema medio livello di utilizzo per un periodo di campionamento di 5 secondi a intervallo di 5 secondi, tranne la prima che è risultato in media dopo l'ultimo riavvio.
top superiore
top command displays dynamic real-time view of the running tasks managed by kernel and system information in Linux system. top comando visualizza dinamica in tempo reale, vista la gestione di compiti di gestione del kernel di sistema e di informazione nel sistema Linux. The memory usage stats by top command include real-time live total, used and free physical memory and swap memory with their buffers and cached memory size respectively. L'uso della memoria di statistiche top comando includere in tempo reale dal vivo totale, usata e libera la memoria fisica e di swap con la loro memoria buffer e la dimensione della memoria cache.
Syntax and example usage of top Sintassi e esempio di uso del top
top superiore
Using top is simple, simply type top at command shell, and constantly update stats page will be shown. Utilizzando cima è semplice, basta digitare il comando superiore a guscio, e in continuo aggiornamento stats pagina verrà visualizzata.
ps aux ps aux
ps command reports a snapshot on information of the current active processes. ps comando relazioni un'istantanea su informazioni degli attuali processi attivi. Advantage of ps command is that system admins will be able to see where the memory is used. Vantaggio di comando ps è che gli amministratori di sistema sarà in grado di vedere dove la memoria è utilizzato. ps will show the percentage of memory resource that is used by each process or task running in the system. ps mostrerà la percentuale di risorse di memoria che viene utilizzata da ciascun compito o processo in esecuzione nel sistema. With this command, top memory hogging processes can be identified. Con questo comando, top memoria monopolizzavano i processi possono essere identificati.
Syntax and example of ps aux Sintassi e l'esempio di ps aux
aux is actually already the options for ps command to see every process on the system. aux è in realtà già opzioni per il comando ps per visualizzare ogni processo sul sistema. So the typical command to type the following in the command shell: Così il tipico comando per digitare il seguente comando nella shell:
ps aux ps aux
To see only the memory resources occupied by each category of processes, such as Apache httpd, MySQL mysqld or Java, use the following command: Per visualizzare solo le risorse di memoria occupato da ciascuna categoria di processi, come ad esempio httpd Apache, MySQL mysqld o Java, utilizzare il seguente comando:
ps aux | awk '{print $4"\t"$11}' | sort | uniq -c | awk '{print $2" "$1" "$3}' | sort -nr ps aux | awk '(print $ 4 "\ t" $ 11)' | sort | uniq-c | awk '(print $ 2 "" $ 1 "" $ 3)' | sort-nr
The all mentioned ways of check memory usage should works on most Unix and Linux variant of operating systems. Di cui tutti i modi di controllare l'uso della memoria dovrebbe opere a la maggior parte di Unix e Linux variante di sistemi operativi. However, if you’re running a VPS (Virtual Private Server) or VDS (Virtual Dedicated Server) or Hybrid Server, especially those powered by Virtuozzo or OpenVZ, the above commands will retrieve data from the host machine, ie the entire server the virtual environment is running on. Tuttavia, se si sta eseguendo un VPS (Virtual Private Server) o VDS (Virtual Dedicated Server) o ibridi Server, in particolare di quelli alimentati a Virtuozzo o OpenVZ, i comandi sopra recuperare dati da la macchina, vale a dire tutto il server virtuale ambiente è in esecuzione. In these virtualization system, the memory usage info has to be calculated from control panel or /proc/user_beancounters file. In questi sistema di virtualizzazione, l'uso della memoria informazioni deve essere calcolata a partire dal pannello di controllo o / proc / user_beancounters file.
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. IMPORTANTE: Questa è una pagina tradotta macchina che è fornito "così com'è" senza alcuna garanzia. Machine translation may be difficult to understand. Traduzione automatica può essere difficile da capire. Please refer to Si prega di fare riferimento a original English article articolo originale inglese whenever possible. quando possibile.
Share and contribute or get technical support and help at Condividere e contribuire o ottenere supporto tecnico e assistenza in My Digital Life Forums La mia vita digitale Forum .
Related Articles Articoli correlati
- Ubuntu 6.06 Reviews Recensioni ubuntu 6,06
- Novell SUSE Linux Enterprise Server 10 Reviews Novell SUSE Linux Enterprise Server 10 recensioni
- Open, Extract and Convert DAA, ISO and BIN Files in Linux with Free PowerISO for Linux Aprire, estrarre e convertire DAA, ISO e BIN file in Linux con PowerISO libero per Linux
- Find Out Linux Orphan Processes Per saperne di Linux processi orfani
- Cheapest Linux Box Ever Crescente Linux box mai
- How to Check if Telnet Is Running on a Server Come controllare se Telnet è in esecuzione su un server
- Paessler Router Traffic Grapher PRTG 5.3 Review by Computing Paessler Router Traffic Grapher PRTG 5,3 recensione di computing
- Start, Stop and Restart Crond Daemon in Linux Start, stop e restart Crond Demone in Linux
- Download Free VMWare Server Virtualization Software VMWare scaricare gratuitamente il software di virtualizzazione server
- How to Mount USB Disk Drive in UNIX or Linux In grado di montare Disk Drive USB in UNIX o Linux

































September 24th, 2007 15:20 24 settembre 2007 15:20
When you are running top there are three fields related to memory usage. Quando si esegue superiore ci sono tre settori connessi al l'uso della memoria. In order to assay your server memory requirements you have to understand their meaning. Al fine di test il tuo server requisiti di memoria dovete capire il significato.
The first thing you have to know is that all the columns (VIRT RES SHR) report memory usage in KB (kilobytes). La prima cosa che dovete sapere è che tutte le colonne (virt RES SHR) relazione l'uso della memoria in KB (kilobyte).
VIRT column (virtual memory size of the process) means how much memory a particular application has requested, also it counts swapped to the disk memory pages. Virt colonna (dimensione della memoria virtuale del processo) si intende la quantità di memoria che una particolare applicazione ha richiesto, inoltre conta scambiati sul disco pagine di memoria. But this field does NOT mean that this process actually uses that amount of memory, to use it for real this memory has to be initiated for example using memset. Ma questo campo non significa che questo processo che utilizza effettivamente quantità di memoria, di utilizzarlo per un reale questa memoria deve essere avviato per esempio utilizzando memset. Generally speaking you can disregard this column. In linea generale si può ignorare questa colonna.
RES column (resident set size, the non-swapped physical memory that a task has used (in kiloBytes)) is the most important one - it actually shows how much physical RAM is allocated for a process. RES colonna (residente impostare le dimensioni, non scambiati memoria fisica di un compito che ha utilizzato (in kilobyte)) è la più importante - in realtà dimostra quanta RAM fisica è assegnato per un processo.
SHR column says how much memory a particular application is sharing with other applications. SHR colonna dice la quantità di memoria che una particolare applicazione è la condivisione con altre applicazioni. Eg, most applications in Linux depend on libc, and as every application links with it and uses its functions then this library memory space is mapped to all process simultaneously to conserve memory. Ad esempio, la maggior parte delle applicazioni in Linux dipendono libc, e come ogni applicazione legami con essa e utilizza le sue funzioni allora questa libreria spazio di memoria è mappato a tutti i processi contemporaneamente a conservare la memoria.
Consult with this pages for better understanding: A consultare queste pagine per una migliore comprensione:
1. http://tldp.org/LDP/tlk/mm/memory.html
2. http://www.ibm.com/developerworks/linux/library/l-mem26/