[rrd-developers] rrdtool: update fails on negative timestamp

Sebastian Harl sh at tokkee.org
Tue Apr 7 22:11:57 CEST 2009


Hi Tobi,

On Tue, Apr 07, 2009 at 07:35:30PM +0200, Tobias Oetiker wrote:
> Today Sebastian Harl wrote:
> > On Sat, Oct 08, 2005 at 03:14:15PM +0200, Frank Zacharias wrote:
> > > rrdupdate(1) states: "Negative time values are subtracted from the current time." But if i try:
> > >
> > > $> rrdtool update filename.rrd -t dsname -timstamp:U
> > >
> > > it fails with: "ERROR: unknown option 'filename.rrd'". The timestamp is
> > > in `date +%s'-format.
> >
> > Well, since '-' marks the beginning of an option, you'd need to separate
> > options and timestamp/value-list tuples using '--' in this case. However, as
> > of version 1.3.5, this does not work either:
> >
> >   $ rrdtool update file.rrd -t ds -- -5:42 && date
> >   ERROR: file.rrd: illegal attempt to update using time -5 when last update
> >   time is 1239115940 (minimum one second step)
> >   1239116951
> >
> > Apparently, this feature got lost somewhere on the way.

> hmmm I didn't know of this 'feature' what time would '-5:42' be ?

Uhm ... '-5:42' is the timestamp and the value to be submitted to the
RRD file, i.e. the usual data passed to rrdupdate(1). As mentioned in
the original bug report (see above), the rrdupdate(1) manpage states
that "negative time value are substracted from the current time", so I'd
expect this example to insert the value 42 at time 'now' minus 5.

Cheers,
Sebastian

-- 
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.oetiker.ch/pipermail/rrd-developers/attachments/20090407/5768913d/attachment.bin 


More information about the rrd-developers mailing list