LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-11-2010, 09:50 AM   #1
ahmedb72
Member
 
Registered: Jan 2006
Location: Sydney
Distribution: RHEL
Posts: 72

Rep: Reputation: 15
CPU% in top


Hi,

In output of a top utility, why summation of CPU% is much greater than 100%?

I have RHEL 5.2 with two processors.

Code:
top - 00:46:11 up  1:14,  4 users,  load average: 3.41, 4.17, 3.13
Tasks: 168 total,   6 running, 162 sleeping,   0 stopped,   0 zombie
Cpu(s): 22.1%us, 71.8%sy,  0.0%ni,  6.1%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   2075608k total,  1948420k used,   127188k free,    69192k buffers
Swap:  4194296k total,        0k used,  4194296k free,  1599396k cached

%CPU   PID USER      PR  NI  VIRT  RES  SHR S %MEM    TIME+  COMMAND
  32 10133 oracle    16   0 1169m 113m 108m S  5.6   2:24.27 oracleora11gr2 (LOCAL=NO)
  31 10094 oracle    16   0 1169m 113m 108m S  5.6   2:24.41 oracleora11gr2 (LOCAL=NO)
  27 10151 oracle    16   0 1169m 113m 108m R  5.6   2:22.67 oracleora11gr2 (LOCAL=NO)
  26 10131 oracle    16   0 1169m 113m 108m S  5.6   2:22.91 oracleora11gr2 (LOCAL=NO)
  26 10149 oracle    15   0 1169m 113m 108m R  5.6   2:24.03 oracleora11gr2 (LOCAL=NO)
  25 10155 oracle    16   0 1169m 113m 108m S  5.6   2:21.39 oracleora11gr2 (LOCAL=NO)
  22 10139 oracle    15   0 1169m 113m 108m S  5.6   2:19.27 oracleora11gr2 (LOCAL=NO)
 
Old 09-11-2010, 10:00 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Because you have two processors. You get 100% per core, so you would have a max of 200%.
 
Old 09-11-2010, 10:00 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by ahmedb72 View Post
Hi,

In output of a top utility, why summation of CPU% is much greater than 100%?

I have RHEL 5.2 with two processors.

Code:
top - 00:46:11 up  1:14,  4 users,  load average: 3.41, 4.17, 3.13
Tasks: 168 total,   6 running, 162 sleeping,   0 stopped,   0 zombie
Cpu(s): 22.1%us, 71.8%sy,  0.0%ni,  6.1%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   2075608k total,  1948420k used,   127188k free,    69192k buffers
Swap:  4194296k total,        0k used,  4194296k free,  1599396k cached

%CPU   PID USER      PR  NI  VIRT  RES  SHR S %MEM    TIME+  COMMAND
  32 10133 oracle    16   0 1169m 113m 108m S  5.6   2:24.27 oracleora11gr2 (LOCAL=NO)
  31 10094 oracle    16   0 1169m 113m 108m S  5.6   2:24.41 oracleora11gr2 (LOCAL=NO)
  27 10151 oracle    16   0 1169m 113m 108m R  5.6   2:22.67 oracleora11gr2 (LOCAL=NO)
  26 10131 oracle    16   0 1169m 113m 108m S  5.6   2:22.91 oracleora11gr2 (LOCAL=NO)
  26 10149 oracle    15   0 1169m 113m 108m R  5.6   2:24.03 oracleora11gr2 (LOCAL=NO)
  25 10155 oracle    16   0 1169m 113m 108m S  5.6   2:21.39 oracleora11gr2 (LOCAL=NO)
  22 10139 oracle    15   0 1169m 113m 108m S  5.6   2:19.27 oracleora11gr2 (LOCAL=NO)
22.1 + 71.8 + 6.1 (idle!) = 100.00 %

What gave you the idea that more then 100% was used. BTW: a bit higher then 100% is possible due to rounding "errors".
 
Old 09-11-2010, 10:05 AM   #4
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
I think he means the %CPU column, druuna

BTW, ahmedb72, try hitting the '1' key to switch between showing one line per core and the summary line at the top.

Last edited by AlucardZero; 09-11-2010 at 10:07 AM.
 
Old 09-11-2010, 10:10 AM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,
Quote:
Originally Posted by AlucardZero View Post
I think he means the %CPU column, druuna
I guess he does

To "merge" both our replies:

As implied by AlucardZero: the percentage in front of the individual process is seen from one cpu. Adding them all together can reach 100 X number of cpu's (200% in your case).

The line I mention: Cpu(s): 22.1%us, 71.8%sy, 0.0%ni, 6.1%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st shows the stats for the combined cpu's and 100 % (or a little higher) is the maximum when added together.

Hope this gets rid of any confusion
 
Old 09-11-2010, 10:42 AM   #6
ahmedb72
Member
 
Registered: Jan 2006
Location: Sydney
Distribution: RHEL
Posts: 72

Original Poster
Rep: Reputation: 15
Hi AlucardZero,
It seems your answer was right. Thanks a lot.


Hi druuna,
I'm counting the column CPU%
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CPU usage from top jr8rdt Linux - Newbie 10 08-17-2011 06:46 AM
Finding the top CPU-using processes? "top" command does not help... catalytical Linux - Server 1 04-06-2009 04:50 PM
Definition of top cpu states MikeyCarter Linux - Software 1 05-29-2008 09:24 PM
top - uptime - %CPU otoomet Linux - Software 6 03-24-2006 04:55 PM
see one cpu instead 2 with hyperthreading in top? balki Linux - Hardware 5 06-22-2004 03:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

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