[rrd-users] rrdtool update & adding historical data

Mike.Fountain at worldspan.com Mike.Fountain at worldspan.com
Wed Oct 20 22:27:18 MEST 2004

I've got a collector that gathers data every minute.

I'm wanting to scheduled a script to run every 5 or 10 minutes to gather
that data and put it into rrd database.   But, I don't think I'm doing the
timestamp bit right.

Here is what I've got:

rrdtool update preprod.rrd -60:56:96:0:0:0:96:0:0:0:0:0:0 - ERROR: unknown
option 'preprod.rrd'
rrdtool update preprod.rrd N:56:156:0:0:0:156:0:0:0:0:0:0

When I try to update data from 60 seconds ago, I get the error
When I update the current data, it works.

It wasn't completely clear from the "rrdtool update" man page whether or
not I could use a negative time value.
This is what the man page said:
       This time can either be defined in seconds since 1970-01-01. Or by   
       using the letter 'N' the update time is set to be the current time.  
       Negative time values are subtracted from the current time.           

So, should I be able to use -60 to indicate a sample from 60 seconds ago?
Or do I need to do use the seconds since 1970 timestamp?

And, if I need to use the seconds from 1970 stamp, what is an easy way to
calculate that in perl?

Mike Fountain, CCNP
Sr. Network Engineer, Worldspan
mike.fountain at worldspan.com

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