At the moment I am using a python script to log the output from cat /proc/loadavg to a file. I then use gnuplot to periodically graph the CPU load for my viewing pleasure.
However, I really would like to have a graph that shows percentages of CPU usage (%user and %sys, etc.) instead. I can see that top can get to those numbers, since they are displayed at the third line of its output. However, I have not been able to figure out how or where top gets that information. Google is no help either, it just points me to either /proc/loadavg or problems people are having with high CPU loads.
Any hints on how I would be able to log those numbers (preferably as 5-minutes averages) to a file would be greatly appreciated.
sysstatinstalled. I can only getsarto hand me 10 minute averages. Andmpstats numbers don't compare with those fromtop. – Mausy5043 May 11 '14 at 11:39top, butmpstatis a bit of a strain on an embed system. Let me look into that further. – Mausy5043 May 11 '14 at 11:45