How to Check Memory Usage in Linux based Server Kaip patikrinti Memory Usage Linux pagrįstas Server
Memory is one of the most critical resource components on a server to ensure that the smooth and fast operation. Atmintis yra vienas iš svarbiausių išteklių komponentai serverio, siekiant užtikrinti, kad sklandžiai ir greitai valdyti. 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. Taigi, yra pakankamai daug ir gausu fizinės atmintinės dydis yra labai svarbus, ypač bet koks serveris, ypač didele apkrova adresas, taip pat veikia duomenų bazės serverio, pavyzdžiui, Oracle arba MySQL, kuris garsėja atminties intensyvus. 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, įskaitant Centos kurios yra populiarios cPanel ir Plesk interneto serveris, ateina su keliais komandos ir įrankiai patikrinti atminties serveryje.
free laisvas
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. nemokamai rodo suma iš viso, nemokamai ir naudoti fizinės atminties (RAM) sistemoje, taip pat shoing informaciją apie atminties, buferius, išsaugoti atmintyje ir apsikeitimo erdvę naudojamas branduolys Linux.
Syntax of free Sintaksė nemokamai
free -[options] nemokamai - [options]
Example usage of free Pavyzdys naudoti nemokamai
free -m free-m
The command will display information about physical memory in MB. Komandų parodys informaciją apie fizinę atmintį 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. Komanda bus aktyvuoti nuolat grandinių vėlavimo 5 sekundes vienas kito, ir tada įdėkite atminties statusą megabaitų dėl terminalo. Any floating point number for delay can be specified. Bet slankiojo kablelio skaičių už vėlavimą gali būti nurodyta.
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 su "laisvo m", o-t jungiklis parodys eilutę sudaro sumos fizinės atminties ir apsikeitimo erdvę.
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 pranešimų pranešimą virtualiosios atminties statistikos duomenims, kurie turi informacijos apie procesus, apsikeitimo, laisvi, buferio ir Kešatmiņa, stronicowania kosmoso disko IO veiklos spąstus, pertraukinėja, kontekste jungikliai ir procesoriaus veiklą. With vmstat command, administrators can has instantaneous reports on memory usage. Su vmstat komandą, administratoriai gali turi momentinė ataskaitas apie atminties.
Syntax of vmstat Sintaksė vmstat
vmstat -[options] [delay count] vmstat - [pasirinktys] [vėlavimą skaičiavimo]
Example usage of vmstat Pavyzdys naudojimo vmstat
vmstat vmstat
The command will display report based on averages since last reboot. Komanda bus rodomas pranešimas, grindžiamas vidurkiai nuo paskutinio paleisti.
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. Komanda sutelks vidutinis sistemos išteklių naudojimo lygis mėginių per 5 sekundes ne intervalas 5 sekundes, išskyrus pirmąjį todėl yra vidurkiai nuo paskutinio paleisti.
top viršus
top command displays dynamic real-time view of the running tasks managed by kernel and system information in Linux system. viršuje rodo dinamišką realiu laiku atsižvelgiant į einamąsias užduotis tvarko branduolio ir informacijos sistemos Linux sistemą. 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. Atminties naudojimo top komandą įtraukti realiu laiku gyvena visos, naudojamos ir laisvos fizinės atmintinės dydis ir apsikeitimo atminties su buferio ir talpyklos atminties dydis.
Syntax and example usage of top Sintaksė ir pavyzdys naudojimo viršų
top viršus
Using top is simple, simply type top at command shell, and constantly update stats page will be shown. Naudojant viršų paprasta, tiesiog įrašykite viršų į komandų apvalkalas, ir nuolat atnaujinti statistika puslapyje bus rodomas.
ps aux ps aux
ps command reports a snapshot on information of the current active processes. Ps raportuje fotografiją informacijos apie dabartinės aktyvius procesus. Advantage of ps command is that system admins will be able to see where the memory is used. Privalumas Ps komanda kad sistemos administratoriai galės matyti, kai atminties naudojama. ps will show the percentage of memory resource that is used by each process or task running in the system. ps bus parodytas procentas atminties išteklių, kad yra naudojami kiekvieną procesą ar užduotį veikia sistema. With this command, top memory hogging processes can be identified. Naudodami šią komandą viršų atminties Žuvo procesai gali būti atpažintas.
Syntax and example of ps aux Sintaksė ir pavyzdys ps aux
aux is actually already the options for ps command to see every process on the system. AUX faktiškai jau galimybių Ps komandą pamatyti proceso sistemos. So the typical command to type the following in the command shell: Taigi tipiškas komandą įrašykite šią komandą apvalkalas:
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: Norėdami matyti tik išteklių atminties užima kiekvienos kategorijos procesų, pavyzdžiui, Apache httpd, MySQL, name ar Java, naudokite šią komandą:
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. Į visus minėtus būdus patikrinti atminties turėtų veikia daugelyje Unix ir Linux variantu operacinių sistemų. 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. Tačiau, jei jūs naudojate VPS (Virtual Private Server) arba VDS (Virtual Dedicated Server) arba Hibridinis Server, ypač tų, kurios maitina Virtuozzo arba OpenVZ, aukščiau komandos bus gauti duomenis iš priimančios mašinos, ty visą serverio virtualios aplinka veikia. In these virtualization system, the memory usage info has to be calculated from control panel or /proc/user_beancounters file. Šiais Virtualizacija sistemos, atminties informacija turi būti apskaičiuojamas iš valdymo skydelyje arba / proc / user_beancounters failą.
IMPORTANT : The page is machine translated and provided "as is" without warranty. DĖMESIO: Šis puslapis yra mašina išvertė ir pateikiama "kaip yra" be garantijų. Machine translation may be difficult to understand. Mašininio vertimo, gali būti sunku suprasti. Please refer to Remkitės original English article originalas anglų straipsnis whenever possible. jei įmanoma.
Related Articles Susiję straipsniai
- Get Triggered with High Memory Usage via Usage Monitor Gauti Valdomieji su aukšto Memory Usage per Usage Monitor
- How to Check if Telnet Is Running on a Server Kaip patikrinti, jei TELNET veikia serverio
- Open, Extract and Convert DAA, ISO and BIN Files in Linux with Free PowerISO for Linux Atidaryti, išgautišio ir Konvertuokite DAA, ISO ir BIN failus Linux su laisvosios PowerISO Linux
- Novell SUSE Linux Enterprise Server 10 Reviews Novell SuSE Linux Enterprise Server 10 Atsiliepimai
- Check Your Disk! Pabandykite Jūsų diske! Provides Statistical Information of Hard Disk Usage Pateikta statistinė informacija apie kietojo disko naudojimas
- Optimize SQL Server 2000, 2005 or 2008 in Large RAM System by Locking Pages in Memory and AWE Optimizuokite SQL Server 2000, 2005 arba 2008 m. Didelės atminties sistemos Užrakinus Puslapiai Atmintis ir awe
- How to Find and Check Number of Connections to a Server Kur ir Pabandykite skaičius Jungtys prie serverio
- How to Get Linux Server Sends Email Alert on Root Login Kaip gauti "Linux Serverio Perduoda Siųsti Įspėjimo apie Root Prisijungti
- Marvell Announced Linux Based Tiny Power Plug SoC Computer Marvell announced Linux pagrindu Tiny Power Plug SoC kompiuteris
- Firefox Add-on: TooManyTabs Organizes Firefox Tabs and Frees Up Memory Usage Firefox Add-on: TooManyTabs Organizuoja Firefox Tabs ir Frees Up Memory Usage










































February 23rd, 2009 21:50 Vasaris 23, 2009 21:50
annoying javascript! irytujących JavaScript!
pgup moves you to bottom of page. PgUp persikelia į puslapio apačioje. can't navigate negali naršyti
September 24th, 2007 15:20 September 24th, 2007 15:20
When you are running top there are three fields related to memory usage. Kai rodomi viršuje yra trys sritys, susijusios su atminties. In order to assay your server memory requirements you have to understand their meaning. Siekiant analizės serverio atminties turite suprasti jų reikšmę.
The first thing you have to know is that all the columns (VIRT RES SHR) report memory usage in KB (kilobytes). Pirmiausia, jūs turite žinoti, kad visų stulpelių (Virt RES SHR) ataskaita atminties KB (kilobaitai).
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 skiltis (virtualiosios atminties dydis procesas) tai, kiek atminties ypač paraiškoje prašoma, taip pat ji dirba apkeitimo į disko atminties puslapių. 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čiau šioje srityje, tai nereiškia, kad šiame procese faktiškai naudoja kad atminties, naudoti jį realaus šios atminties turi būti pradėtas, pavyzdžiui, naudojant memset. Generally speaking you can disregard this column. Apskritai jūs galite ignoruoti šį stulpelį.
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 skiltyje (rezidentas nustatytą dydį, ne apkeitimo fizinės atminties, kad uždavinys yra naudojamas (kilobajtach)) yra svarbiausia - ji iš tikrųjų rodo, kiek daug fizinės atminties yra skirta procesas.
SHR column says how much memory a particular application is sharing with other applications. SHR skiltyje sako kiek atminties ypač prašymas pasidalyti su kitomis programomis. 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. Pavyzdžiui, daugelyje programų Linux nuo libc, ir kiekvienas prašymas ryšius su juo ir naudoja savo funkcijas tai biblioteka atminties yra priskirti visi vienu metu išsaugoti atmintyje.
Consult with this pages for better understanding: Pasitarkite su šio puslapio geriau suprasti:
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/