[rrd-users] Data collected is not the same as the data in the database

Javier Bartual javier.bartual at aranzadi.es
Mon Mar 24 15:37:38 MET 2003

Hey all:

I´m new to the RRDTOOL software and I don´t understan what is happenning.
Please, if someone can explain what I´m doing wrong...

I create the database with the next command:

rrdtool create test.rrd -s 1800
DS:busyssd0:GAUGE:3600:U:U DS:waitssd0:GAUGE:3600:U:U
DS:busyssd1:GAUGE:3600:U:U DS:waitssd1:GAUGE:3600:U:U RRA:LAST:0.5:1:17520

I want to keep one data every 30 minutes for a year..

I don´t want to average the samples, I want to keep them as they are. These
samples are collected from a script in a cron job:

gamma14{web}$ script.sh
x=`rsh hostname iostat -x 1 2 | tail +10`
echo $x
a=`echo $x | awk '{print $10}'`
b=`echo $x | awk '{print $9}'`
c=`echo $x | awk '{print $30}'`
d=`echo $x | awk '{print $29}'`
echo $a $b $c $d
/internet/rrdtool/bin/rrdtool update /internet/estadisticas/test.rrd

This script is executed every 30 minutes. As you can see, I do an echo of
the values I update in the database, and like it is in a cron job I get a
mail with those values.

Well, those values (the values I see with the echo command) are not the same
than the values I store in the database.

For example the values I insert in the database (I see them because of the
echo in the script):

55 66 77 88
55 6.6 77 0.1
55 6.6 77 0.1
55 6.6 77 0.1

and in the database I can see:

rrdtool fetch test.rrd LAST
                 busyssd0      waitssd0      busyssd1      waitssd1

1048494600: NaN NaN NaN NaN
1048496400: NaN NaN NaN NaN
1048498200: NaN NaN NaN NaN
1048500000: NaN NaN NaN NaN
1048501800: 0.0000000000e+00 0.0000000000e+00 5.5321782178e-01
1048503600: 9.0444444444e+00 1.0853333333e+01 1.5168888889e+01
1048505400: 5.5000000000e+01 6.6000000000e+01 7.7000000000e+01
1048507200: 5.5000000000e+01 5.6133000000e+01 7.7000000000e+01
1048509000: 5.5000000000e+01 6.6000000000e+00 7.7000000000e+01
1048510800: 5.5000000000e+01 6.6000000000e+00 7.7000000000e+01
1048512600: NaN NaN NaN NaN

As you can see, in the slot 1048507200 the second and the fourth value are
not 6.6 and 0.1. When the values change constantly, ( in this sample I
maintain then fixes, I only changed them manually) there are more
differences between the real values and the data stored.

How can I keep the exact values in the database (if it is possible)

Thanks very much

PD: Please if you can, answer to my e-mail too jbartual at aranzadi.es

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