[mrtg] Problem using mathematical expressions.

Chris Mancuska cmancuska at baxglobal.com
Fri Nov 22 11:53:21 MET 2002


Hi all,

I am using mrtg to monitor (for my sins) Windows 2000 disk partition
useage. I want to get a proportional graph by dividing the bytes used per
partition by the partition size (both have OID's)

I therefore have a configuration line like the one below, to monitor two
partitions on one graph:

Target[atdc2_part1n2]: .1.3.6.1.2.1.25.2.3.1.6.1
/.1.3.6.1.2.1.25.2.3.1.5.1&\
.1.3.6.1.2.1.25.2.3.1.6.2 / .1.3.6.1.2.1.25.2.3.1.5.2:public at hostname:

And I'm getting divide by zero errors.

With a bit of experimentation, I've found that mathematical expressions
involving OIDs work for the expression BEFORE the & but not after, so

Target[atdc2_part1n2]: .1.3.6.1.2.1.25.2.3.1.6.1
/.1.3.6.1.2.1.25.2.3.1.5.1&\
.1.3.6.1.2.1.25.2.3.1.6.2:public at hostname:

Works, but

Target[atdc2_part1n2]: .1.3.6.1.2.1.25.2.3.1.5.1&\
.1.3.6.1.2.1.25.2.3.1.6.2 / .1.3.6.1.2.1.25.2.3.1.5.2:public at hostname:

Does not. Have I found a bug, or am I a little stupid? If so can someone
please explain how stupid!

I'm using Perl 5.6.0 on Redhat Linux 7.2 i386 with MRTG version 2.9-17

Thanks in advance,

Chris Mancuska

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