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

Dave Bodenstab imdave at mcs.net
Fri Feb 23 06:36:25 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 GAUGE 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.

Here's what I did:

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

Or should I use ABSOLUTE for the DS?  Anyway, 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'
  978393600: 9.9999228395e+02
  978480000: 5.0001157407e+02
  978566400: 1.5000115741e+03
  978652800: NaN
  978739200: NaN
  978825600: NaN

(My question #3 was why I get 6 values when I only asked for 5)

Translating the above values:

Mon Jan 1 18:00:00 CST 2001: 9.9999228395e+02
Tue Jan 2 18:00:00 CST 2001: 5.0001157407e+02
Wed Jan 3 18:00:00 CST 2001: 1.5000115741e+03
Thu Jan 4 18:00:00 CST 2001: NaN

(My question #1 was why the time slots are not aligned to a day)


My questions are: why is the last data value entered not being shown,
and why am I not seeing exact values?  I entered only one value
per day, so I expected to see that exact value, ie. 1000, 500 and
1500.  What computation is taking place to change them?  The man
pages explain that for COUNTER/DERIV/ABSOLUTE the values are converted
to a rate/second, but I'm using GAUGE.

It also appears that the values are offset by one day.  Note I
entered the first data at 978393599 (17:59:59 1/1,) but when I
do a rrddump I see that the time slot for 18:00 1/1 begins at
978393600.  Perhaps I's seeing artifacts of the fact that the
row time slots are not aligned exactly on a day...


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