Page 1 of 1

Precise 5.6.1: How to read CPU usage?

Posted: Sun 14 Jul 2013, 14:46
by Omega
Sorry, if I ask something that was asked once. But I wasn't able to find an satisfying answer.

I have the following understanding problem:

In the lower right corner there is a small diagram-like thing that shows the CPU usage. Sometimes I think the current CPU utilization is 98% or 99%. But in the next minute the diagram splits itself up into two areas with a horizontal dividing line and it looks like only 48% or 49% percent is used. Sometimes it even splits up into three or four areas.

At first I thought this is an display error caused by a wrong graphics card driver.

The problem is: I don't understand what % usage is being displayed. In how many areas can the diagram split itself up? And when is 100% reached?

Posted: Sun 14 Jul 2013, 15:01
by scabz
sorry i cant really help you much, dont know much about xload. i use htop to watch my cpu usage.

info on xload http://www.x.org/releases/X11R7.6/doc/m ... ad.1.xhtml
wikipedia.org http://en.wikipedia.org/wiki/Xload

Posted: Sun 14 Jul 2013, 19:10
by Keef
Look here for an explanation of xload in puppy:
http://murga-linux.com/puppy/viewtopic.php?t=28483

Apart from htop, you can use Conky or Pwidgets (which uses a version of Conky) to display CPU usage on the desktop,

Posted: Mon 15 Jul 2013, 06:44
by Omega
So it shows the number of processes. That's an interesting theory.

Posted: Mon 15 Jul 2013, 20:12
by Karl Godt

Code: Select all

cat /proc/loadavg
in the console shows the xload values . There is no percentage limit . Lupu-5 with openbox and fbpanel had a cpu meter instead of a load meter in the tray .

Posted: Tue 16 Jul 2013, 05:51
by Omega
Thanks.

But to be honest, I still have no clue how to interpret this diagram in the lower right corner. Even if it has something to do with the number of processes I can't figure it out.

If it has no percentage limit, then what's the point?

It's not that I necessarily need a CPU meter. I just want to understand what the diagram wants to tell me if it is already there.

Posted: Tue 16 Jul 2013, 06:28
by Sylvander
Omega wrote:...to be honest, I still have no clue how to interpret this diagram in the lower right corner. Even if it has something to do with the number of processes I can't figure it out...I just want to understand what the diagram wants to tell me...
Same here.
I get the idea that the more lines there are, the more processes...
Or is it threads?
So more processes tends to result in a higher % of processor usage...
But not necessarily? :?

Posted: Tue 16 Jul 2013, 19:41
by Karl Godt
/proc/loadavg
The first three fields in this file are load average figures
giving the number of jobs in the run queue (state R) or waiting
for disk I/O (state D) averaged over 1
, 5, and 15 minutes. They
are the same as the load average numbers given by uptime(1) and
other programs. The fourth field consists of two numbers sepa-
rated by a slash (/). The first of these is the number of cur-
rently executing kernel scheduling entities (processes,
threads); this will be less than or equal to the number of CPUs.
The value after the slash is the number of kernel scheduling
entities that currently exist on the system. The fifth field is
the PID of the process that was most recently created on the
system.
http://man.he.net/man5/proc

Posted: Wed 17 Jul 2013, 15:30
by Omega
I make the following assumptions regarding the diagram:

a) You can't tell the CPU usage with it (because it's supposed to represent the systems overall performance which depends on various factors like CPU speed, HD speed, Swap Partition size, RAM size etc).

b) It tells how many processes are waiting for execution (the more the worse).

c) When there are permanently many horizontal lines in the diagram then the system needs to be somehow optimized.

d) When most of the time there is none (or only one) horizontal line then then system performance is good.

Right?

Posted: Wed 17 Jul 2013, 23:50
by Karl Godt
a) True and partly you can . CPU is working always . Finished programs and their finished commands aren't in the queue anymore, thus making the CPU work less . If you run a program that calls itself in a never ending loop without any sleep value inside the loop for example, the loadavg easily might reach values up to 10 and more :

Code: Select all

#!/bin/sh
while [ 1 = 1 ] ; do
echo "while loop .."
# do more commands here
# sleep 0.5
done

b) Think so too .

c) Use top or htop to see which programs are eating up CPU percentage - they likely increase the load .

Code: Select all

top -n1
Mem: 1443928K used, 2562548K free, 0K shrd, 99820K buff, 1021900K cached
CPU: 19% usr 4% sys 0% nic 76% idle 0% io 0% irq 0% sirq
Load average: 1.40 1.37 1.08 2/124 20359
PID PPID USER STAT VSZ %VSZ CPU %CPU COMMAND
1236 1001 root S 148m 4% 0 19% /opt/browsers/seamonkey-2.12b5/plugin-container /usr/lib/mozilla/plugins/libflashplayer.so -greomni /opt/browsers/s
1001 4305 root S 367m 9% 0 0% /opt/browsers/seamonkey/seamonkey
Above example shows that mozilla's flashplayer treatment needs optimation - or flashblock and FF .

d) No horizontal line is best .
See −scale integer option at
http://www.x.org/releases/X11R7.6/doc/m ... ad.1.xhtml
http://en.wikipedia.org/wiki/Xload

Posted: Thu 18 Jul 2013, 05:42
by Omega
Thanks. I think I now have an idea what "load" is (compared to pure CPU usage).