Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have this output from top for the top 10 processes sorted by CPU usage descending:

top - 11:19:58 up  1:46,  2 users,  load average: 3.22, 3.48, 3.34
Tasks:  66 total,   5 running,  61 sleeping,   0 stopped,   0 zombie
Cpu(s): 77.5%us, 14.7%sy,  0.0%ni,  7.0%id,  0.9%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   1048576k total,   299012k used,   749564k free,        0k buffers
Swap:        0k total,        0k used,        0k free,        0k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 7982 kenilwo   17   0  160m  53m  23m R  4.2  5.2   0:00.63 php
 7984 kenilwo   17   0  158m  51m  23m R  2.5  5.1   0:00.38 php
32245 mysql     15   0  214m  25m 4924 S  0.9  2.5   0:38.58 mysqld
32592 root      15   0 90724  26m  592 S  0.1  2.6   0:03.85 memcached
 1491 nobody    15   0 72336 3572 1656 S  0.1  0.3   0:00.43 httpd
 1495 nobody    15   0 72336 3560 1644 S  0.1  0.3   0:00.41 httpd
 1503 nobody    15   0 72200 3556 1656 S  0.1  0.3   0:00.43 httpd
 5992 root      15   0 12732 1264  956 R  0.1  0.1   0:01.80 top
32425 nobody    15   0 72192 3676 1784 S  0.1  0.4   0:00.47 httpd
32427 nobody    15   0 72332 3704 1784 S  0.1  0.4   0:00.44 httpd

What is odd is that it reports that 77.5% of the CPU resources are being used by user processes, yet, when I look at the top 10 processes, their usage is less than 10% (other processes on the system do not have CPU usage).

What's going on? What is purloining my CPU resources?

share|improve this question
    
Heh, nice load average. Somethings throttling your stuff. What distro are you running? Can you grab htop utility from your package manager? –  Tim Dec 22 '11 at 19:37
    
@Tim, can you post your suggestion as an answer so that I can mark it as correct? htop showed me some procs that top was hiding; I think that these were system processes running from the /usr/sbin directory. –  Tola Odejayi Dec 22 '11 at 20:17
    
There you go sir. Glad it helped ;) –  Tim Dec 22 '11 at 20:47
add comment

2 Answers

up vote 0 down vote accepted

I suggest using the utility htop if it is available in your package manager. Top doesn't always show everything depending on the distro you are using based on my past experiences.

share|improve this answer
add comment

When presented with a similar issue recently I had a look at the rest of the processes. As it happened, none of them were using a lot of the CPU but all of them combined amounted to far more than just the top few.

share|improve this answer
    
I've seen this myself - a lot of dinky processes using 0.1% - 0.5% can add up pretty quick (and given your load average I wonder how many httpd processes you have dong little bursts of CPU activity...) –  voretaq7 Dec 22 '11 at 21:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.