[mrtg] CPU Load show with MRTG

Materny Rezső materny.rezso at 4com.hu
Fri May 19 10:35:55 MEST 2006


Dear All

Pls help me in the following problem:
I would like to show my servers's CPU's Loads but my script isnt work well.
Thus nothing.

Script:

WorkDir: /srv/www/htdocs/mrtg/test/cpu/
Target[pg1-cpuload]:`sh /etc/test/cpuload.sh`
Options[pg1-cpuload]: integer
MaxBytes[pg1-cpuload]: 100
ABSMax[pg1-cpuload]: 100
ShortLegend[pg1-cpuload]: Load
YLegend[pg1-cpuload]: LOAD %
Title[pg1-cpuload]: CPU LOAD
LegendI[pg1-cpuload]: cpuload New
LegendO[pg1-cpuload]: cpuload Old
PageTop[pg1-cpuload]: <H1> CPU LOAD </H1

sh:

#!/bin/sh
/bin/echo `cat /proc/loadavg | /usr/bin/cut -b1-4`
/bin/echo `cat /proc/loadavg | /usr/bin/cut -b6-9`
/bin/echo days
/bin/echo 192.168.10.16

If I run sh from line to line then the got results are good.
I think the problem is with Options, but I dont know How can I fix it.

Thanks
Rezső



--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://lists.ee.ethz.ch/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the mrtg mailing list