[mrtg] Illegal Division By Zero?

Steve Shipway s.shipway at auckland.ac.nz
Wed Jun 20 22:19:48 CEST 2012


Target[192.168.22.2_C-percent-used]: (1.3.6.1.2.1.25.2.3.1.6.2&PseudoZero:public at 192.168.22.2: / 1.3.6.1.2.1.25.2.3.1.5.2&PseudoZero:public!@192.168.22.2:) * 100

You are dividing by zero, hence the error.

This expands out to the following:

IN = (1.3.6.1.2.1.25.2.3.1.6.2:public at 192.168.22.2: / 1.3.6.1.2.1.25.2.3.1.5.2:public!@192.168.22.2:) * 100

OUT = (PseudoZero:public at 192.168.22.2: / PseudoZero:public!@192.168.22.2:) * 100
      =  ( 0 / 0 ) * 100
      = divide by zero error

You should replace the second pseudoZero with pseudoOne, which will not break the calculation (of course Im assuming the 1.5.2 OID never returns zero)

Steve


Steve Shipway
University of Auckland ITS
UNIX Systems Design Lead
s.shipway at auckland.ac.nz<mailto:s.shipway at auckland.ac.nz>
Ph: +64 9 373 7599 ext 86487

________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20120620/64ac55a4/attachment.htm 


More information about the mrtg mailing list