[rrd-users] timestamp and manually inserting data
Ron Peterson
rpeterso at mtholyoke.edu
Wed Jan 23 17:49:22 CET 2008
2008-01-23_11:38:51-0500 Ron Peterson <rpeterso at mtholyoke.edu>:
> # We don't really care when our time stamps begin, only that they
> # increment at one second intervals.
> i=1
> while read blocksread blockswritten
> do
> i=$((i + 1))
> mbsread=$(echo "scale=0; $blocksread * 512 / 1000000" | bc)
> mbswritten=$(echo "scale=0; $blockswritten * 512 / 1000000" | bc)
> rrdtool update $RRDFILE $i:$mbsread:$mbswritten
> done<<EOF
> $(getdata)
> EOF
>
> This doesn't work, however. I get an error like:
>
> ...illegal attempt to update using time 2 when last update time is 1201069000
I made this work by setting my 'i' variable differently. Instead of
initializing like 'i=1', I did:
i=`rrdtool last $RRDFILE`
i=$((i + 1000))
I'd still appreciate any insight into the meaning of the --start parameter though.
Best.
--
Ron Peterson
Network & Systems Manager
Mount Holyoke College
More information about the rrd-users
mailing list