[mrtg] /proc/stat question
Sturgis, Grant
GSturgis at arraybiopharma.com
Tue Feb 10 21:22:30 MET 2004
Greetings All,
I am monitoring CPU utilization using /proc/stat/ on Linux 2.4.19. Specifically, I am running:
Target[system.cpu]:`ssh -l mrtg system 'cat /proc/stat' | awk '/cpu0/ {printf("%s\n%s\n",$2,$5); }'`
The idea was taken from:
http://net-snmp.sourceforge.net/tutorial/mrtg/
and I am just using ssh instead of snmp. The user CPU time appears higher using this method than casual observation of `top`. I believe that watching the raw CPU counters in /proc/stat/ should be more accurate than load average or other `top` counters, but I am not certain.
Can anyone comment on this method and why it may differ from `top`?
Thanks in advance,
Grant
This electronic message transmission is a PRIVATE communication which contains
information which may be confidential or privileged. The information is intended
to be for the use of the individual or entity named above. If you are not the
intended recipient, please be aware that any disclosure, copying, distribution
or use of the contents of this information is prohibited. Please notify the
sender of the delivery error by replying to this message, or notify us by
telephone (877-633-2436, ext. 0), and then delete it from your system.
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://www.ee.ethz.ch/~slist/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the mrtg
mailing list