AFAIK htop shows the most consuming processes at the top. That specific moment when I took the screenshot, htop was using 4%, but if you look below it, you will see that no other process is using the cpu.
Usually I see e.g. 5, below it 4, below it 3 etc.. So the cpu usage is 5+4+3=12% at that moment
The cpuload plugin, until recently was showing me cpu loads similar to the loads that htop, or top was showing me... Right now if I use
Code:
top -b -d 1|grep CpuI get
Code:
Cpu(s): 0.7%us, 0.3%sy, 0.0%ni, 97.6%id, 1.4%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu(s): 0.2%us, 0.0%sy, 0.0%ni, 99.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu(s): 0.0%us, 0.5%sy, 0.0%ni, 99.0%id, 0.5%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu(s): 1.7%us, 0.0%sy, 0.0%ni, 98.3%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu(s): 1.5%us, 2.0%sy, 0.0%ni, 96.6%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu(s): 2.5%us, 0.7%sy, 0.0%ni, 96.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu(s): 1.5%us, 0.2%sy, 0.0%ni, 98.3%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu(s): 1.7%us, 1.5%sy, 0.0%ni, 96.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni, 99.5%id, 0.5%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu(s): 2.0%us, 0.2%sy, 0.0%ni, 97.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu(s): 1.2%us, 1.7%sy, 0.0%ni, 97.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu(s): 0.2%us, 0.2%sy, 0.0%ni, 99.5%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu(s): 1.5%us, 0.2%sy, 0.0%ni, 98.3%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu(s): 1.2%us, 2.0%sy, 0.0%ni, 96.3%id, 0.5%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu(s): 1.5%us, 0.5%sy, 0.0%ni, 98.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu(s): 0.0%us, 0.5%sy, 0.0%ni, 99.5%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu(s): 1.0%us, 1.0%sy, 0.0%ni, 98.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu(s): 6.7%us, 1.0%sy, 0.0%ni, 92.3%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
At the same time cpuload plugin shows 22% cpuload
The bottom line is that I don't argue whether cpuload plugin calculates the averages or not (I strongly believe, though, that previously it was showing the current CPU usage almost in real time)
The problem is that those supposed averages are not the correct ones..
Any more ideas are highly appreciated!
P.S. : I take a look in cpu.php
I see it is using "grep -c processor /proc/cpuinfo". If I give the same command fron cli the return result is 4. cpuload plugin now shows 23..
PPS: In that machine I also have phpsysinfo installed. I am attaching what phpsysinfo reports. You can see the averages, plus the usage is at 1% when at the same time cpuload plugin shows 29%