[mrtg] Re: operations on OIDs
WEYMIENS Bruno FTRD/DMI/SOP
bruno.weymiens at rd.francetelecom.com
Tue Oct 2 18:04:33 MEST 2001
hi again,
- 1st mistake : I wanted to divide by 2.000.000, so the result would have
been between 0 and 1 (decimal number !), and so I suppose MRTG would have
always graphed 0 ; so I had to multiply the result by 100
- 2nd : without parenthesis, I was calculating (cf Richard Bragg's answer
below) : a+(b/c), so a result near 0 (b<<c)
now, dividing by 20.000, and adding parenthesis, the result is between 0 and
100 !
Great !
Thanx to all
-----Message d'origine-----
De : Richard Bragg [mailto:Richard.Bragg at ntl.com]
Envoyé : mardi 2 octobre 2001 17:25
À : 'WEYMIENS Bruno FTRD/DMI/SOP'; 'Paul C. Williamson';
mrtg at list.ee.ethz.ch
Objet : RE: [mrtg] operations on OIDs
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