[mrtg] Re: MRTG error message...

Alex van den Bogaerdt alex at ergens.op.het.net
Thu Sep 19 01:40:01 MEST 2002


On Wed, Sep 18, 2002 at 02:52:44PM -0400, Alex Nguyen wrote:

> ERROR: Target[total-octets][_OUT_] ' $$target[15]{$mode}  + $$target[16]{$mode} ' evaluated to'1.0720379831099e+15' instead of a number


> ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCOutOctets.7 = Counter64: 536514379708212
> ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCOutOctets.12 = Counter64: 535537007506381

Well, the numbers seem to match:

    echo 536514379708212 + 535537007506381 | bc

    1072051387214593

which is 1.072051387214593 * 10^15.


This is line 355..356 in ..../bin/mrtg

This of course assuming you are running the most recent MRTG.

> It there any work around for this ?

perl -e '$i=536514379708212 + 535537007506381;print $i;'

doesn't complain but does use the scientific notation.

perl -e '$i=1.07205138721459e+15;$j=1.0720379831099e+15;$k=$i-$j;print $k;'

does print 13404104690 so I guess perl will do fine.  It may be
possible that the numbers loose precision thus calculations
aren't done as accurately as before.

For a workaround you will need to convince MRTG that it is
alright to use numbers in scientific notation when it is
processing numbers for/from the first line of the .log file.

Note that the 2nd line and further are limited to 32 bits;
you will get into trouble again if you have *rates* in that
range.

Don't know much about perl so I cannot help further.

HTH
Alex

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