How to add/subtract a value


09-12-2004 13:26:27

I am pretty new at this and looked for a while but can't seem to find an easy way to add or subtract a constant from the results onto a graph-

we have 3 vpn routers and I can get an SNMP result for the number of interfaces
but 31 of the interfaces on one set up is not a ppp tunnel but a different int type
4 on another needs to be subracted and 12 on the last

I made a nice graph of the 3 devices but have not been able to subtract the non ppp interfaces from the totals

The Fixed Value or Value Multiplier does not seem to be able to add a fixed value - it treats everything as a multiplier ( maybe just syntax but I couldn't find the proper one)

Paul Ellis


10-12-2004 12:10:12

I ended up making a script counter for it rather than looking for a way to do it in NetMRG with an
SNMP counter

echo $(($(snmpget -v 1 -c foo -O qev

seems to work ok and gave me ideas for several other scripts where I need to do math
on multiple SNMP results merged into one value -


10-12-2004 20:44:08

Yes, we actually have bug#205 that covers the 'basic math support' features like you suggest.
So, at least we know that it would be useful ;-)