[rrd-developers] Re: confusion about the CF LAST

Tobias Oetiker oetiker at ee.ethz.ch
Sat Feb 24 10:01:18 MET 2001


Yesterday steve rader wrote:

 |
 | Would someone please explain the CF LAST and it's purpose?!!
 | I can't find a discussion of what it should really do.
 |
 | I think it would be nice if the CF LAST returned values from the last
 | data update but the enclosed script indicates otherwise.  The script
 | updates the DS ds1 with the value 10 way back in time but then using
 | the CF LAST actually returns the "now/current" value:
 |
 |  logging value 10 at Mon Jan 10 09:56:06 2000 CST (947519766)
 |  last update was at Mon Jan 10 09:56:06 2000 CST (947519766)
 |  last value logged is 10.00
 |  "last" as per CF LAST is NaN
 |
 | What gives?

CF last makes the RRA always store the last PDP which has occured
within the timeframe of the RRA ... it is not the last value
supplied via Update but the last value which is available as PDP
and this will show in the RRA is the RRA has a step size of one PDP

tobi

 | steve
 | - - -
 | systems & network guy
 | high energy physics
 | university of wisconsin
 | - - -
 |
 | #!/bin/bash
 |
 | rrdtool create -b 947519465 last-confusion-test.rrd \
 |   DS:ds1:GAUGE:1800:0:U \
 |   RRA:AVERAGE:0.5:1:5
 | rrdtool update last-confusion-test.rrd -t ds1 947519466:10
 | echo "logging value 10 at Mon Jan 10 09:56:06 2000 CST (947519766)"
 | rrdtool update last-confusion-test.rrd -t ds1 947519766:10
 |
 | cat <<_EOT_>./last-confusion-test.rrdcgi
 | #!/usr/local/nrg/bin/rrdcgi
 | last update was at <RRD::TIME::LAST last-confusion-test.rrd "%c %Z"> (<RRD::TIME::LAST last-confusion-test.rrd "%s">)
 | <RRD::GRAPH /dev/null --imginfo ''
 |   --end <RRD::TIME::LAST last-confusion-test.rrd "%s">
 |   DEF:ds1=last-confusion-test.rrd:ds1:AVERAGE
 |   PRINT:ds1:AVERAGE:"%.2lf"
 | >
 | last value logged is <RRD::PRINT 0>
 | <RRD::GRAPH /dev/null --imginfo ''
 |   DEF:ds1=last-confusion-test.rrd:ds1:AVERAGE
 |   PRINT:ds1:LAST:"%lf"
 | >
 | "last" as per CF LAST is <RRD::PRINT 0>
 | _EOT_
 | chmod 755 ./last-confusion-test.rrdcgi
 | ./last-confusion-test.rrdcgi < /dev/null | grep last
 | rm -f ./last-confusion-test.rrdcgi
 |
 |
 | --
 | Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
 | Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
 | Archive     http://www.ee.ethz.ch/~slist/rrd-developers
 | WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi
 |
 |

-- 
 ______    __   _
/_  __/_  / /  (_) Oetiker, Timelord & SysMgr @ EE-Dept ETH-Zurich
 / // _ \/ _ \/ / TEL: +41(0)1-6325286  FAX:...1517  ICQ: 10419518
/_/ \.__/_.__/_/ oetiker at ee.ethz.ch http://ee-staff.ethz.ch/~oetiker


--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-developers mailing list