I want to graph (graphical output would be great, i.e. a .png file) the following situation: I have users A, B, and C. I limit their resources so that when all users run a CPU intensive task at the same time, those processes will use 25%, 25%, and 50% of CPU. I know I can get the real-time stats using top
but have no idea what to do with them. I've searched through the huge top
man page but haven't found much on the subject of outputting data that can be graphed. Ideally, the graph would show a span of maybe 30 seconds. Any ideas how to achieve this?
Linux Performance Monitoring – Graphing Per-User CPU Usage
cpu-usagegraphlinuxperformance-monitoring
Best Answer
Batch mode could be useful:
For example:
Ganglia Gmetric can be used to plot a graph for this.
cpu_per_user_gmetric.sh
crontab -l
and here's the result: