除了使用top 命令,还可以使用下面的命令
vmstat 1 20
1 20 意思是1---20行的CPU 和内存的使用情况
top :
top - 19:19:32 up 39 min, 1 user, load average: 0.36, 0.39, 0.37
Tasks: 120 total, 1 running, 118 sleeping, 0 stopped, 1 zombie
Cpu(s): 5.2%us, 2.7%sy, 0.0%ni, 92.0%id, 0.0%wa, 0.2%hi, 0.0%si, 0.0%st
Mem: 969328k total, 790264k used, 179064k free, 52788k buffers
Swap: 2112508k total, 0k used, 2112508k free, 305652k cached
free :
total used free shared buffers cached
Mem: 969328 790516 178812 0 52736 305600
-/+ buffers/cache: 432180 537148
Swap: 2112508 0 2112508
vmstat :
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
2 0 0 178312 52804 305700 0 0 72 18 85 1119 13 4 82 1
感觉top还好一点^_^
------解决思路----------------------
"us sy id wa" is useful to you
us: time spend running non-kenel code
sy: time spend running kenel code(system time)
id: idle time
wa: time waiting for IO
...
you can "man vmstat" to get them
阅读(1065) | 评论(0) | 转发(0) |