[rrd-users] Re: FW: How did the rrd get its values?

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Fri May 25 02:24:05 MEST 2001


Logg, Connie A. wrote:

Keyword: interpolation

> Hi All,
> 	I was wondering if any body could help me in figuring out this:
> 
> I make a datastream to be send to rrd-update, it reads like:
> 
> 990744960:24325:24651:0
> 
> 	With this value, I update the rrds. The rrds are defined as:
>     DS:totrecords:GAUGE:700:U:U \
>     DS:totflows:GAUGE:700:U:U \
>     DS:missed:GAUGE:700:U:U \
> 
> 	After that I fetch the data from the rrd and it looks like:
> 
>  990744600: 2.5094800000e+04 2.5493400000e+04 0.0000000000e+00
>  990745200: 2.3965000000e+04 2.4294600000e+04 0.0000000000e+00

This information is not enough.

First of all I have to assume you've created a database with a
resolution of 600 seconds.  This means that the intervals have
the following boundaries:  n*600 (where n is an integer number).

An update at time 990744960 is not on such a boundary.  The interval
running from 990744600 to 990745200 is therefore only partially known.
The values you have entered are only valid from 990744600 to 990744960.
The next update will define the part of the interval which goes from
990744960 to 990745200.

Time for two more assumptions.
1) The previous update was before 990744600
2) The next update was after 990745199

Now we can calculate what that next update must have been:

The total interval is 600 seconds.  The update defined the values
in that interval from 990744600 to 990744960 which is 360 seconds
in length.  The remaining part of the interval is set by the next
update, its duration (for this interval) is 240 seconds.

360/600 * 24325 + 240/360 * a = 23965
==> (23965 - 360/600*24325)*360/240 = a
==> a = 14055
360/600 * 24651 + 240/360 * b = 24294.6
==> (24294.6 - 360/600*24651)*360/240 = b
==> b = 14256

So, the interval is defined from two updates:

990744960:24325:24651:0
990745560:14055:14256:0  (where the time stamp may differ)

If this isn't enough explanation, please indicate where you lost me.

cheers,
-- 
   __________________________________________________________________
 / 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