[mrtg] Is it possible to perform mathmatical calculations using ifOperHack?

Barry Young byoung at europe.chep.com
Mon Jun 26 13:15:41 MEST 2000

Following on from a previous posting (no replies to date), can someone
answer if it is possible to add the results of ifOperHack (or indeed

I am using the following target to obtain the number of interfaces up

Target[xx]: ifOperHack.2:public at ipaddr
          + ifOperHack.3:public at ipaddr

Because SNMP variable ifOper can return greater than 1
the ifOperHack translates this value to either 0 (down)
or 1 (up).

So adding these values together should provide the total
number of interfaces up.  But I am presently seeing
zero values in the log file.

I have reviewed the mrtg perl script to ascertain the
behaviour but as I am not a perl developer my understanding
is limited.

Is this a limitation of the ifOperHack and MRTG or is my
target configuration wrong?

Suitable replies much appreciated as I have an urgent
requirement to resolve this.


Barry Young
European Networks Manager
CHEP International

This E-mail is strictly confidential and intended solely for the addressee.
It may contain information that is covered by legal, professional or other
privilege. If you are not the intended addressee you must not use, disclose or
copy this transmission.

This E-mail is not intended to impose nor shall it be construed as imposing any
legally binding obligation upon CHEP and/or any of its subsidiaries or
associated companies.

Neither CHEP nor any of its subsidiaries or associated companies gives any
representation or warranty as to the accuracy or completeness of the contents of
this E-mail.

CHEP shall not be held liable to any person resulting from the use of any
information contained in this E-mail and shall not be liable to any person who
acts or omits to do anything in reliance upon it.

More information about the mrtg mailing list