[rrd-users] Re: problem with rrdtool fetch

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Wed Aug 8 01:52:32 MEST 2001


Shipley, Rob wrote:

> I am attempting to use fetch to get the "most recent" value for a ds. This
> doesn't seem to work since you need to specify a CF. My understanding is
> that this only gives you average,last,max,min on the rra. This is not very
> useful if you want the "most recent" value.(the values for the timestamp of
> "rrdtool last") Any help on this would be great. For example, i have used

The last_ds values known to rrdtool info don't go into the RRAs (I think)
so you will not be able to use rrdtool fetch nor rrdtool graph to get
these values.  The closest you can get is using a CF of LAST but even
then you're in trouble if the last update happened some unknown time ago
(since the fetch function will happily tell you it is unknown).  Also it
will still normalize the value (I think).

If you're not afraid of alpha software please go and fetch the development
tree version, it has support for something very close to what you want.
It will still use normalized and consolidated values but this is what
RRDtool is all about.  Raw data is known to, and should be presented by,
the front end.

You need to use rrdtool graph to use the function however you don't need
to create a graph.  A DEF, a VDEF statement and a PRINT should be enough.
The new stuff you'd be using is "VDEF:lastval=values,LAST" and this will
create a variable containing the value and the time (yes, both in one)
that you seek, sort of.  Again, it's going to be normalized data, by design.

> p.s. has anyone else found this LAST definition to be confusing? using LAST
> as the CF and "rrdtool last" are completely different? 

Yeah, and to make things less confusing rrdtool graph will know about
a combined variable of both the value and the time this happened.  It
also knows about FIRST by the way.  This is, as said, in the 1.1.x version.
These functions actually look for the last (first) non-NaN number in the
data, so they are not suffering from the problem I mentioned two
paragraphs above.  I didn't implement the time-part yet, will come soon.

I've posted instructions to get the stuff a couple of weeks ago,
you should be able to find it in many archives:
   Subject: New RRDtool versions
   To: rrd-users at list.ee.ethz.ch (RRD users)
   Date: Sat, 21 Jul 2001 03:17:49 +0200 (CEST)

cheers,
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

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