[rrd-users] newbie question

Dave Bodenstab imdave at mcs.net
Fri Nov 17 05:46:07 MET 2000


I think I must have misunderstand the application of rrdtool...  I see
how it works for the examples in the tutorial, so I figured I'd try it
on some of my own data.

I've got a record of each call I make to my ISP, so I figured it would be
a good way to try rrdtool by trying to count the number of telephone calls
per day for a month and graph the result.  I came up with the following.
For testing, I'm using both the GAUGE and ABSOLUTE data sources just to
see what happens... what I want is something that will simply accumulate
a count of the number of calls.  I thought that the GAUGE would be
appropriate since each update would be a single instance of a phone call.
I also thought that perhaps ABSOLUTE might be required so that the count
accumulates.

  rrdtool create T -b '11/1/00' -s 1 \
	  DS:gauge:GAUGE:86400:U:U \
	  DS:absolute:ABSOLUTE:86400:U:U \
	  RRA:MAX:0.99999:86400:31 \
	  RRA:LAST:0.99999:86400:31

  rrdtool update T 973148970:1:1  # Thu Nov 02 01:09:30 CST 2000
  rrdtool update T 973185982:1:1  # Thu Nov 02 11:26:22 CST 2000
  rrdtool update T 973206720:1:1  # Thu Nov 02 17:12:00 CST 2000
  rrdtool update T 973273288:1:1  # Fri Nov 03 11:41:28 CST 2000
  rrdtool update T 973305539:1:1  # Fri Nov 03 20:38:59 CST 2000
  rrdtool update T 973345131:1:1  # Sat Nov 04 07:38:51 CST 2000
  rrdtool update T 973395847:1:1  # Sat Nov 04 21:44:07 CST 2000
  rrdtool update T 973444003:1:1  # Sun Nov 05 11:06:43 CST 2000
  rrdtool update T 973447183:1:1  # Sun Nov 05 11:59:43 CST 2000
  rrdtool update T 973462674:1:1  # Sun Nov 05 16:17:54 CST 2000
  rrdtool update T 973469299:1:1  # Sun Nov 05 18:08:19 CST 2000
  echo ; echo MAX
  rrdtool fetch T MAX -s 11/1/00 -e 11/6/00
  echo ; echo LAST
  rrdtool fetch T LAST -s 11/1/00 -e 11/6/00

This doesn't work.  The GAUGE has values of 1 and the ABSOLUTE has
some very small values.  I reasoned that I needed to provide the 
gauge with the cumulative number of calls for that day, so I tried:

  rrdtool update T 973148970:1:1  # Thu Nov 02 01:09:30 CST 2000
  rrdtool update T 973185982:2:1  # Thu Nov 02 11:26:22 CST 2000
  rrdtool update T 973206720:3:1  # Thu Nov 02 17:12:00 CST 2000
  rrdtool update T 973273288:1:1  # Fri Nov 03 11:41:28 CST 2000
  rrdtool update T 973305539:2:1  # Fri Nov 03 20:38:59 CST 2000
  rrdtool update T 973345131:1:1  # Sat Nov 04 07:38:51 CST 2000
  rrdtool update T 973395847:2:1  # Sat Nov 04 21:44:07 CST 2000
  rrdtool update T 973444003:1:1  # Sun Nov 05 11:06:43 CST 2000
  rrdtool update T 973447183:2:1  # Sun Nov 05 11:59:43 CST 2000
  rrdtool update T 973462674:3:1  # Sun Nov 05 16:17:54 CST 2000
  rrdtool update T 973469299:4:1  # Sun Nov 05 18:08:19 CST 2000
  echo ; echo MAX
  rrdtool fetch T MAX -s 11/1/00 -e 11/10/00
  echo ; echo LAST
  rrdtool fetch T LAST -s 11/1/00 -e 11/10/00

This seems to work in that the GAUGE now has the correct values.
However if I have to massage the data to do the count myself, then
what's the point?  I suspect that I don't understand if it is possible
to update the data base in a way that simply counts the number of phone
calls (the next step, of course, would be to accumulate the total amount
of time I spend on the phone.)

After some thought, it seems to me that the application of rrdtool
is to sample numerical value(s) at relatively constant rate(s).
Rrdtool could be used to monitor run-level, file system usage, etc.
It can't be used to do simple counting/summing of irregularly
occuring events.  Something like counting hits to my home page
couldn't be done unless I transform the html log into some sort of
periodic sampling.

Is this an accurate conclusion?

Thanks for your time...

Dave Bodenstab
imdave at mcs.net

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