The Holy Java

Building the right thing, building it right, fast

Monitoring process memory/CPU usage with top and plotting it with gnuplot

Posted by Jakub Holý on October 17, 2018

siege-c3e2

If you want to monitor the memory and CPU usage of a particular Linux process for a few minutes, perhaps during a performance test, you can capture the data with top and plot them with gnuplot. Here is how:

Run this script (perhaps via nohup) to capture the data:

then plot them via ./usage-plot.gp top.dat top.png:

Advertisements

Sorry, the comment form is closed at this time.

 
%d bloggers like this: