[rrd-users] What does rrdtool do with first data point?

steve.3.pritchard at bt.com steve.3.pritchard at bt.com
Thu Oct 18 15:17:29 MEST 2001


If I create a new RRD file for a GAUGE data source, add one data point and
then dump the RRD file to XML, the XML doesn't appear to contain any valid
values (and "fetch" doesn't show any data).

If I add a second data point then dump to XML, I can then see only the
second value in the XML file (and "fetch" shows the same).

What happens to the first data point?

I appreciate that for a COUNTER you need to have two data points before
rrdtool can calculate a value, however with a GAUGE every data point should
be recorded.

I'd be grateful for any suggestions. I'm particularly interested in this
because I'm looking at what happens when data points are missing
(undefined). e.g. If two data points are missed, then three values are
missing from RRA.

Steve Pritchard
BTexact Technologies, UK.

P.S. I've discovered that if I create the RRD file with "--start 1003276800"
(1 step before first data point) then the first data point is correctly
recorded. Why should it matter what the start time is?

-------------------------------------------------------------------
DETAIL:

# I'm using RRDtool 1.0.28

# 1. Create RRD file:

	rrdtool create test.rrd --start 1003244400 --step 3600
DS:datum0:GAUGE:7200:U:U RRA:AVERAGE:0.5:1:720 RRA:MAX:0.5:1:720
RRA:AVERAGE:0.5:12:600 RRA:MAX:0.5:12:600 RRA:AVERAGE:0.5:144:720
RRA:MAX:0.5:144:121 

# 2. Take a first dump:

	rrdtool dump test.rrd > test0.xml

# 3. Add one data point:

	rrdtool update test.rrd 1003280400:2.0

# 4. Take a second dump and diff:

	rrdtool dump test.rrd > test1.xml
	diff test0.xml test1.xml

	# (All values are "NaN")

# 5. Try fetch:

	rrdtool fetch test.rrd AVERAGE -s 1003276800 -e start+36000

	# (all "NaN")

# 6. Add a second data point:

	rrdtool update test.rrd 1003284000:1.0 

# 7. Take third dump and diff. Repeat fetch.

	rrdtool dump test.rrd > test2.xml
	diff test1.xml test2.xml
	rrdtool fetch test.rrd AVERAGE -s 1003276800 -e start+36000

	# (only see second data point)


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