[rrd-users] how to input the old data with "update" parameter?
JoeCen
joecen at gmail.com
Wed Apr 13 19:11:29 MEST 2005
1、
I create a new "rrd" file :
/opt/rrdtool/bin/rrdtool create \
one.rrd \
--start `date -d '2005/04/01' +%s` \
--step 300 \
DS:test1:GAUGE:600:0:100 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797
2、I want to input some old data between "2005/04/01" and now.
I write a script to do it:
time=`date -d '2005/04/01' +%s`
lasttime=`date +%s`
value=123
while [ $time -lt $lasttime ]
do
{
echo "$time ##### $value #######" >> /rrd/log
rrdtool update one.rrd $time:$value
time=`expr $time + 300`
value=`expr $value + 1`
}
done
3、I run the script and no error display.but when I used the "fetch"
parameter to saw the result.l found the result is "nan":
rrdtool fetch one.rrd AVERAGE
1113324000: nan
1113327000: nan
1113330000: nan
1113333000: nan
1113336000: nan
1113339000: nan
1113342000: nan
1113345000: nan
1113348000: nan
1113351000: nan
1113354000: nan
1113357000: nan
1113360000: nan
1113363000: nan
why?
Is there anything I miss?
Thanks for your help.
JOE
--
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