[rrd-developers] Re: Delay in gathering stats, and perhaps how to deal with them

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Mon Sep 27 18:12:34 MEST 1999


>  > Perhaps there is a better way:
>  > I've been playing with snmpget and tcpdump and it looks like it
>  > is possible to query more than one OID simultaniously. Would the
>  > following not be any good ?
> 
> IMO, yes for the data and no for the time stamp...
> 
> Getting all OIDs together means the data can be considered "coupled"
> and thus put into the RRD together at the same time stamp.  (In other
> words, it avoids having to use two RRDs for if[In|Out]Octets.)
> 
> But I don't think using system.sysUpTime.0 is a really Good Thing.
> It's vaguely possible for clock-skew to cause some ugly problems.
> I'd rather not have the accuracy of my data dependant on correctly
> installing, configuring and managing ntp or rdate or whatever.
> 
I was under the assumption that sysUptime is the number of ticks since
startup of the device (or perhaps its snmp part). This would indicate
that it is not dependant on any skewing.

If this is true you will get much more accurate rates as you will get
an exact time-delta as opposed to calculating this from the delayed
responses on the host where rrdtool is residing on.
(rates may be calculated by the device itself but this is another story).

Perhaps an example is useful here, "host" runs rrdtool, "router" is the
queried device. The error to time ratio could be argued however this is
not important, its the principal. The constant rate on the device is
3000 somethings per second. Processing the data is assumed to happen
at the same time the request came in (ie. no delay).

time at host time at router time at router time at host rate
outgoing  incoming    outgoing    incoming  
x         x+1         x+2         x+3       unknown
x+300     x+301       x+302       x+303     3000*(301-1)/(303-3)     = 3000
x+600     x+606       x+607       x+608     3000*(606-601)/(608-303) < 3000
x+900     x+901       x+906       x+907     3000*(901-606)/(907-608) > 3000

If we would use the sysUptime to calculate the time-delta:

time at host time at router time at router time at host rate
outgoing  incoming    outgoing    incoming  
x         x+1         x+2         x+3       unknown
x+300     x+301       x+302       x+303     3000*(301-1)/(301-1)     = 3000
x+600     x+606       x+607       x+608     3000*(606-301)/(601-301) = 3000
x+900     x+901       x+906       x+907     3000*(901-606)/(901-606) = 3000

However, the times will be incorrect:

x+301 at the router will be logged at x+303 on the host
x+606 at the router will be logged at x+608 on the host
x+901 at the router will be logged at x+907 on the host
So the correctly calculated rate at x+901 will be logged at x+907
This may also be compensated for, at least partially, by synchronising
at the sysUptime vs. host-time delta.

In reality things will not be perfect and therefore there will be
some error introduced inside the queried device, OTOH the same error
is also present when querying the traditional way + some extra error
introduced by net and host delays.

Will this count for five cents, not two ? :-)

Regards,
Alex

--
* To unsubscribe from the rrd-developers mailing list, send a message with the
  subject: unsubscribe to rrd-developers-request at list.ee.ethz.ch



More information about the rrd-developers mailing list