# [mrtg] Re: Problem using mathematical expressions.

Chris Mancuska cmancuska at baxglobal.com
Fri Nov 22 12:41:11 MET 2002

```
I believe you are mistaken - have another look - (there are three OID's in
both of the examples I gave)

Target[1]: .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:

I am dividing the value of an OID by another OID value for graph 1 and just
showing the value of an OID for graph 2

This works, but

Target[2]: .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:

I am showing the value of an OID in graph 1 and dividing the value of an
OID by the value of another OID in graph 2

This does not work - why?

Regards,

Chris Mancuska

Alex van den Bogaerdt <alex at ergens.op.het.net>@list.ee.ethz.ch on
22/11/2002 11:01:11

Sent by:  mrtg-bounce at list.ee.ethz.ch

To:   mrtg at list.ee.ethz.ch
cc:

Subject:  [mrtg] Re: Problem using mathematical expressions.

On Fri, Nov 22, 2002 at 10:53:21AM +0000, Chris Mancuska wrote:

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

Here you are -->dividing<-- a single OID.

> 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

Here you are dividing -->by<-- a single OID.

You MUST use two OIDs. If you don't, it SHOULDn't work at all.  It seems
that it does work however you end up with a zero.  Division by zero.

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

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