[mrtg] Re: operations on OIDs

Richard Bragg Richard.Bragg at ntl.com
Tue Oct 2 17:24:50 MEST 2001


In maths multiplication/division has priority over addition/subtraction.

What you are doing is

a+(b/c)  the parenthesis are implied.  You want to explicitly do
(a+b)/c as you rightly guessed.

-----Original Message-----
From: WEYMIENS Bruno FTRD/DMI/SOP
[mailto:bruno.weymiens at rd.francetelecom.com]
Sent: 02 October 2001 16:10
To: 'Paul C. Williamson'; mrtg at list.ee.ethz.ch
Subject: [mrtg] operations on OIDs



hi,

I'd like to have help ("indeed ?") :
- I'd like to graph the % of an interface's load, ie. the sum of the
ifInOctets & the ifOutOctets, divided by the maximum throughput
- I suceeded in summing the ifInOctets & the ifOutOctets, writing smthg like
:
Target[link_load]:
.1.3.6.1.2.1.2.2.1.10.1&.1.3.6.1.2.1.2.2.1.10.1:com at a.b.c.d +
.1.3.6.1.2.1.2.2.1.16.1&.1.3.6.1.2.1.2.2.1.16.1:com at a.b.c.d
- I divided this by 2.000.000 (maximum througput), so writing :
Target[link_load]:
.1.3.6.1.2.1.2.2.1.10.1&.1.3.6.1.2.1.2.2.1.10.1:com at a.b.c.d +
.1.3.6.1.2.1.2.2.1.16.1&.1.3.6.1.2.1.2.2.1.16.1:com at a.b.c.d / 2000000, 
and now all = zero.

should I add parenthesis before division ?
is there a more simple way to do it ?
I looked at the faq.mrtg.org, but there's nothing for 'mathematical',
neither 'operations'...

regards

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


The contents of this email and any attachments are sent for the personal attention
of the addressee(s) only and may be confidential.  If you are not the intended
addressee, any use, disclosure or copying of this email and any attachments is
unauthorised - please notify the sender by return and delete the message.  Any
representations or commitments expressed in this email are subject to contract. 
 
ntl Group Limited

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