[rrd-users] Fetch the time of the first entry

Steven Sim unixandme at outlook.com
Tue Jul 1 17:15:42 CEST 2014


Alex;

Er ... I cannot seem to get the syntax correct..

Can you advice?

rrdtool graph - VDEF:FIRST:myrrd.rrd:CPUBusy:FIRST

where

CPUBusy is the defined DS
myrrd.rrd is the RRD database file itself..

The above keeps

$ rrdtool graph - VDEF:FIRST=myrrd.rrd:CPUBusy:FIRST
ERROR: Cannot parse line 'VDEF:FIRST=myrrd.rrd.rrd:CPUBusy:FIRST'

Deepest Regards
Steven Sim


On Tue, Jul 1, 2014 at 10:08 PM, Alex van den Bogaerdt <
alex at vandenbogaerdt.nl> wrote:

> > Simon;
> >
> > Something is seriously wrong and I don't know what it is.
> >
> > My Perl script parses the data file just fine.
> >
> > It plots just fine.
> >
> > The legends are correct
> >
> > The dates are correct.
> >
> > BUT when I use rrdtool first <rrd database> in an attempt to get the time
> > of the first entry, I get a Unix time stamp which is one entire month
> > EARLIER than the first entry in the file.
>
> As already explained, "rrdtool first" gives you the first available slot.
>
> Maybe you want to look at the data provided by the VDEF function "FIRST".
> "
>
>     Return the last/first non-nan or infinite value for the selected data
> stream, including its timestamp.
>
>     Example: VDEF:first=mydata,FIRST"
>
> If you "rrdtool graph" without actually using any graphing elements, and
> the PRINT (not GPRINT) this value's time component, you can use it in a
> script.
>
> HTH
> Alex
>
>
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20140701/58da87db/attachment.htm 


More information about the rrd-users mailing list