[rrd-users] can not update rrd

Niels Kalle noldor at nikster.de
Sun Feb 11 21:59:44 CET 2007


Well, OK, thanks Alex...

At first sorry that I posted a Script which was plainly wrong.
Here's the working one:

RRD_BIN="/usr/bin/rrdtool"
RRD="/home/nkalle/rrds/test.rrd"
datum=`date +%s`
echo $datum

for i in `seq 1 10`; do

   datum=`date +%s` #start-date
   faselbla=`ifconfig eth0 | grep RX\ bytes | cut -d ":" -f2 | cut -d "
" -f1`
   echo $faselbla
   $RRD_BIN update $RRD $datum:$faselbla
   sleep 60;
done
   datum=`date +%s` #stop-date
   echo $datum
exit 0;

Here's the command with which I created the Database:
rrdtool create test.rrd --step 60 --start 1171226200
DS:speed:COUNTER:90:0:U RRA:AVERAGE:0.5:1:12 RRA:AVERAGE:0.5:6:48

Here's the command I use to fetch the Data... and guess what... it works:

suse rrds # rrdtool fetch -s 1171226200 -e 1171228000
/home/nkalle/rrds/test.rrd AVERAGE
                          speed

1171226220: nan
1171226280: nan
1171226340: nan
1171226400: nan
1171226460: nan
1171226520: nan
1171226580: 2.3822100000e+04
1171226640: 2.3103375000e+04
1171226700: 2.2269456667e+04
1171226760: 2.4416481944e+04
1171226820: 2.4414781645e+04
1171226880: 2.0103869744e+04
1171226940: 1.7351143333e+04
1171227000: 1.8424738889e+04
1171227060: 2.0775236667e+04
1171227120: nan
1171227180: nan
1171227240: nan
1171227300: nan
1171227360: nan
1171227420: nan
1171227480: nan
1171227540: nan
1171227600: nan
1171227660: nan
1171227720: nan
1171227780: nan
1171227840: nan
1171227900: nan
1171227960: nan
1171228020: nan

Thanks for pointing this out by your "have a look at the Times in the
db" sort of answer... ;)
I have been brooding about this the whole Day...

Best Regards and Thanks

Niels



More information about the rrd-users mailing list