Linux top greater than 100 percent - CPU

14 October,2013 by Tom Collins

Question: I was using the Linux top command to monitor the CPU activity on a Linux server hosting.  To my surprise , I saw the CPU at 202% - what?! How can this be?

  

top - 16:45:37 up 127 days,  7:27,  1 user,  load average: 2.21, 2.23, 2.23
Tasks: 153 total,   1 running, 152 sleeping,   0 stopped,   0 zombie
Cpu(s): 24.6% us,  1.1% sy,  0.0% ni, 73.4% id,  1.0% wa,  0.0% hi,  0.0% si
Mem:  24684584k total, 16883612k used,  7800972k free,   608548k buffers
Swap: 12586936k total,    78384k used, 12508552k free, 14552460k cached

  PID USER      PR  NI %CPU    TIME+  %MEM  VIRT  RES  SHR S COMMAND
10257 db2inst1    25   0  202  16895:27 39.6 14.2g 9.3g 9.3g S db2sysc

 

Answer: It is  a useful command , but the high number is supposed to be the aggregate of all the cores.

The Linux top command  offers a continuous, real time look at the CPU activity.

To see a detailed core  breakdown , you’ll need to  type “1” after you’ve executed the command “top” . 

For example , you may see 202% , but once you’ve typed “1” , you may see 8 cores – with various usage levels at below 100% or lower

 

top - 13:36:43 up 129 days,  4:19,  1 user,  load average: 2.13, 2.16, 2.20
Tasks: 155 total,   1 running, 154 sleeping,   0 stopped,   0 zombie
Cpu0  :  0.3% us,  0.3% sy,  0.0% ni, 99.3% id,  0.0% wa,  0.0% hi,  0.0% si
Cpu1  :  0.0% us,  0.3% sy,  0.0% ni, 99.7% id,  0.0% wa,  0.0% hi,  0.0% si
Cpu2  :  0.0% us,  0.0% sy,  0.0% ni, 99.0% id,  1.0% wa,  0.0% hi,  0.0% si
Cpu3  :  9.0% us,  0.7% sy,  0.0% ni, 90.0% id,  0.3% wa,  0.0% hi,  0.0% si
Cpu4  :  0.0% us,  0.0% sy,  0.0% ni, 100.0% id,  0.0% wa,  0.0% hi,  0.0% si
Cpu5  :  0.3% us,  0.0% sy,  0.0% ni, 99.7% id,  0.0% wa,  0.0% hi,  0.0% si
Cpu6  : 96.3% us,  3.7% sy,  0.0% ni,  0.0% id,  0.0% wa,  0.0% hi,  0.0% si
Cpu7  : 96.0% us,  3.0% sy,  0.0% ni,  1.0% id,  0.0% wa,  0.0% hi,  0.0% si
Mem:  24684584k total, 15487164k used,  9197420k free,   648812k buffers
Swap: 12586936k total,    78704k used, 12508232k free, 12221548k cached

  PID USER      PR  NI %CPU    TIME+  %MEM  VIRT  RES  SHR S COMMAND
10257 db2inst1    25   0  209  21499:35 40.2 14.2g 9.5g 9.4g S db2sysc

 Read More Linux and CPU

Display Linux CPU information - DBA DB2

Database tuning and Operating System Tuning - DBA DB2

DB2 Tuning Toolkit – db2exfmt - DBA DB2

Database Tuning overview – Buffer Tuning - DBA DB2

Author: Rambler(http://www.dba-db2.com)

Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on Linux top greater than 100 percent - CPU

Comments are moderated, and will not appear until the author has approved them.


dba-db2.com | DB2 Performance Tuning | DBA DB2:Everything | FAQ | Contact | Copyright