I want to display a rate using the Lost Packages counter that my device provides.
(e.g. Lost Packages/s)
I was planning to use the Class Library RateCalculator class from the common namespace.
The CalculateRate method requires a delta and minDelta argument to be provided.
What would be the best way to get a delta and what would be a good value for minDelta?
Note: the protocol uses HTTP sessions to communicate with the device, so I can't use the GetSnmpGroupExecutionDelta method.
Additionally, do I need to make my polling timer fixed?
Edit: Please look at the answers from David, Simon and Miguel!
They all contain valid things to look out for during development.
Hi Thomas,
I believe a good starting point is to have the following details from the device:
- Counter size: Are we referring to a 32 or 64 bit counter? The RateCalculator library uses different approach when dealing with 32 or 64 bit counter
- How often the device update the counters? This will define the polling frequency of the counters and set a proper minDelta value
For the delta calculation, you could use one of the alternatives already described by David. However, if the device provides you a timestamp when the counters are updated, it will be better to use this timestamp for your delta calculation.
The main challenge when calculating rates is to be sure that the driver polls the device when the counters are updated.