[rrd-developers] Re: Restarting devices

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Mon Jan 24 00:25:30 MET 2000


Luis F Balbinot wrote:
> 
> I had the same spike problems that Bert Driehuis had when the equipment is
> reset, which makes all my graphs unusable. Yes, I can force the min and max
> with 0 and the ifSpeed value, but it might not work all the time. Some
> spikes might appear.
> 
> What should I do? My idea was to check manually if the current value is
> lower than the last value, and then store a NaN in this case.
> 

This is a workaround that might work.  The proper solution would be to
check for the device reset.  If sysUptime has a low value, the device
will have been reset.

Suppose you take samples about 300 seconds apart.  Suppose sysUptime is
29000.  In that case, the device must have been reset between the current
and the previous update.  To be on the safe side, assume the device has
been reset if sysUptime is lower than 600 seconds (60000).

(note:
     I assume here that sysUptime is in hundreds of seconds.
     is this always true?)

To signal the unknown interval caused by the reset, the front end should
insert "U" into the database.

If the current time is 948669019, just insert "U" one second before and
insert the correct value with the current timestamp.  Including the last
update this would look like:

previous:   rrdtool update my.rrd 948668705:1000
current:    rrdtool update my.rrd 948669018:U 948779019:500
future:     rrdtool update my.rrd 948669309:1200

The current update inserts "U" and therefore the interval from 948668705
to 948669018 is unknown.  It also inserts 500 at time 948779019 which
happens to be the current time.

The interval from 948779019 to 948669309 will be known as there are both
start and end times available.  You only loose the update from
948668705 to 948779019 and this is, indeed, unknown due to the reset.

Real brave people use sysUptime and current time to estimate when the
reset took place.  Assuming sysUptime had a value of 10000, you could do:

   previous:   rrdtool update my.rrd 948668705:1000
   current:    rrdtool update my.rrd 948668918:U 948668919:0 948779019:500
   future:     rrdtool update my.rrd 948669309:1200

This minimizes the unknown data.

regards,
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+

--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-developers



More information about the rrd-developers mailing list