¸®´ª½º¿¡ ÀÖ´Â ±â¾ï »ç¿ë¹ýÀ» °Ë»çÇÏ´Â ¹æ¹ý ¼¹öÀÇ ±âÃʸ¦ µÎ¾ú´Ù
±â¾ïÀº Àú°Í¿¡°Ô ¸Å²ô·´°í ºü¸¥ °¡µ¿À» ÁöŰ´Â ¼¹ö¿¡ Áß¿ä ÀÚ¿ø ºÐ´ëÀÇ ÇѰ³ ÀÌ´Ù. µû¶ó¼, ÃæºÐÇϰí dzºÎÇÑ ¹°¸®Àû ±â¾ï Àå¼Ò Å©±âÀÇ °¡¿ë¼ºÀº ¾î¶² ¼¹öµçÁö, ¶ÇÇÑ ÁýÁß ±â¾ïÀ» À§ÇØ °í¸íÇÑ Oracle MySQL¿Í °°Àº µ¥ÀÌŸº£À̽º ¼¹ö¸¦ ´Þ¸®°í Àִ ƯÈ÷ ³ôÀº Áü À¥ ÁÖÀÎÀ» À§ÇØ »ý¸í ƯÈ÷ ÀÌ´Ù. cPanel¿Í Plesk À¥ È£½ºÆÃ ¼¹ö¿¡ ´ëÁßÀûÀÎ CentOS¸¦ Æ÷ÇÔÇÏ¿© ¸®´ª½º´Â, ¼¹ö¿¡ ±â¾ï »ç¿ë¹ýÀ» °Ë»çÇÏ´Â ¸î¸î ¸í·É ¹× °ø±¸¿¡, ¿Â´Ù.
ÀÚÀ¯·Î¿î
ÀÚÀ¯·Î¿î ¸í·ÉÀº °øÀ¯ ±â¾ï ÀåÄ¡¿¡ shoing Á¤º¸ »Ó¸¸ ¾Æ´Ï¶ó ü°è, ¸®´ª½º ¾Ë°»ÀÌ¿¡ ÀÇÇØ ÀÌ¿ëµÈ ¿ÏÃæ±â, ij½Ã ±â¾ï ÀåÄ¡ ¹× ±³È¯ °ø°£¿¡¼ ÃѰè, ÀÚÀ¯·Ó°Ô¿Í »ç¿ëÇÑ ¹°¸®Àû ±â¾ï Àå¼Ò (·½) ¾çÀ» Ç¥½ÃÇÑ´Ù.
ÀÚÀ¯·Î¿îÀÇ Åë¾î·Ð
ÇØ¹æÇϽʽÿÀ - [¼±ÅñÇ]
ÀÚÀ¯·Î¿îÀÇ º¸±â »ç¿ë¹ý
- m¸¦ ÇØ¹æÇϽʽÿÀ
¸í·ÉÀº MB¿¡ ÀÖ´Â ¹°¸®Àû ±â¾ï Àå¼Ò¿¡ °üÇÏ¿© Á¤º¸¸¦ Ç¥½ÃÇÒ °ÍÀÌ´Ù.
- m - s 5¸¦ ÇØ¹æÇϽʽÿÀ
¸í·ÉÀº 5 ÃÊ¿¡ Áö¼ÓÀûÀÎ ÅõÇ¥ Áö¿¬À» µû·Îµû·Î Ȱ¼ºÈÇϰí, ±× ÈÄ¿¡ ¸Ç³¡¿¡ ¸Þ°¡¹ÙÀÌÆ®¿¡ ÀÖ´Â ±â¾ï »óŸ¦ Ç¥½ÃÇÑ´Ù. Áö¿¬À» À§ÇÑ ¾î¶² ºÎµ¿ ¼Ò¼öÁ¡ ¼öµçÁö ÁöÁ¤µÉ ¼ö ÀÖ´Ù.
- t - m¸¦ ÇØ¹æÇϽʽÿÀ
"ÀÚÀ¯·Î¿î - m", ±×·¯³ª - t ½ºÀ§Ä¡¿¡ µ¿ÀÏÀº ¹°¸®Àû ±â¾ï Àå¼Ò ¹× ±³È¯ °ø°£ÀÇ Çհ踦 Æ÷ÇÔÇÏ´Â ¼±À» Ç¥½ÃÇÒ °ÍÀÌ´Ù.
vmstat
vmstat º¸°í´Â °¡»ó ±â¾ïÀåÄ¡ Åë°è¸¦ º¸°íÇÑ´Ù, °úÁ¤, ±³È¯, ÀÚÀ¯·Î¿î¿¡ °üÇÏ¿© Á¤º¸°¡, ¿ÏÃæ±â¿Í °ø°£, µð½ºÅ© IO Ȱµ¿, ÇÔÁ¤, °³ÀÔÁß´Ü, ¹®¸Æ ½ºÀ§Ä¡ ¹× CPU Ȱµ¿À» ã´Â ij½Ã ±â¾ï ÀåÄ¡ ÀÖ´Â. vmstat ¸í·ÉÀ¸·Î, ÇàÁ¤°üÀº ÀÖ´Ù ±â¾ï »ç¿ë¹ý¿¡ Áï¼® º¸°í°¡ ÅëÁ¶¸²À¸·Î ¸¸µç´Ù.
vmstatÀÇ Åë¾î·Ð
vmstat - [¼±ÅñÇ] [Áö¿¬ Á¶»ç]
vmstatÀÇ º¸±â »ç¿ë¹ý
vmstat
¸í·ÉÀº ¸¶Áö¸· Àç½Ãµ¿ÇϽʽÿÀ ¶§¹®¿¡ Æò±Õ¿¡ ±Ù°ÅÇÑ º¸°í¸¦ Ç¥½ÃÇÒ °ÍÀÌ´Ù.
vmstat 5
¸í·ÉÀº 5 ÃÊÀÇ °£°ÝÀ¸·Î 5 ÃÊÀÇ Ç¥º» ÃßÃ⠱ⰣÀ» À§ÇÑ Æò±Õ ½Ã½ºÅÛ ÀÚ¿ø »ç¿ë ¼öÁØÀ», ¸¦ Á¦¿ÜÇÏ°í Æò±Õ ¶§¹®¿¡ ¸¶Áö¸· Àç½Ãµ¿ÀΠù¹øÂ° °á°ú ÇÕµ¿ÇÒ °ÍÀÌ´Ù.
Á¤»ó
ÃÖ°í ¸í·ÉÀº Linux ½Ã½ºÅÛ¿¡ ÀÖ´Â ¾Ë°»ÀÌ ±×¸®°í ½Ã½ºÅÛ Á¤º¸¿¡ ÀÇÇØ ó¸®µÈ ¿î¿µÇÏ´Â ¾÷¹«ÀÇ µ¿ÀûÀÎ ¼ø°£ Àü¸ÁÀ» Ç¥½ÃÇÑ´Ù. ÃÖ°í ¸í·É¿¡ ÀÇÇÏ¿© ±â¾ï »ç¿ë¹ý stats´Â Áï½Ã »ì¾ÆÀÖ´Â ÃѰ踦, »ç¿ëÇØ Æ÷ÇÔÇÏ°í ¹°¸®Àû ±â¾ï Àå¼Ò¸¦ ÇØ¹æÇÏ°í °¢°¢ ±×µéÀÇ ¿ÏÃæ±â ¹× ij½Ã ±â¾ï ÀåÄ¡ Å©±â¸¦ °¡Áø ±â¾ïÀ» ±³È¯ÇÑ´Ù.
Á¤»óÀÇ Åë¾î·Ð°ú º¸±â »ç¿ë¹ý
Á¤»ó
Á¤»óÀ» »ç¿ëÇÏ¿© ¸í·É Æ÷ź¿¡ °£´ÜÇÏ, °£´ÜÇÏ°Ô À¯Çü Á¤»óÀº, ÀÏÁ¤ÇÏ°Ô °»½Å stats ÆäÀÌÁö´Â º¸ÀÏ °ÍÀÌ´Ù.
º¸Á¶ ps
ps ¸í·É º¸°í ÇöÀç Ȱµ¿ °úÁ¤ÀÇ Á¤º¸¿¡ ½º³À. ps ¸í·ÉÀÇ ÀÌÁ¡Àº ü°è admins°¡ ±â¾ïÀÌ ¾îµð¿¡ »ç¿ëµÇ´ÂÁö º¼ ¼ö ÀÖÀ» ÀÌ´Ù. ps´Â ü°è¿¡¼ ´Þ¸®´Â °¢ °úÁ¤ ¶Ç´Â ¾÷¹«¿¡ ÀÇÇØ ÀÌ¿ëµÇ´Â ¸Þ¸ð¸® ¸®¼Ò½ºÀÇ ¹éºÐÀ²À» º¸¿©ÁÙ °ÍÀÌ´Ù. With this command, top memory hogging processes can be identified.
Syntax and example of ps aux
aux is actually already the options for ps command to see every process on the system. So the typical command to type the following in the command shell:
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:
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. 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, i.e. the entire server the virtual environment is running on. In these virtualization system, the memory usage info has to be calculated from control panel or /proc/user_beancounters file.
IMPORTANT: This is a machine translated page which is provided "as is" without warranty. Machine translation may be difficult to understand. Please refer to original English article whenever possible.
Share and contribute or get technical support and help at My Digital Life Forums.
Related Articles
- Ubuntu 6.06 Reviews
- Open, Extract and Convert DAA, ISO and BIN Files in Linux with Free PowerISO for Linux
- Novell SUSE Linux Enterprise Server 10 Reviews
- Cheapest Linux Box Ever
- Find Out Linux Orphan Processes
- Paessler Router Traffic Grapher PRTG 5.3 Review by Computing
- How to Check if Telnet Is Running on a Server
- Start, Stop and Restart Crond Daemon in Linux
- Download Free VMWare Server Virtualization Software
- How to Mount USB Disk Drive in UNIX or Linux

































September 24th, 2007 15:20
When you are running top there are three fields related to memory usage. In order to assay your server memory requirements you have to understand their meaning.
The first thing you have to know is that all the columns (VIRT RES SHR) report memory usage in KB (kilobytes).
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. 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. Generally speaking you can disregard this column.
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.
SHR column says how much memory a particular application is sharing with other applications. E.g., 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.
Consult with this pages for better understanding:
1. http://tldp.org/LDP/tlk/mm/memory.html
2. http://www.ibm.com/developerworks/linux/library/l-mem26/