Thursday, September 24, 2009

linux top

SkyHi @ Thursday, September 24, 2009
[root@home]# top -c
12:21:51 up 19 min, 1 user, load average: 0.01, 0.03, 0.04
69 processes: 68 sleeping, 1 running, 0 zombie, 0 stopped
CPU states: 2.5% user 0.9% system 0.0% nice 0.0% iowait 96.4% idle
Mem: 904396k av, 256240k used, 648156k free, 0k shrd, 14196k buff
45880k active, 188816k inactive
Swap: 1020116k av, 0k used, 1020116k free 147884k cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
2175 root 0 0 9232 9232 9020 S 0.9 1.0 0:15 0 /usr/local/apache/bin/httpd
1 root 8 0 504 504 456 S 0.0 0.0 0:04 0 init [3]
2 root 9 0 0 0 0 SW 0.0 0.0 0:00 0 keventd
3 root 19 19 0 0 0 SWN 0.0 0.0 0:00 0 ksoftirqd_CPU0
4 root 9 0 0 0 0 SW 0.0 0.0 0:00 0 kswapd
5 root 9 0 0 0 0 SW 0.0 0.0 0:00 0 bdflush




The top 10 monopolizing process would be better if sorted as a numberic key :


ps -eo pcpu,pid,user,args | sort -k 1 -r -n | head -10