[rrd-users] Re: Data granularity

Serge Maandag serge.maandag at staff.zeelandnet.nl
Thu Jan 20 22:23:20 MET 2005


> 	rrdtool create resp.rrd --step 5 \
> 	DS:resp:GAUGE:10:0:U \
> 	RRA:AVERAGE:0.999:1:1000
> 
> If I do single data point update using:
> 
> 	rrdtool update resp.rrd 1106249083:45
> 
> and *not* post any update for a while ( > 10 seconds ), the 
> RRD fetch command shows that the AVERAGE CF has the following value:
> 	1106249083: nan
> 
> Why do I have a NaN?  Shouldn't I have "4.5000000000e+01" > instead?

No, rrdtool normalizes your input. Therefore it really only is useful
if you enter data in a regular interval.

Say you updated like this:

rrdtool update resp.rrd 1106249073:15
rrdtool update resp.rrd 1106249083:45

Then after the second update, rrdtool is able to determine the value
At timestamp 1106249080. It would be:

(45-15) * (1106249080-1106249073)/(1106249083-1106249073)
= 30 * 7/10 = 21

It is interpolated because you did not update on a N x 10 seconds
timestamp

In your case the value is unknown, because you have no previous value to
use for interpolation. You need multiple consecutive values for that.

> Is there a way to retain the value entered for that step?

One solution is to set the heartbeat very high, so multiple rows will be

filled by a single update, but that is not what you want.

What you could try is:
- update only on N x 10 timestamps. So 1106249083 would become:
  10 x int(1106249083/10) = 1106249080 or
- before updating, do a "rrdtool last" to get the last time the database
  was updated. Then for ech step size between now and that last update
time,
  update the database with 0.

I still would use the log file solution.
It's way cleaner.

Serge.

-------------
Op de inhoud van dit e-mailbericht en de daaraan gehechte bijlagen is de inhoud van de volgende disclaimer van toepassing: http://www.zeelandnet.nl/disclaimer.php

--
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