[rrd-users] Re: How do I get the current time in the graph

Alex van den Bogaerdt alex at ergens.op.het.net
Thu Aug 25 19:48:01 MEST 2005


On Wed, Aug 24, 2005 at 11:15:12AM -0700, Rob Tanner wrote:

> I would like to put a timestamp in the graph so we know at what time the 
> graph was created.  I have looked through the docs and tried to play 
> with the TIME and LTIME rpn values, but have not been successful at 
> setting a variable with the value of the current time.  Does anyone have 
> an example of of setting a variable with the time of day?

You got your examples.

The reason why using TIME doesn't work:  this operates on a data series.

You could come up with the following example:

        DEF:a=a.rrd:a:AVERAGE   \
        CDEF:b=a,POP,TIME       \
        VDEF:min=b,MINIMUM      \
        VDEF:max=b,MAXIMUM      \
        PRINT:min:"%c"          \
        PRINT:max:"%c"          \

which would find the minimum and maximum time in the series.  If you use
"now" as the end time, you will be close to, but not necessarily at, now.

Alex

--
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