본문 바로가기

Enginius/Linux

[리눅스] 현재 kernel의 load를 확인하는 방법


출처: http://www.joomlaperformance.com/articles/server_related/how_to_track_down_a_high_server_load_5_16.html

top -b -i -n 20 >> ./top_procs

렇게 하면 현재 폴더에 top_procs파일이 생긴다. 

  1 top - 09:00:42 up 3 min,  3 users,  load average: 0.07, 0.16, 0.08

  2 Tasks: 110 total,   1 running, 109 sleeping,   0 stopped,   0 zombie

  3 Cpu(s):  2.5%us,  7.7%sy,  0.4%ni, 85.8%id,  3.0%wa,  0.0%hi,  0.7%si,  0.0%st

  4 Mem:   1035400k total,   370060k used,   665340k free,    15908k buffers

  5 Swap:   915664k total,        0k used,   915664k free,   208196k cached

  6 

  7   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                             

  8  5922 root      20   0  2304 1000  756 R    0  0.1   0:00.00 top                                                                                           

  9 

 10 

 11 top - 09:00:45 up 3 min,  3 users,  load average: 0.07, 0.16, 0.08

 12 Tasks: 110 total,   1 running, 109 sleeping,   0 stopped,   0 zombie

 13 Cpu(s):  0.2%us,  0.5%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st

 14 Mem:   1035400k total,   370060k used,   665340k free,    15908k buffers

 15 Swap:   915664k total,        0k used,   915664k free,   208200k cached

 16 

 17   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                             

 18  5922 root      20   0  2312 1108  852 R    0  0.1   0:00.00 top                                                                              

 19 

 20 

 21 top - 09:00:48 up 4 min,  3 users,  load average: 0.06, 0.16, 0.08

 22 Tasks: 110 total,   1 running, 109 sleeping,   0 stopped,   0 zombie

 23 Cpu(s):  0.0%us,  0.3%sy,  0.0%ni, 99.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st

 24 Mem:   1035400k total,   370060k used,   665340k free,    15908k buffers

 25 Swap:   915664k total,        0k used,   915664k free,   208200k cached

 26 

 27   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                             

 28  5922 root      20   0  2312 1108  852 R    1  0.1   0:00.02 top    

 29 

 30 

 31 top - 09:00:51 up 4 min,  3 users,  load average: 0.06, 0.15, 0.08

 32 Tasks: 110 total,   1 running, 109 sleeping,   0 stopped,   0 zombie

 33 Cpu(s):  0.2%us,  0.2%sy,  0.0%ni, 99.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st

 34 Mem:   1035400k total,   370060k used,   665340k free,    15908k buffers

 35 Swap:   915664k total,        0k used,   915664k free,   208200k cached

 36 

 37   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND