When you say "nothing above 10%" do you mean "no one thing above 10%"? It only takes 11 things at ~9% to hit 100% in total.
Also, some of the measured used CPU time could be I/O wait time - time in which a process could be doing something but isn't because it is waiting for an I/O device to respond (i.e. it has made a disk request and the disk has not yet found the right bit of data and returned it). In top, this can be seen on the CPU line(s) as the %wa measure. The I/O wait state is a little odd - the CPU isn't actually busy doing anything (so if another process wanted to do some computation it would be able to) but it does count towards the system load figures as system load represenets more than just the CPU activiy.
It would be helpful to add the output of top -n 1
to your question.
Also, if your kernel is recent enough to have the IO accounting feature (if you are using a recent release of Ubuntu it should be) and it is turned on, you can see what processes are actively performing I/O operations by running iotop -n 1 -ob
(iotop might not be installed by default, if you don't have it try install with apt-get install iotop
or by finding it in the GUI package manager.
pcpu
doesn't do what you think.
From UNIX man pages : ps ():
CODE HEADER DESCRIPTION
%cpu %CPU cpu utilization of the process in "##.#" format.
Currently, it is the CPU time used divided by the time the
process has been running (cputime/realtime ratio),
expressed as a percentage. It will not add up to 100%
unless you are lucky. (alias pcpu).
As you can see, pcpu
doesn't measure the current CPU usage, but the average CPU usage since the process started. If a process has been running for a couple of days before it suddenly misbehaves, you won't be able to see that variation using the ps
command.
In contrast, top
shows the current CPU usage in the %CPU
column.
From UNIX man pages : top ():
k: %CPU -- CPU usage
The task's share of the elapsed CPU time since the last screen
update, expressed as a percentage of total CPU time. In a true SMP
environment, if 'Irix mode' is Off, top will operate in 'Solaris
mode' where a task's cpu usage will be divided by the total number
of CPUs. You toggle 'Irix/Solaris' modes with the 'I' interactive
command.
top
automatically sorts processes by current CPU usage, so the first process should be the culprit.
Best Answer
By default, htop hides kernel threads like nfsd. To show/hide kernel threads, press uppercase K to toggle. htop will save you settings when you exit.
https://askubuntu.com/questions/145707/why-doesnt-htop-display-the-same-processes-as-top