[rrd-users] Understanding RRD's; Question #5

Dave Bodenstab imdave at mcs.net
Fri Feb 23 06:36:27 MET 2001


I'm trying to understand what's going on with rrdtool
so I've been creating a test rrd file and examining
the results.

My question has to do with how ABSOLUTE data values
entered with rrdupdate are stored in the rrd.

My idea was to take my accounting data (generated at
midnight) and feed the number of proc's per day into
a rrd.  Then I could use rrdgraph with the resulting
rrd file.  After re-reading the rrdcreate man page,
it seems that I should be using ABSOLUTE for my DS
instead of GAUGE.

Here's what I did:

  $ rrdtool create test.rrd \
		  --start '12 am 1/1/2001' \
		  --step $((24*60*60)) \
		  DS:procs:ABSOLUTE:$((24*60*60)):0:U \
		  RRA:AVERAGE:0.5:1:5

I then entered some data.  The times are aligned to one
second before the end of a row's time slot.

  $ rrdtool update test.rrd 978393599:1000	# 17:59:59pm 1/1
  $ rrdtool update test.rrd 978479999:500	# 17:59:59pm 1/2
  $ rrdtool update test.rrd 978566399:1500	# 17:59:59pm 1/3
  $ rrdtool update test.rrd 978652799:2500	# 17:59:59pm 1/4

  $ rrdtool fetch test.rrd AVERAGE -s '1/1/2001' -e '1/5/2001'
         procs
  978393600: 1.5432188072e-02
  978480000: 5.7871709962e-03
  978566400: 1.7361245070e-02
  978652800: NaN
  978739200: NaN
  978825600: NaN

Translating the above values:

Mon Jan 1 18:00:00 CST 2001: .015432188072        # *86399=1333.3256
Tue Jan 2 18:00:00 CST 2001: .0057871709962       # *86399=500.00579
Wed Jan 3 18:00:00 CST 2001: .017361245070        # *86399=1499.9942
Thu Jan 4 18:00:00 CST 2001: NaN


My question is: how did the first 1000 get changed to a rate
of .015432? I would think it would be 1000/86399 = .0115742.

The subsequent values seem more reasonable.  But, how is the
rate computed?  If the rate is computed from the beginning of
the timeslot, 500/86399 = .0057871040.  The rrd value, being
.0057871709962, seems to have been computed by 500/86398.
However, this isn't the case for the next value: 1500/86398 = 
.0173615129, the computation seems to have been 1500/86399.333.
It occurred to me that perhaps the elapsed time from the last
entry might be used, but that was 86400, and 1500/86400 = .01736111.

Also, what happed to the last value 2500?

Well, I hope I haven't taken up too much of peoples time with
all this...  I'm grateful for all the responses I'll get.


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