LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-02-2008, 12:18 AM   #1
pii.ajah
LQ Newbie
 
Registered: Dec 2008
Posts: 4

Rep: Reputation: 0
Why %CPU total not equal to cpu(s) usage?


Hi All...

I'm a newbie in linux world.
I have tried to google for top command, but til now I cannot find any information why %CPU(in detail) total is not equal to cpu(s) usage(in summary part) (or is %CPU and cpu(s) usage are different function?)
Can someone tell me why are these values is different?

my machine is single core.
customize linux with kernel 2.4.32

thanks.
 
Old 12-02-2008, 01:24 AM   #2
zeno0771
Member
 
Registered: Jun 2006
Location: Northern IL
Distribution: Arch64
Posts: 106

Rep: Reputation: 19
If I understand you right, it can be explained by a couple of things:

1. Total CPU usage is a combination of user load, system load, and nice load. A number of things are going on in the background that will take up CPU cycles. CPU % is, generally speaking, how much of the CPU is being utilized at any given time; therefore these numbers may not be equal at a specific point in time, nor will they always add up to an even 100%.

2. There may also be a slight difference or delay in reporting times for various parameters depending on motherboard and/or CPU sensors; you have to remember that modern CPUs complete more than a billion clock cycles per second. A program capable of measuring CPU usage at that high a resolution would likely consume a large amount of CPU cycles itself just to operate, thereby skewing the results further.

I tend to pay fairly close attention to CPU performance myself as I've overclocked my Quad. I use GKrellm to monitor the core % usage and temperatures, and I have GKrellm set to do 10 updates per second, which I feel is a fair balance between accuracy and usage. This is adjustable, but as I've said previously, the higher the resolution (i.e. number of updates per second) the more CPU GKrellm itself will use.

Hope that helps.
 
Old 12-02-2008, 08:30 PM   #3
pii.ajah
LQ Newbie
 
Registered: Dec 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Hi zeno

Thanks a lot, now I understand.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
getting total cpu utilization using c theog Programming 2 03-19-2005 04:41 PM
getting realtime info on memory usage-cpu and harddrive usage steering Linux - Newbie 5 03-03-2005 08:43 PM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 04:45 AM
Calculating total %cpu usage from /proc/stat gaijin Programming 1 07-07-2004 02:45 AM
Controlling CPU usage & memory usage Saravana babu Linux - Software 0 02-18-2004 05:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration