[rrd-users] Re: Problem on update

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Thu Jul 11 00:14:52 MEST 2002


Chris Raymond wrote:

[snip]

> In case of such a gap, RRDtool inserts extra copies of the data point.

> rrdtool create UNEP-Peking.rrd -b 957222000 -s  3600 \
> DS:hop:GAUGE:18000:U:U \

> If I take the heartbeat down to just over the stepsize (3600 seconds),
> RRDtool does as advertised, and throws away the data

If no update occurs within the heartbeat period, then the data is
unknown.  If data is inserted inside the heartbeat period, it is
valid data which describes the interval between the previous update
and the current update.

So, rrdtool is doing what it is supposed to do.  Or did I misinterpret
your problem?

Discarding data just because it doesn't arrive at "--step" sized
intervals is no good.  For instance, I can have a database with
a step time of one second and a heartbeat of 3600 seconds.  As long
as I update the database at least once every hour, the data is valid.
This can be used to record an up/down ratio.  A program in pseudo code
(and no, I will not even read emails saying that it doesn't compile):

for ever {
    if line goes down, rrdupdate updown.rrd N:1, and remember=0
    else if line goes up, rrdupdate updown.rrd N:0, and remember=1
    else if current_time->minutes == 0 rrdupdate updown.rrd N:${remember}
}

The file updown.rrd can be updated every second.  The RRA in this RRD
doesn't need to be in a 1-second resolution, it has to match what I
want to graph.  Say I want an overview of the up/down ratio during one
day,  this is 1440 minutes.  The graph would be 720 pixels wide and I'd
display 120 seconds (2 minutes) per pixel.  The RRA should therefore
have a resolution of steps==120.  The values in this RRA will be between
0 and 1.  If half of the time the line is up, the value would be 0.5

Suppose I know that the status of the line is undetermined (for instance,
I cannot reach the device).  This is something I need to store in the
RRD as well.  Simple, just rrdupdate updown.rrd N:U and this signals
RRDtool that the data is known to be unknown.  If I wouldn't tell this
to RRDtool, which I assume is you're doing (or should I say: not doing?),
then RRDtool has no reason to assume the data is unknown, unless the
heartbeat period expires.

xff factor:

Above lines assume all intervals are known.  If they aren't, RRD has
to know what to do.  Suppose only one interval out of 120 is unknown,
should RRDtool make the interval in the RRA unknown?  Or should that
only happen if more than 60 of the 120 1-second intervals that make
up one row in the RRA are unknown?  This is what the xff factor is for.

HTH
-- 
   __________________________________________________________________
 / 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 |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

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



More information about the rrd-users mailing list