[rrd-users] Graph Question - average of maximum's

Peter Hall peter.hall at acision.com
Sun Mar 23 23:08:59 CET 2008


Wonderful  - works well,

Thanks for your help.

On Sun, 2008-03-23 at 14:48 +0100, Alex van den Bogaerdt wrote:

> On Sat, Mar 22, 2008 at 11:24:20PM +0100, Peter Hall wrote:
> 
> 
> > I need to obtain the average of the maximum's that have been collected
> > over a period of time.
> 
> 
> > I have 6 RRD's that have been created with the following command, 1 for
> > each system...
> > 
> > rrdtool create statistics.rrd --start 1203393659 --step 60 \
> >                         DS:smh_da:GAUGE:60:1:U       \
> >                         RRA:AVERAGE:0.5:1:302400     \
> >                         RRA:MIN:0.5:1440:60          \
> >                         RRA:MAX:0.5:1440:60         
> 
> Good. Maximums are present.
> 
> > rrdtool graph delivery.png --title "Total Delivery Rate (Test)" \
> >    DEF:smvs41m=$base/smvs41/statistics.rrd:smh_da:MAX \
> >    DEF:smvs61m=$base/smvs61/statistics.rrd:smh_da:MAX \
> >    DEF:smvs81m=$base/smvs81/statistics.rrd:smh_da:MAX \
> >    DEF:smvs51m=$base/smvs51/statistics.rrd:smh_da:MAX \
> >    DEF:smvs71m=$base/smvs71/statistics.rrd:smh_da:MAX \
> >    DEF:smvs91m=$base/smvs91/statistics.rrd:smh_da:MAX \
> >    CDEF:totalm=smvs41m,smvs61m,+,smvs81m,+,smvs51m,+,smvs71m,+,smvs91m,+ \
> 
> totalm is an array of sums of all maximums.  For instance: look at
> smvs41m as an array:
> 
> smvs41m[0]=some value
> smvs41m[1]=some value
> smvs41m[2]=some value
> ... and so on.
> 
> Dito for the other data sources.
> 
> Now totalm is an array of sums:
> 
> totalm[0]=smvs41m[0]+smvs61m[0]+smvs81m[0]...91m[0]
> totalm[1]=smvs41m[1]+smvs61m[1]+smvs81m[1]...91m[1]
> ... and so on
> 
> 
> >                            VDEF:smh_ave=totalm,AVERAGE \
> 
> smh_ave is the average of the values in totalm ...
> 
> >                            GPRINT:smh_ave:" %5.0lf" \
> 
> ... and is printed.
> 
> Summary: you are printing the average of the sum of the maximums for
> each datasource, for each time interval. The number will be 600% of
> what you expect.
> 
> It seems to me that you want something different:
> 
> CDEF:avgmax1=smvs41m,smvs61m,smvs81m,smvs51m,smvs71m,smvs91m,AVG
> VDEF:avgmax2=avgmax1,AVERAGE
> 
> This will, for each time interval, compute an average of each maximum
> (the CDEF), and then compute an average of those averages (the VDEF).
> 
> 
> HTH

_________________________________________ 

Peter Hall
Systems Engineer
____________________________________ 

Acision. Innovation. Assured.

www.acision.com

P.O. Box 261
3430 A.G. Nieuwegein
The Netherlands

T:  +31 (0) 30 210 3333
M: +31 (0) 6 5090 1598
E:  peter.hall at acision.com


This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20080323/d301726d/attachment.html 


More information about the rrd-users mailing list