[rrd-users] GPRINT the difference between Max and Min

John Barber johnebarber at gmail.com
Mon May 22 20:05:05 MEST 2006


I have a graph that adds several DSs tegether then displays them as a line.
I would like in the legend to print the difference between thex Max and Min
of all the values added together.

here is what I have tried:

DEF:item0=\rrd1.rrd:DS1:AVERAGE
DEF:item1=\rrd2.rrd:DS2:AVERAGE
DEF:item2=\rrd3.rrd:DS3:AVERAGE
CDEF:total=item0,item1,+,item2,+
VDEF:totalmax=total,MAXIMUM                         --I'm not sure if you
can use MAXIMUM with a CDEF or not
VDEF:totalmin=total,MINIMUM                           --same here

-- option 1
CDEF:totaldev=item0,POP,totalmax,totalmin,-    --a CDEF has to have at least
1 DEF or CDEF so I added 1 and used  POP to get rid of it
LINE2:total#FF0000
GPRINT:totaldev:%6.2lf%s\c>                            --can't GPRINT a CDEF


--  option 2
VDEF:totaldev=totalmax,totalmin,-                     -- Can't use VDEFs in
a VDEF RPN?
LINE2:total#FF0000
GPRINT:totaldev:%6.2lf%s\c>




Any ideas?

Thanks,

--
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://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list