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; --===============0993544209== Content-Type: multipart/alternative; boundary="=-yJbH0UJPg+rUbwShXsz5" --=-yJbH0UJPg+rUbwShXsz5 Content-Type: text/plain Content-Transfer-Encoding: 7bit ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
--===============0993544209==
Content-Type: multipart/alternative; boundary="=-yJbH0UJPg+rUbwShXsz5" --=-yJbH0UJPg+rUbwShXsz5 Content-Type: text/plain Content-Transfer-Encoding: 7bit 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,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 _________________________________________ 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@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. --=-yJbH0UJPg+rUbwShXsz5 Content-Type: text/html; charset=utf-8 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8"> <META NAME="GENERATOR" CONTENT="GtkHTML/3.14.3"> </HEAD> <BODY> Wonderful - works well,<BR> <BR> Thanks for your help.<BR> <BR> On Sun, 2008-03-23 at 14:48 +0100, Alex van den Bogaerdt wrote: <BLOCKQUOTE TYPE=CITE> <PRE> <FONT COLOR="#000000">On Sat, Mar 22, 2008 at 11:24:20PM +0100, Peter Hall wrote:</FONT> <FONT COLOR="#000000">> I need to obtain the average of the maximum's that have been collected</FONT> <FONT COLOR="#000000">> over a period of time.</FONT> <FONT COLOR="#000000">> I have 6 RRD's that have been created with the following command, 1 for</FONT> <FONT COLOR="#000000">> each system...</FONT> <FONT COLOR="#000000">> </FONT> <FONT COLOR="#000000">> rrdtool create statistics.rrd --start 1203393659 --step 60 \</FONT> <FONT COLOR="#000000">> DS:smh_da:GAUGE:60:1:U \</FONT> <FONT COLOR="#000000">> RRA:AVERAGE:0.5:1:302400 \</FONT> <FONT COLOR="#000000">> RRA:MIN:0.5:1440:60 \</FONT> <FONT COLOR="#000000">> RRA:MAX:0.5:1440:60 </FONT> <FONT COLOR="#000000">Good. Maximums are present.</FONT> <FONT COLOR="#000000">> rrdtool graph delivery.png --title "Total Delivery Rate (Test)" \</FONT> <FONT COLOR="#000000">> DEF:smvs41m=$base/smvs41/statistics.rrd:smh_da:MAX \</FONT> <FONT COLOR="#000000">> DEF:smvs61m=$base/smvs61/statistics.rrd:smh_da:MAX \</FONT> <FONT COLOR="#000000">> DEF:smvs81m=$base/smvs81/statistics.rrd:smh_da:MAX \</FONT> <FONT COLOR="#000000">> DEF:smvs51m=$base/smvs51/statistics.rrd:smh_da:MAX \</FONT> <FONT COLOR="#000000">> DEF:smvs71m=$base/smvs71/statistics.rrd:smh_da:MAX \</FONT> <FONT COLOR="#000000">> DEF:smvs91m=$base/smvs91/statistics.rrd:smh_da:MAX \</FONT> <FONT COLOR="#000000">> CDEF:totalm=smvs41m,smvs61m,+,smvs81m,+,smvs51m,+, smvs71m,+,smvs91m,+ \</FONT> <FONT COLOR="#000000">totalm is an array of sums of all maximums. For instance: look at</FONT> <FONT COLOR="#000000">smvs41m as an array:</FONT> <FONT COLOR="#000000">smvs41m[0]=some value</FONT> <FONT COLOR="#000000">smvs41m[1]=some value</FONT> <FONT COLOR="#000000">smvs41m[2]=some value</FONT> <FONT COLOR="#000000">... and so on.</FONT> <FONT COLOR="#000000">Dito for the other data sources.</FONT> <FONT COLOR="#000000">Now totalm is an array of sums:</FONT> <FONT COLOR="#000000">totalm[0]=smvs41m[0]+smvs61m[0]+smvs81m[0]...91m[0]</FONT> <FONT COLOR="#000000">totalm[1]=smvs41m[1]+smvs61m[1]+smvs81m[1]...91m[1]</FONT> <FONT COLOR="#000000">... and so on</FONT> <FONT COLOR="#000000">> VDEF:smh_ave=totalm,AVERAGE \</FONT> <FONT COLOR="#000000">smh_ave is the average of the values in totalm ...</FONT> <FONT COLOR="#000000">> GPRINT:smh_ave:" %5.0lf" \</FONT> <FONT COLOR="#000000">... and is printed.</FONT> <FONT COLOR="#000000">Summary: you are printing the average of the sum of the maximums for</FONT> <FONT COLOR="#000000">each datasource, for each time interval. The number will be 600% of</FONT> <FONT COLOR="#000000">what you expect.</FONT> <FONT COLOR="#000000">It seems to me that you want something different:</FONT> <FONT COLOR="#000000">CDEF:avgmax1=smvs41m,smvs61m,smvs8 1m,smvs51m,smvs71m,smvs91m,AVG</FONT> <FONT COLOR="#000000">VDEF:avgmax2=avgmax1,AVERAGE</FONT> <FONT COLOR="#000000">This will, for each time interval, compute an average of each maximum</FONT> <FONT COLOR="#000000">(the CDEF), and then compute an average of those averages (the VDEF).</FONT> <FONT COLOR="#000000">HTH</FONT> </PRE> </BLOCKQUOTE> <TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%"> <TR> <TD> _________________________________________ <PRE> Peter Hall Systems Engineer ____________________________________ </PRE> <B>Acision. </B><B><FONT COLOR="#808080">Innovation. Assured.</FONT></B><BR> <BR> <A HREF="http://www.acision.com/">www.acision.com</A><BR> <BR> <FONT SIZE="2">P.O. Box 261</FONT><BR> <FONT SIZE="2">3430 A.G. Nieuwegein</FONT><BR> <FONT SIZE="2">The Netherlands</FONT><BR> <BR> <FONT SIZE="2">T: +31 (0) 30 210 3333</FONT><BR> <FONT SIZE="2">M: +31 (0) 6 5090 1598</FONT><BR> <FONT SIZE="2">E: <A HREF="mailto:sjoerd.somsen@acision.com">peter.hall @acision.com</A></FONT> </TD> </TR> </TABLE> <br clear=all> 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. </BODY> </HTML> --=-yJbH0UJPg+rUbwShXsz5-- --===============0993544209== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users --===============0993544209==-- |
![]() |
| Thread Tools | |
| Display Modes | |
|
|