[mrtg] Re: Multiple OID's in expression...

Sawyer, David david.sawyer at uk.mckhboc.com
Thu Feb 21 12:58:24 MET 2002

For easy viewing, lets say...
OID1 = .5.1 Proc mem in use
OID2 = .6.1 Proc Mem free
OID3 = .5.2 IO mem in use
OID4 = .6.2 IO mem free.

You want...

460 /(460 + 564))* 100 = 46%

So for your target you should try...

Target[Proc_IO] (OID1&OID3:public at host  /
                (OID1&OID3:public at host +
                 OID2&OID4:public at host)) * 100

Let me know if this works.


-----Original Message-----
From: David Mitchell [mailto:mitchelld at sunman.co.uk]

I want to calculate the percentage memory usage on a cisco router.

The table oid is

And the OID's I want to use are: Proc mem in use Proc Mem free IO mem in use IO mem free.

So I want to calculate 100*mem in use / (mem in use + mem free) and use the
Proc mem as the 'in' value and IO mem as the 'out' value so they appear on
the same graph.

The original target I used was:
Target[$target_name]: *
00/( + ) & *100/( + ):routeraddress

The information contained in this e-mail is confidential and is intended
only for the named recipient(s). If you are not the intended recipient you
must not copy, distribute, or take any action or reliance on it.
If you have received this e-mail in error, please notify the sender.
Any unauthorised disclosure of the information contained in this e-mail
is strictly prohibited.

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