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

This is a discussion on Re: [rrd-users] Graph Question - average of maximum's within the RRD Users forums, part of the Networking and Network Related category; On Sat, Mar 22, 2008 at 11:24:20PM +0100, Peter Hall wrote: > I need to obtain the average ...


Go Back   Usenet Forums > Networking and Network Related > RRD Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-23-2008
Alex van den Bogaerdt
 
Posts: n/a
Default Re: [rrd-users] Graph Question - average of maximum's

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,smvs7 1m,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
--
Alex van den Bogaerdt
http://www.vandenbogaerdt.nl/rrdtool/

_______________________________________________
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:56 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0