[mrtg] Subtracting two OIDs
Richard D Alloway
ralloway at winbeam.com
Tue May 2 15:50:24 MEST 2006
Hi!
I've been using MRTG for many years and have not had a problem figuring out
some way to do pretty much anything I need (conversion codes, external scripts,
etc), but I've finally over-extended myself! :)
I have searched the archives about subtracting OIDs, but I have a slightly
different problem than what I've found:
I need to subtract the difference of the current and previous values in order
to see the difference in the values.
DevA ---\ /--- DevC
> SwitchA -- SwitchB -- SwitchC <
DevB ---/ \--- DevD
I have control over DevA, SwitchB and DevC. I need to know how much traffic is
used between DevB and DevD without having control of DevB, DevD, SwitchA or
SwitchC.
Trying the following results in a wrong negative value (since SwitchB was
reboot more recently than DevA) and since it is the current values that are
subtracted, not the amount of change in the values since the last sample:
Target[DevB_to_DevD]: 1:comm at SwitchB - 1:comm at DevA
Examples:
Sample at 1700 hrs:
1:comm at SwitchB = 3000
1:comm at DevA = 10000
Result = -7000
Sample at 1705 hrs:
1:comm at SwitchB = 4500
1:comm at DevA = 11000
Result = -6500
What I want:
Sample at 1700 hrs:
1:comm at SwitchB = 3000
1:comm at DevA = 10000
Sample at 1705 hrs:
1:comm at SwitchB = 4500
1:comm at DevA = 11000
Result = ( 4500 - 3000 ) - ( 11000 - 10000 ) = 500
Any idea how to subtract the traffic of one interface (on a seperate device)
from another interface?
Thanks!
-Rich
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://lists.ee.ethz.ch/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://lists.ee.ethz.ch/lsg2.cgi
More information about the mrtg
mailing list