Precise 5.6.1: How to read CPU usage?

Booting, installing, newbie
Post Reply
Message
Author
User avatar
Omega
Posts: 37
Joined: Wed 12 Jun 2013, 09:50
Location: Germany

Precise 5.6.1: How to read CPU usage?

#1 Post 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?

User avatar
scabz
Posts: 364
Joined: Thu 30 Apr 2009, 18:14
Location: Tallahassee FL US
Contact:

#2 Post 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

User avatar
Keef
Posts: 987
Joined: Thu 20 Dec 2007, 22:12
Location: Staffordshire

#3 Post 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,

User avatar
Omega
Posts: 37
Joined: Wed 12 Jun 2013, 09:50
Location: Germany

#4 Post by Omega »

So it shows the number of processes. That's an interesting theory.

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#5 Post 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 .
«Give me GUI or Death» -- I give you [[Xx]term[inal]] [[Cc]on[s][ole]] .
Macpup user since 2010 on full installations.
People who want problems with Puppy boot frugal :P

User avatar
Omega
Posts: 37
Joined: Wed 12 Jun 2013, 09:50
Location: Germany

#6 Post 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.

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#7 Post 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? :?

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#8 Post 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

User avatar
Omega
Posts: 37
Joined: Wed 12 Jun 2013, 09:50
Location: Germany

#9 Post 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?

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#10 Post 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
«Give me GUI or Death» -- I give you [[Xx]term[inal]] [[Cc]on[s][ole]] .
Macpup user since 2010 on full installations.
People who want problems with Puppy boot frugal :P

User avatar
Omega
Posts: 37
Joined: Wed 12 Jun 2013, 09:50
Location: Germany

#11 Post by Omega »

Thanks. I think I now have an idea what "load" is (compared to pure CPU usage).

Post Reply