[mrtg] Help with mrtg.cfg units conversion

Mick michaelkintzios at gmail.com
Mon Sep 8 23:51:42 CEST 2008


On Monday 08 September 2008, you wrote:
> > 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.

I am not using RRDtool and would love to collect these two additional lines, 
but my regex-Fu is rather weak (errm, non-existent actually).  If anyone 
could help this is the page of the router I am currently scraping, which also 
contains the uptime:

http://pastebin.com/m21effdc

If you also explain the regex in English I might be able to learn from it and 
stop bothering you.  :-)

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

It outputs 7616, which means kbps, or 7616000 bits/s.  What should I set 
MaxBytes to?  I've tried different values but I don't seem to get this right.  
Adding/removing zeros at the end does not change it.  It seems stuck at 
showing 60.9kb/s instead of 7616kbps.

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

Excellent!  Removed 'bits' and changed MaxBytes to 9.  This is now fixed 
nicely.  :-)

Thank you very much!
-- 
Regards,
Mick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.oetiker.ch/pipermail/mrtg/attachments/20080908/bfbe83f3/attachment-0001.bin 


More information about the mrtg mailing list