[rrd-developers] Re: [rrd-users] Re: Image clipping/stacking want

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Tue Mar 6 14:33:04 MET 2001


Sasha Mikheev wrote:

> I mean only this only for RRD datasource. For example I want to do
> following:
> 
> rrdtool fetch /tmp/foo DEF:x=foo1.rrd:ds0:AVERAGE \
> 	DEF:y=foo2.rrd:ds0:AVERAGE \
> 	CDEF:g1=x,y,+ \
> 	CDEF:g2=x,y,-
> 
> should give me data points for both g1 and g2

If the grapher would be more into reporting, and we would have
for instance "REPORT:g1,g2", you have exactly what you want.
Together with "DEF:y=sql:ds0:AVERAGE:some-query-here" this would
allow others to use other datasources as well. In other words,
what I suggested was more generic.

rrdtool fetch would probably become redundant (and may even be
removed) and this is a good thing because more generic stuff
will enable more specific use without altering rrdtool.

> > Something like:
> > usr(x) --->
> > FUNC:myfunc=/usr/local/bin/myfunc
> > CDEF:vname=whatever,myfunc
> > 
> Yeah. although even static hooks for writing functions would be enough.
> Also it would be nice to be able to write consolidation functions. For
> example PERCENTILE95. ;)

If percentile would not be implemented, you could do so in "myfunc".
However, why do percentile95() if you can have percentile(95) and
percentile(90) etcetera.

> > This is *very* similar to the stuff I'm currently working on.  It will
> > use variables which you can use in CDEF instructions something like:
> > DEF:bytes=...
> > CDEF:bits=bytes,8,*
> > VDEF:perc=95,bits,PERCENT
> > CDEF:high=bits,perc,-,100,LE,INF,UNKN,IF
> > AREA:high#FF0000
> > AREA:bits#0000FF:bits
> > LINE1:perc#FF0000:"95th percentile"
> 
> I dont think you need to have a separate VDEF for this. perc can be
> considered as function with constant value. 

True, however there {may|will} be other uses for this variables.  You
can graph a variable as a line and end up with a straight line so what
you need is available.  However, something like:

VDEF:graphtime=mydata,LAST,TIME,mydata,FIRST,TIME,-,3600,/
TITLE:"Router x %10lf hours of usable data",graphtime

should also be possible, hence variables, not ranges.  Not that I
started implementing such stuff, just preparing for it.
LAST and FIRST return a val/time pair, TIME selects the time from it,
rest of the RPN is the usual stuff.

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