例如top中显示的%CPU是进气的,即当时正在使用的CPU,而正常运行时间显示的负载是平均值:
It conventionally appears in the form of three numbers which represent
the system load during the last one-,five-,and fifteen-minute
periods.
从Wikipedia.
随着时间的推移,这些应该会收敛,但是虽然%CPU是100%最大值,但是当有进程等待时,负载可以高于1.例如:
For example,one can interpret a load average of “1.73 0.50 7.98” on a
single-CPU system as:
during the last minute,the CPU was overloaded by 73% (1 CPU with 1.73 runnable processes,so that 0.73 processes had to wait for a turn)
during the last 5 minutes,the CPU was underloaded 50% (no processes had to wait for a turn)
during the last 15 minutes,the CPU was overloaded 698% (1 CPU with 7.98 runnable processes,so that 6.98 processes had to wait for a
turn)
更新:
我现在才注意到你的进程使用了28%的CPU,而top报告说两个CPU的空闲率都是> 99%.我无法在我的Linux系统(Ubuntu 12.04,Intel i7-3770K quadcore HT)上重现这一点,请参阅下面的屏幕截图.
正常设置,无负载,显示所有核心的平均CPU使用率:
top - 18:10:04 up 7:50,2 users,0.05,0.15
Tasks: 157 total,156 sleeping,0 zombie
Cpu(s): 0.0%us,99.9%id,0.0%wa,0.0%st
Mem: 16528224k total,1124956k used,15403268k free,148772k buffers
Swap: 15624188k total,0k used,15624188k free,670460k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
7022 root 20 0 0 0 0 S 0 0.0 0:00.14 kworker/0:1
1 root 20 0 3640 2060 1324 S 0 0.0 0:01.23 init
2 root 20 0 0 0 0 S 0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0 0.0 0:00.14 ksoftirqd/0
6 root RT 0 0 0 0 S 0 0.0 0:00.00 migration/0
在一个核心上满载(运行yes> / dev / null),显示所有核心的平均CPU使用率:
top - 18:11:58 up 7:52,load average: 0.11,0.07,2 running,155 sleeping,0 zombie
Cpu(s): 12.5%us,87.5%id,1124880k used,15403344k free,148824k buffers
Swap: 15624188k total,670472k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
8254 tim 20 0 4188 280 228 R 100 0.0 0:04.88 yes
1 root 20 0 3640 2060 1324 S 0 0.0 0:01.23 init
2 root 20 0 0 0 0 S 0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0 0.0 0:00.15 ksoftirqd/0
6 root RT 0 0 0 0 S 0 0.0 0:00.00 migration/0
与2)相同,但显示每核CPU使用率:
top - 18:13:47 up 7:54,load average: 0.86,0.36,0.24
Tasks: 157 total,100.0%id,0.0%st
Cpu2 : 0.3%us,0.0%st
Cpu3 : 0.0%us,0.0%st
Cpu4 : 0.0%us,0.0%st
Cpu5 :100.0%us,0.0%id,0.0%st
Cpu6 : 0.0%us,0.0%st
Cpu7 : 0.0%us,1124756k used,15403468k free,148840k buffers
Swap: 15624188k total,670472k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
8254 tim 20 0 4188 280 228 R 100 0.0 1:53.98 yes
1 root 20 0 3640 2060 1324 S 0 0.0 0:01.23 init
2 root 20 0 0 0 0 S 0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0 0.0 0:00.15 ksoftirqd/0
6 root RT 0 0 0 0 S 0 0.0 0:00.00 migration/0
N.B.:我确实注意到,第一个统计数据顶部显示没有显示是的100%cpu使用情况,类似于你所拥有的.也许那就是问题?