据我所知,top中的平均负载是运行或不间断睡眠状态下的进程(线程)数,因此它应该等于vmstat中的(procs-r +1)+ procs-b,但实际上,这两个数字总是有很大的差距。我的理解有任何错误,如果有人能给我一些指导,我将不胜感激。
top - 05:34:50 up 1 day, 20:56, 5 users, load average: 2.83, 2.67, 1.62
Tasks: 79 total, 1 running, 78 sleeping, 0 stopped, 0 zombie
Cpu(s): 6.8%us, 1.8%sy, 0.0%ni, 91.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.4%st
Mem: 1758000k total, 582636k used, 1175364k free, 103932k buffers
Swap: 917500k total, 0k used, 917500k free, 180868k cached
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 0 1182524 103784 180860 0 0 1 9 6 53 7 2 91 0 0
0 0 0 1182524 103784 180860 0 0 0 36 70 117 0 0 100 0 0
0 0 0 1182516 103784 180860 0 0 0 0 73 132 0 1 100 0 0
0 0 0 1182516 103784 180860 0 0 0 0 60 127 0 0 100 0 0
1 0 0 1182516 103784 180860 0 0 0 0 62 102 0 0 100 0 0
0 0 0 1182628 103784 180860 0 0 0 0 289 238 1 2 97 0 0
2 0 0 1152160 103784 180892 0 0 0 8 1481 2371 54 12 34 0 0
1 0 0 1182192 103784 180860 0 0 0 0 681 834 19 4 78 0 0
0 0 0 1182200 103784 180860 0 0 0 0 80 147 0 1 100 0 0
0 0 0 1182200 103784 180860 0 0 0 0 53 107 0 0 100 0 0
0 0 0 1182208 103788 180856 0 0 0 72 64 123 0 0 100 1 0