[mrtg] Re: Odd MRTG Behaviour

Graeme Fowler G.E.Fowler at lboro.ac.uk
Thu Mar 30 15:44:38 MEST 2000


On 30-Mar-2000 Jason Jordan wrote:
> I suspect that MRTG does the following:
> 
> MRTG adds all the interfaces together and then calculates the
> difference from the previous collection.  Considering any of these
> 100mbit interfaces may have reached the 32bit rollover, adding in this
> manner is likely to generate inaccurate results.

Dead on. When it does the poll, no calculation is done. You're
specifying a *target* - the delta is calculated from the value returned
by the poll and any maths you defined in the target line.
 
> What I think MRTG should do:
> 
> Calculate the difference for each interface, then add them together. 
> In this way it would be far easier to calculate when a 32 bit
> rollover has occured.

Ooooh, asking a bit much here ;)

> Could someone verify this?  I have a specific need for this
> functionality and I'm postive someone must have come across this
> before!

If you *really* need this, write yourself a script to return that value
and call the script from MRTG (RTFM to see how this is done).

If you wanted to be really sneaky, you could this:

1. Poll all three interfaces separately from different config
   sections/files (different targets)
2. After a set period (like, say, just *before* the next polling run -
   this way you can be sure the data is there) get the information from
   each interface's logfile (again, RTFM for the format) by using a
   Perl or shell script or similar and combine them whichever way you  
   want.
3. Return *that* value to MRTG as the value for a different target.

Voila! One nice graph for each interface and one for the combination.

Enjoy ;)

Graeme

-- 
Graeme Fowler
Network Officer, Infrastructure & Networks Group
Loughborough University Computing Services

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



More information about the mrtg mailing list