[mrtg] External programs with MRTG

Richard Furda rfurda at best.ca
Tue Oct 26 08:02:44 MEST 1999


	Hello,

I have a problem with MRTG graphing for external programs.

my mrtg.cfg has:

Target[cpu]:		'/usr/local/apache/mrtg/cpu/get-cpu-stats'
MaxBytes[cpu]:	100
Options[cpu]:         	growright, bits
Title[cpu]:             	CPU states for daemon.best.ca
PageTop[cpu]:      	<H1><center>CPU states for daemon.best.ca</center></H1>
Directory[cpu]:    	cpu

/usr/local/apache/mrtg/cpu/get-cpu-stats has:

ps -aux | awk '{k+=$3} END {print 0; print k}'
top | head -n 1 | awk '{print $10}'
echo $HOSTNAME

which prints out:

su-2.03# ./get-cpu-stats
0
88.3
3+20:47:52
daemon.best.ca

MRTG graphs show 0.00 %. Any ideas?

Also, is it possible to graph only 1 item and not 2 ?

Thanks,
Rich

--
* To unsubscribe from the mrtg mailing list, send a message with the
  subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg


More information about the mrtg mailing list