[rrd-users] Linux counter updates (Was: trying to understand the relationship between source data, what's in rrd and what gets plotted)

Simon Hobson linux at thehobsons.co.uk
Wed Jul 25 17:02:53 CEST 2007

Changing the subject line ...

Mark Seger wrote:

>>>btw - just to toss in an interesting wrinkle did you know if you sample
>>>network statistics once a second you will periodically get an invalid
>>>value because of the frequency at which linux updates its network
>>>counters?  the only way I'm able to get accurate network statistics near
>>>that rate is to sample them every 0.9765 seconds.  I can go into more
>>>detail if anyone really cares.  8-)
>>I'm curious ...
>ahh!  I knew I'd get someone to ask...  The trick is how easily can 
>I explain this.
>It turns out that unlike most systems counters which get updated 
>quite frequently, network counters only get updated about once a 
>second but not exactly once a second!  It turns out they get updated 
>every 0.9765 seconds.

So in fact you don't get invalid data, you get data which is valid 
but not what you expected if you don't allow for it. The same thing 
would happen if it updated at exactly 1s intervals but your 
monitoring takes slightly longer than 1s.

In other words, if you don't understand what you are measuring ...

More information about the rrd-users mailing list