Many things can cause a CPU usage spike.

If you don't already know, then the first step is finding out
what process is spiking.

When I ran an active website for several years, I developed
a very efficient monitoring program, that watched the system
and recorded when a program was consuming more CPU or
memory than was normal.

This monitoring program consumes almost no resources when
the system is not overloaded, and very few resources even when
it is overloaded.  You can set command line options to specify
what details you want to see of processes causing an overload,
and what constitutes an overload worth reporting.

I just now uploaded this program to:

https://github.com/ThePythonicCow/batch_top

I left this program running all the time, in the background,
on the webserver I managed, and referred to the output
when some unexpected overload started causing a problem.

-- 
                Paul Jackson
                [email protected]

Reply via email to