[rrd-users] Working with linear slope calculations

Alex van den Bogaerdt alex at ergens.op.het.net
Tue Jan 22 23:45:48 CET 2008


On Tue, Jan 22, 2008 at 09:51:27PM +0000, Simon Hobson wrote:
> Alex van den Bogaerdt wrote:
> 
> >  > That's the bit I'm trying to avoid.  It seems like I have to hardcode
> >>  the size of the graph within a calculation.  That makes changing things
> >>  significantly more complex.  From your suggestion, I take it there's no
> >>  way to poll for those values directly?
> >
> >With a bit of programming, VDEF could support this.
> >It may not be the most efficient approach, but it will do.
> 
> You mean, make some variables available (like environment variables 
> in the shell etc) with the various parameters used in the program 
> call ?

I was thinking about something similarly to:

VDEF:avg=mydata,AVERAGE

Instead of working on DEFs or CDEFs, such functions could work on
internals of RRDtool, such as:

VDEF:width=GRAPH,WIDTH
VDEF:totaltime=GRAPH,TOTALTIME
CDEF:t=p,width,*,totaltime,/,s,+

Giving it a bit more thought, I think that it may be better to skip
the VDEF step, and directly do: 

CDEF:t=p,WIDTH,*,TOTALTIME,/,s,+

(where WIDTH and TOTALTIME are, from RPN's point of view, constants)

or to expand VDEF capabilities, so that it can do:

VDEF:constant=WIDTH,TOTALTIME,/
CDEF:t=p,constant,*,s,+

I still stand by my suggestion to discuss this on rrd-developers

-- 
Alex van den Bogaerdt
http://www.vandenbogaerdt.nl/rrdtool/



More information about the rrd-users mailing list