[rrd-users] accessing vdef from another vdef

duanew duane.walker at suncorp.com.au
Wed Aug 5 05:21:49 CEST 2009




duanew wrote:
> 
> 
I am trying to plot data against "2" y axes. From reading the forums and
various searches the preferred method seems to be to scale one set of data.

> 
> 
I have an rrd file with 4 values; time, good, slow and fail.  The time is
the most important and it will be left unaltered.  However I want to scale
good, slow and fail to match the maximum of time.

> 
> 
I work out the total of good, slow and fail.

> 
> 
DEF:a=xxx.rrd:good:AVERAGE 
> 
DEF:b=xxx.rrd:slow:AVERAGE 
> 
DEF:c=xxx.rrd:fail:AVERAGE 
> 
CDEF:total=a,b,+,c,+ 
> 
VDEF:maxtotal=total,MAXIMUM 
> 
> 
then I work out the maximum time:
> 
> 
DEF:d=xxx.rrd:time:AVERAGE 
> 
VDEF:maxtime=d,MAXIMUM 
> 
> 
but then I want to work out a ratio to adjust a, b and c by:

> 
> 
VDEF:ratio=maxtotal,maxtime,/ 
> 
> 
but it says "variable 'maxtotal' not DEF nor CDEF in VDEF 'ratio' ".
> 
> 
Is this just not supported?  Is there some other way I can do it?
> 
> 
Here is the file script:
> 
>  http://n2.nabble.com/file/n3383194/rrdfetch.sh rrdfetch.sh 
> 

Sorry, I missed ths bit:


Note that currently only aggregation functions work in VDEF rpn expressions.
Patches to change this are welcome.


I should be able to calculate and apply the ratio in the CDEF.

-- 
View this message in context: http://n2.nabble.com/accessing-vdef-from-another-vdef-tp3383194p3388902.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.



More information about the rrd-users mailing list