lists.netmrg.net lists.netmrg.net
NetMRG discussion and support
 
FAQ :: Search :: Memberlist :: Usergroups :: Register
Profile :: Log in to check your private messages :: Log in

How to add/subtract a value

 
Post new topic   Reply to topic    lists.netmrg.net Forum Index -> Support
Author Message
cantripnet
Helper


Joined: 09 Dec 2004
Posts: 11

PostPosted: Thu Dec 09, 2004 6:26 pm    Post subject: How to add/subtract a value Reply with quote

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-

i.e.
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
Back to top
cantripnet
Helper


Joined: 09 Dec 2004
Posts: 11

PostPosted: Fri Dec 10, 2004 5:10 pm    Post subject: I ended up... Reply with quote

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 192.168.3.5 1.3.6.1.2.1.2.1.0)-12))

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 -
Back to top
silfreed
Site Admin


Joined: 19 Jan 2003
Posts: 394
Location: Shippensburg, PA, USA

PostPosted: Sat Dec 11, 2004 1:44 am    Post subject: Reply with quote

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 Wink

-Doug
Back to top
Display posts from previous:   
Post new topic   Reply to topic    lists.netmrg.net Forum Index -> Support All times are GMT
Page 1 of 1

 



smartBlue Style © 2002 Smartor
Powered by phpBB © 2001, 2002 phpBB Group