CPU Utilisation

Asked by Nikolaus Rath

In the last 10 seconds, I ran top, vmstat, atsar and the gnome system monitor parallel to show me the cpu utilisation

Gnome system monitor showed 70% - 80% utilisation all the time. top showed
around 60% idle time, the sar and vmstat output follows:

[0] nokile:~$ sar 1 10 > sar & vmstat 1 10 > vmstat
[1] 25785
[0] nokile:~$ cat sar vmstat

Linux nokile 2.6.15-23-686 #1 SMP PREEMPT Tue May 23 14:03:07 UTC 2006 i686 05/29/2006

12:57:44 cpu %usr %nice %sys %irq %softirq %wait %idle _cpu_
12:57:45 all 7 5 2 0 0 0 87
12:57:46 all 1 0 0 0 0 0 99
12:57:47 all 2 0 0 0 0 0 98
12:57:48 all 1 1 1 1 0 0 96
12:57:49 all 1 0 1 0 0 0 98
12:57:50 all 1 0 0 0 0 0 99
12:57:51 all 1 0 0 0 1 0 98
12:57:52 all 1 0 0 0 0 0 99
12:57:53 all 1 0 2 1 0 0 96
12:57:54 all 1 0 0 0 0 0 99
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
 r b swpd free buff cache si so bi bo in cs us sy id wa
 1 0 88972 28192 128 318320 12 31 3107 512 8108 6143 54 19 25 2
 0 0 88972 28068 128 318444 12 0 32 0 1120 463 58 8 33 0
 0 0 88972 28068 128 318444 0 0 0 0 1189 293 0 0 100 0
 1 0 88972 28028 128 318444 0 0 0 0 1178 382 40 20 40 0
 0 0 88972 28028 128 318444 0 0 0 0 1119 259 0 0 100 0
 0 0 88972 28028 128 318444 0 0 0 0 1171 330 29 14 57 0
 0 0 88972 28028 128 318444 0 0 0 0 1163 190 0 20 80 0
 1 0 88972 28028 128 318444 0 0 0 0 1136 373 33 0 67 0
 0 0 88972 28004 128 318444 0 0 0 0 1182 327 14 29 57 0
 1 0 88972 28004 128 318444 0 0 0 0 1151 235 14 14 71 0
[1]+ Done sar 1 10 >sar

Now I'm really confused. What is the actual CPU utilization? And especially, which one is used by powernowd to control my CPU frequency?

Thanks in advance,
Nikolaus

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Kurt Kraut
Solved:
Last query:
Last reply:
Revision history for this message
Kurt Kraut (kurtkraut) said :
#1

I'm not an expert in this subject but I will try to add something.

There is not a real-time CPU utilization measurement system. There are only programs that check the CPU usage with a certain frequency, like checking once at each 500ms.

Because it is impossible to run two or more programs at the same time, the checking cycle of these programs will not be alway the same, so they will show you different numbers.

And they are so different because CPU usage changes a lot in a very short period of a time.

This is what I thought about that. If you discover any other reason, please, let me know.

Revision history for this message
Nikolaus Rath (nikratio) said :
#2

Seems that this is just bug #30557

Revision history for this message
James (jasch1) said :
#3

With new Feisty control panel visible. 99-100 percent of
cpu time. I had not noticed this before some updates today.
Click control panel off and cpu time goes to 9 percent. If this
is real, nothing else can be "run" with Control Panel visible.