[mrtg] Re: cpu load onRedHat 6.x and 7.x

Thomas Sanders tsanders at logicx.com
Mon Feb 10 20:43:31 MET 2003


Hello Tom, and the mrtg list!

I have received so much from this list, I am glad I can give back to it.
Here is what I removed from my scripts, you may or may not need to do 
things differently.

===== mrtg.cfg =====
# Load
Target[load]: `/etc/mrtg/load.sh`
Title[load]: Load Averages (x 100)
PageTop[load]: <h3>Load Averages</h3>
YLegend[load]: Load Averages
ShortLegend[load]: &nbsp;&nbsp;&nbsp;
LegendI[load]: 5-minute Load&nbsp;
LegendO[load]: 15-mintute Load&nbsp;
Options[load]: growright,gauge


===== load.sh =====
#!/bin/sh
# CPU Load
INDATA=`cat /proc/loadavg | cut -d ' ' -f2 | sed 's/\.//g' | sed 's/^0//g'`
OUTDATA=`cat /proc/loadavg | cut -d ' ' -f3 | sed 's/\.//g' | sed 's/^0//g'`

#Output DATA
echo $INDATA
echo $OUTDATA
echo `uptime | cut -d"," -f1,2`
echo $TYPE
==========================

I hope this helps!

-Thomas Sanders

At 05:15 AM 2/10/2003, you wrote:

>Hi,
>
>I've been setting up MRTG and all is well. However i can't seem to find any
>examples of an mrtg.cnf to do with monitiring cpu load on a redhat box.
>
>Would anyone please post a snip of their mrtg.cnf so i can look over it
>please?
>
>thanks
>
>Tom
>
>--
>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


--
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