0

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
Disco
  • 375
  • 2
  • 4
  • 12

1 Answers1

3

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.

Mark Wagner
  • 18,019
  • 2
  • 32
  • 47