[mrtg] bytes v/s bits

Steve Shipway s.shipway at auckland.ac.nz
Mon Oct 27 22:48:03 CET 2008

> And more than that, it is only default for Target(s)[]: following the
> Options[_]: statement.

Even worse - if you are using Routers2, then the LAST [_] definition is the default for ALL Targets.  When the Routers2 parser was written, the behaviour of the MRTG parser for multiple default definitions was not defined, so there is a bit of a discrepancy.  Having multiple default definitions for the same directive and Routers2 is not a good mix.

Routers2 also has slightly different global defaults in that 'bits' mode is set automatically on Targets identified as network interfaces, and needs to be turned off if you don't want it.

> > And Dan MacDonald's question may also be very important... you can set
> > all the options you want but if the front-end doesn't use them...

Very true... e.g. 'growright' is ignored by Routers2.

> I'm trying to remember if the stored value in the rrdfile is in bits, or
> if it is always bytes and the display always does the multiplication.
> Seems like sometimes you need to re-create the rrd/logfile when you
> change the options.

The RRD file stores the values in bytes, as retrieved from the device.  Actually, it stores whatever is the output of the Target line, son (in the case of interface traffic) this is in octets, or bytes.

The display frontend will multiply all values (and MaxBytes[]) by 8 if it sees the 'bits' option.  This is in addition to any Factor[] definition and 'perminute' option which are also done at this point.


More information about the mrtg mailing list