[mrtg] rrd

Perry, Duane PerryD at missouri.edu
Wed Jun 20 15:17:29 MEST 2001

I have been graphing cpu utilization on a Bay router using the OID's for
cpu-used/cpu-available and the dorelpercent option.  I am trying to convert
this to rrd but the original config did not work.  I wrote a small script
that delivers a number between 0-100.  I present it in the traditional form
for MRTG, 4 lines, {number number uptime device}.  The perl script will give
me the right numbers but rrd and 14all.cgi are not cooperating.  I tried
using the rrdtool dump to see what is being logged but it is mostly zeroes
with occasional 200-600% entries.  The graphs are always empty. The MRTG
docs mention using external scripts and the format for presenting the info
to rateup.  Is it the same for rrdtool?  

Here is the orignal that works with rateup:

Target[cpu-10]: at 128.2
Options[cpu-10]: growright, dorelpercent, nopercent

This is the new config that does not work:

Target[cpu-10]: `/var/www/mrtg/cfg/perl/routercpu.pl`

Here is the script that it calls:


use lib "/usr/lib/perl5/site_perl/5.6.0/i386-linux/";
use SNMP_util;

$_ = `snmpget 128.206.x.x public enterprises.`;
        /= (\d+)/;
        $cpua = $1;
$_ = `snmpget 128.206.x.x public enterprises.`;
        /= (\d+)/;
        $cpub = $1;
        print "$cpua\n$cpub\nN/A\nCPU percentage\n";

Duane Perry
Lan Engineer - University of Mo. - Columbia

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