I have a server running CentOS Linux, and very rarely (maybe once every 3 months) something happens that causes it to have an exceptionally high CPU load (400%) that causes the server to basically freeze up.

The problem I have is that when I reboot the server, I can't figure out what caused the spike. I tried setting up a cron job to occasionally dump to a log file the top 10 CPU processes, but when the CPU load is high the cron job apparently won't run either.

I'm sort of new to running a server, so I'm hoping you guys might have some advice on how I could better log the processes and figure out what's causing the sudden spike the next time it happens. I'm sure it's just a script or process that goes out of control, but until I can figure out which one it is I'm sort of at a loss...

Thanks for any help you can provide!

merged by splattne Sep 21 '10 at 7:06

This question was merged with Massive CPU usage spike, How do I find out what causes it? because it is an exact duplicate of that question.

migrated from stackoverflow.com Sep 20 '10 at 22:13

This question came from our site for professional and enthusiast programmers.