Im pulling SNMP stats from a router.
InBytes gives total count in
OutBytes gives total count out
I refresh the page every 5 seconds to update the counters.
I need to do ifVolumeBytes which would be InOctets + OutOctets passed only within each 5 second interval.
Not sure how to accomplish this. I think I need to grab the value of In & Out first, then after 5 seconds grab the new values of In & Out, subtract the first values from the second values to get the Octets passed within each 5 second interval and then add the two results to get the total curent volume.
So how can I do this? Im at a loss.
I will eventually be passing these values to a graph which will update with each refresh - but thats for another day :-)
Thanks!