[mrtg] Help with mrtg.cfg units conversion

Steve Shipway s.shipway at auckland.ac.nz
Mon Sep 8 01:12:27 CEST 2008


> I am not sure if the lines 3 &4 above are important and without them I
> will
> still be able to graph correctly inputs for the top two lines.

You can safely leave lines 3 and 4 blank if you want (although they should exist).  In fact, if you use MRTG with RRDtool then they are discarded in any case.

> current SNR values of a DSL modem.  The sync speeds are in the 6500 to
> 7616 kbits/second range, while the the SNR values are from -1 to +9dB.
>
> Under Options, I have set them up both as gauge, but the MaxBytes must be
> wrong because sync speed shows 60.2kb/s (instead of 7616kbps) and SNR
> shows as 48b/s and this is shown at the very top of the scale (instead of
> 6.0 dB).
...
> Title[modem-sync]: 2WIRE 1800HG BRIDGED MODEM
> PageTop[modem-sync]:2WIRE 1800HG sync speed
> Options[modem-sync]: bits, gauge, expscale, noinfo, growright, nobanner
> Target[modem-sync]: `/usr/bin/perl /home/michael/test.1800HG-v00e1.pl`
> MaxBytes[modem-sync]: 12500000

This maxbytes value corresponds to 100Mbps (12500000 x 8 = 100Mbps).  Are you SURE that your script is outputting values in bytes/sec, and not in kbits/sec or bytes total?

> Title[modem-snrm]:  2WIRE 1800HG SNRM
> PageTop[modem-snrm]:2WIRE 1800HG SNRM
> Options[modem-snrm]: bits, gauge, expscale, noinfo, nopercent, growright,
> nobanner
> Target[modem-snrm]: `/usr/bin/perl /home/michael/test.1800HG-v00e2.pl`
> MaxBytes[modem-snrm]: 1250000

If this script is giving values from -1 to 9, then you should have
MaxBytes[modem-snrm]: 9
and NOT the 'bits' option (which multiplies by 8).

I think you should check the output of your script.  Make sure the numbers are being printed in bytes/s for modem-sync, if not, then you may need to remove the bit or gauge options, or change your maxbytes appropriately.  Make sure the values are being printed as straight floats, not in exponential notation.  Also, if you are not using RRDtool (which it looks like is the case) then you've a problem as native MRTG alone doesn't like to handle negative or decimal numbers.

Steve



More information about the mrtg mailing list