[mrtg] Re: Overcoming divide by zero exceptions
Alex van den Bogaerdt
alex at ergens.op.het.net
Mon Dec 13 23:40:25 MET 2004
On Mon, Dec 13, 2004 at 02:26:29PM -0800, Tendolkar Mohit wrote:
> I'm using MRTG to plot the value of target expressions that are made of
> multiple OIDs, such as percentage of some items.
Per cent -> one for every hundred.
There's no way this can result in a division by zero.
> However, in certain contexts, the values of the actual SNMP counters
> used in the expression are zero - which is also a valid condition: thus
> even for a perfectly legitimate expression, while evaluating the value
> of the target expression, perl/mrtg may encounter a divide by zero
I seriously doubt this. Please elaborate so we can check your logic.
> If so, is there a way to instruct MRTG to evaluate the expression only
> if it makes sense (the denominator evaluates to a non-zero values)?
As always: The external program interface is your friend.
You want an answer? You'd better follow the following guidelines!
Linesize well below 80 chars. Reply to the list, not to me. Trim
irrelevant lines. Reply _below_ the relevant lines, not on top.
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
More information about the mrtg