[rrd-users] GUAGE and LAST question

fedora fedora fedorafans at gmail.com
Fri Jul 14 19:22:06 MEST 2006


Just installed rrdtool, really a cool software, but I found I can't get the
REAL number using rrdtool, I think there must be something with my way, so I
show here.
say, I want to monitor the file number in my /test directory, so I first
created a file.rrd, using GUAGE as DST, and using AVERAGE, and 603 rows. I
thought with this configuration, I could get the real file NUMBER in my
/test directory for every 5 minutes.

./rrdtool create /tmp/file.rrd -s 300 \
DS:filen:GAUGE:1200:0:10000 \
RRA:AVERAGE:0.5:1:603 \


And also I use a little shell to feed rrd, as following,
~~~~~~~~~~
#!/usr/bin/bash
while ((1))
do

./rrdtool update /tmp/file.rrd N:`ls -l /test | wc | awk '{print $1}'`


./rrdtool graph \
/tmp/file.png --title "Test file total number" \
DEF:t1=/tmp/file.rrd:filen:AVERAGE \
LINE1:t1#FF0000:"total files number" \
GPRINT:t1:LAST:"Current\: %6.0lf" \
GPRINT:t1:AVERAGE:"AVERAGE\: %6.0lf\j" \

sleep 300
done
~~~~~~~~~~

Everything runs smoothly, BUT, I found what displayed in the png file is NOT
the real file number, instead, rrdtool made some kind of calculation, it
just never display the real number of my file in the /test directory, when
there are 12 file in the test dir, it reported as 15, when there are 29, it
report as 27......

As I understood, "RRA:AVERAGE:0.5:1:603" means rrdtool will record the exact
file number every 5 minutes although there is an AVERAGE there(because the
step is 1), and later in "./rrdtool graph", rrdtool will use the last
average as LAST, am I right? If yes, why I can't get the exact number?

what is the 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://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list