A simple option for graphing CPU usage on a remote Linux Server

Munin is very nice, and easy to install and setup.


For a one off sort of thing, I would get the data using sar (sysstat package) and then graph it with it rrd tool. Here is a script that aids in creating graphs from sar output.


You could try sar grapher at http://www.fsprings.com/neat/sargrapher.html, you upload sar -p -A output on it provides a page with graphs. If you want you can select the sar options you want it will only graph those.


A couple of questions: - do you want to generate plots in real-time? - how often do you want to sample?

A previous comments mentioned 5 minute samples and I have to say if you really want to know what your CPU is doing with any confidence you should really be down in the 10 second range. Averaging things out at 5 minutes will just cause you to miss spikes that could be minutes long! Admittedly 10 second samples could miss 5 second spikes, but you have to figure out what you're trying to see in the data.

Personally I use collectl, probably because I wrote it! ;-)

But it runs very efficiently at low sampling rates (even sub-second) and can even report its output in a format suitable for plotting. In fact if you install collectl-utils and write to a shared directory, you can use colplot to see the data in real time.

One last comment about RRDTool. It's a great package and draws very nice plots, but you do need know if you log a lot of samples for a single day the resultant plots are not accurate. This is because RRDTool normalizes multiple samples into single data points to make the graphs simpler, something colplot never does. It uses gnuplot to make sure every data point that is captured is faithfully plotted.

-mark