How to Check Memory Usage in Linux based Server Kā pārbaudīt Memory izmantošana Linux balstās Server
Memory is one of the most critical resource components on a server to ensure that the smooth and fast operation. Atmiņa ir viens no viskritiskākajiem resurss komponenti uz servera, lai nodrošinātu vienmērīgu un ātru darbību. 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. Līdz ar to pieejamību, atbilstošu un bagātīgāka fiziskās atmiņas lielums ir ļoti svarīgi, jo īpaši attiecībā uz jebkuru serveri, it sevišķi augsta slodze web uzņēmēja, kas ir arī darbības datu bāzes servera, piemēram, Oracle vai MySQL, kas ir slavens ar atmiņas intensīvs. 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, ieskaitot CentOS, kas ir populārs par cPanel un plesk web hosting servera, nāk ar vairākiem komandas un līdzekļus, lai pārbaudītu atmiņas izmantošanu serveri.
free bezmaksas
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. bezmaksas komanda parāda summu no kopējā, brīvā un izmanto fiziskā atmiņa (RAM), sistēmā, kā arī shoing informāciju par kopējiem atmiņu, buferi, kešatmiņā atmiņā un mijmaiņas telpa, ko izmanto Linux kodolu.
Syntax of free Sintakses bezmaksas
free -[options] bezmaksas - [iespēju]
Example usage of free Piemērs izmantošanu brīvu
free -m free-m
The command will display information about physical memory in MB. Komandiera parādīs informāciju par fizisko atmiņu 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. Komandiera aktivizēs nepārtraukts vēlēšanu kavēšanos 5 sekundes no otra, un pēc tam displejs atmiņas statusu megabaiti par terminālu. Any floating point number for delay can be specified. Jebkurš peldošā komata numuru kavēšanās var tikt precizēts.
free -t -m free-t-m
Same with “free -m”, but -t switch will display a line containing the totals of physical memory and swap space. Tas pats ar "free-m", bet-t slēdzis būs redzams līnija satur kopsummas fiziskā atmiņa un mijmaiņas telpu.
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 ziņojumus ziņojums virtuālo atmiņu statistika, kas ir informācija par procesu, maiņas, bezmaksas, izlīdzinošo un cache atmiņa, peidžeru telpa, disk IO darbības, zivju krātiņiem, pārtrauc, konteksta slēdži un CPU darbību. With vmstat command, administrators can has instantaneous reports on memory usage. Ar vmstat komandas, administratori var ir momentānais ziņojumus par atmiņas izmantošanu.
Syntax of vmstat Sintaksi vmstat
vmstat -[options] [delay count] vmstat - [iespējas] [kavēšanās skaits]
Example usage of vmstat Piemērs izmantošanu vmstat
vmstat vmstat
The command will display report based on averages since last reboot. Komandiera parādīs ziņojumu, kas balstīts uz vidējo rādītāju kopš pagājušā atsāknēšana.
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. Komandiera apvienos vidējais sistēmas resursu izmantošanas līmeni, paraugu ņemšanas periodu, 5 sekunžu laikā, intervālu 5 sekunžu laikā, izņemot pirmo rezultātu, kas ir vidējie rādītāji kopš pēdējās atsāknēšana.
top augša
top command displays dynamic real-time view of the running tasks managed by kernel and system information in Linux system. top komanda parāda dinamisku reālā laika ņemot vērā ekspluatācijas uzdevumu, ko pārvalda kodolu un sistēmas informācijas Linux sistēmu. 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. Atmiņas izmantošana stats ar top komandu ietver reālā laika dzīvot kopā, ko izmanto, un bez fiziskā atmiņa un mijmaiņas atmiņā ar to buferzonas un kešatmiņā atmiņas lielumu.
Syntax and example usage of top Sintakses un piemērs izmantošanu top
top augša
Using top is simple, simply type top at command shell, and constantly update stats page will be shown. Izmantojot uz augšu ir vienkārša, vienkārši tipa top pie komandu čaumalas un pastāvīgi atjaunina stats lapā, tiks parādīts.
ps aux ps aux
ps command reports a snapshot on information of the current active processes. ps komandu ziņojumus momentuzņēmumu par informāciju par pašreizējo aktīvo procesiem. Advantage of ps command is that system admins will be able to see where the memory is used. Priekšrocība ps komanda, ir tas, ka sistēma admins varēs redzēt, kur atmiņa ir izmantoti. ps will show the percentage of memory resource that is used by each process or task running in the system. ps rādīs procentuālo atmiņas resursu, ko izmanto katrā procesa vai uzdevumu darbojoties sistēmā. With this command, top memory hogging processes can be identified. Ar šo komandu, top atmiņas hogging procesus var identificēt.
Syntax and example of ps aux Sintakses un piemērs ps aux
aux is actually already the options for ps command to see every process on the system. aux faktiski jau iespējas ps komanda redzēt ik procesu par šo sistēmu. So the typical command to type the following in the command shell: Līdz ar to tipiskie komandu rakstīt šādu komandu apvalks:
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: Lai redzētu tikai atmiņas resursi, ko aizņem katras kategorijas procesiem, kā, piemēram, Apache httpd, MySQL mysqld vai Java, izmantojiet komandu:
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. Par visiem minētajiem veidiem, kā pārbaudīt atmiņas izmantošana būtu darbu visvairāk Unix un Linux variantu operētājsistēmām. 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. Tomēr, ja jūs lietojat VPS (Virtual Private Server) vai KNS (Virtual Dedicated Server) vai Hybrid Server, jo īpaši tiem, kas powered by Virtuozzo vai OpenVZ, iepriekšminēto komandu būs izgūt datus no uzņēmēja mašīna, ti, visu serveri virtuālo vide darbojas. In these virtualization system, the memory usage info has to be calculated from control panel or /proc/user_beancounters file. Šādos virtualizācijas sistēmas, atmiņas izmantošana info ir jāaprēķina no vadības paneļa vai / proc / user_beancounters failu.
IMPORTANT : The page is machine translated and provided "as is" without warranty. SVARĪGI: Šī lapa ir mašīna tulkoto un ar nosacījumu ", kas ir" bez garantijas. Machine translation may be difficult to understand. Machine translation var būt grūti saprast. Please refer to Lūdzu, skatiet original English article oriģināls angļu rakstu whenever possible. kad vien iespējams.
Related Articles Saistītie raksti
- Get Triggered with High Memory Usage via Usage Monitor Get Izraisīts ar augstu Memory Usage caur Usage Monitor
- How to Check if Telnet Is Running on a Server Kā Pārbaudiet, Telnet Is Running uz servera
- Open, Extract and Convert DAA, ISO and BIN Files in Linux with Free PowerISO for Linux Open, Ekstrahētais un Convert DAA, ISO un BIN failus Linux bezmaksas PowerISO Linux
- Novell SUSE Linux Enterprise Server 10 Reviews Novell SUSE Linux Enterprise Server 10 Recenzijas
- Check Your Disk! Pārbaudiet Jūsu Disk! Provides Statistical Information of Hard Disk Usage Sniegta statistikas informācija par cietā diska Usage
- Optimize SQL Server 2000, 2005 or 2008 in Large RAM System by Locking Pages in Memory and AWE Optimizējiet SQL Server 2000, 2005 vai 2008 Large RAM sistēmai Bloķēšanai Pages atmiņa un AWE
- How to Find and Check Number of Connections to a Server Kā atrast un Check skaits Connections uz Server
- How to Get Linux Server Sends Email Alert on Root Login Kā Get Linux Server Sūta e-pasta brīdinājumu par Root Login
- Marvell Announced Linux Based Tiny Power Plug SoC Computer Marvell Izsludinātie Linux Pamatojoties Tiny Power Plug SOC Computer
- Find Out Linux Orphan Processes Find Out Linux Orphan Processes










































February 23rd, 2009 21:50 Februāris 23, 2009 21:50
annoying javascript! kaitinošas javascript!
pgup moves you to bottom of page. pgup pārceļas jums apakšā lapā. can't navigate nevar kuģot
September 24th, 2007 15:20 Septembris 24, 2007 15:20
When you are running top there are three fields related to memory usage. Ja jūs izmantojat top ir trīs jomās, kas saistītas ar atmiņas izmantošanu. In order to assay your server memory requirements you have to understand their meaning. Lai raudzi jūsu servera atmiņas prasības Jums izprast to nozīmi.
The first thing you have to know is that all the columns (VIRT RES SHR) report memory usage in KB (kilobytes). Pirmā lieta, jums ir jāzina, ir tas, ka visi kolonnas (Virt RES SHR) ziņo atmiņas izmantošana KB (kilobaiti).
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 sleja (virtuālais atmiņas lielums, kā arī procesa) ir, cik daudz atmiņas konkrētam pieteikumam ir pieprasīta, kā arī to skaits mijmaina uz diska atmiņas lapās. 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. Taču šajā jomā, nenozīmē, ka šis process faktiski izmanto, ka summa, atmiņa, lai to izmantotu reālā šī atmiņa ir jāuzsāk, piemēram, izmantojot memset. Generally speaking you can disregard this column. Kopumā jūs varat neņemt vērā šo kolonnu.
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 sleja (rezidents noteikts izmērs, kas nav mijmaina fiziskā atmiņa, ka uzdevums ir izmantojis (in kilobaitus)) ir vissvarīgākā - tas tiešām liecina, cik daudz fizisku RAM ir piešķirts process.
SHR column says how much memory a particular application is sharing with other applications. SHR sleja saka, cik daudz atmiņas īpašu pieteikumu koplietošanu ar citiem pieteikumiem. 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. Piemēram, lielākā daļa pieteikumu Linux ir atkarīgs no libc, un katru pieteikumu saiknes ar to un izmanto savu funkciju, tad šī bibliotēka atmiņas telpa ir plānots visu process vienlaicīgi, lai saglabātu atmiņā.
Consult with this pages for better understanding: Konsultējieties ar šo lapu, lai labāk izprast:
1. 1. http://tldp.org/LDP/tlk/mm/memory.html http://tldp.org/LDP/tlk/mm/memory.html
2. 2. http://www.ibm.com/developerworks/linux/library/l-mem26/ http://www.ibm.com/developerworks/linux/library/l-mem26/