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 a server running Apache/Joomla. From time to time (on a reasonably regular basis), CPU pins at 100%, but nothing is happening in the access logs.

Any ideas how to track down what the issue is?


 top - 11:31:48 up 30 days, 20:00,  1 user,  load average: 1.06, 1.07, 0.96
Tasks: 115 total,   2 running, 113 sleeping,   0 stopped,   0 zombie
Cpu(s):  4.6%us, 19.8%sy,  0.0%ni, 74.8%id,  0.0%wa,  0.0%hi,  0.0%si,  0.8%st
Mem:    536684k total,   493960k used,    42724k free,     2456k buffers
Swap:  1048568k total,   598532k used,   450036k free,    37880k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
22284 apache    20   0  350m  37m 6224 R 97.4  7.1  59:22.05 httpd
    1 root      20   0 10280  192  168 S  0.0  0.0   0:00.08 init
    2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd
    3 root      RT   0     0    0    0 S  0.0  0.0   0:00.21 migration/0
share|improve this question
    
Does your logging work in general? –  Christopher Perrin Feb 22 '13 at 17:49
    
As in access_log? Yes. –  Disco Feb 22 '13 at 22:04
add comment

1 Answer

You could enable mod_status to see what the server is doing then.

You could also add %D (the time taken to serve the request, in microseconds) to your log config and look for requests that take a long time to service.

You could also strace the process.

share|improve this answer
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.