Am Mittwoch, 12. November 2003 11:59 schrieb Carles Xavier Munyoz Baldó: > Hi, > I have a RRD database file in which I store 3 data source values. > I would like to merge the values of the 3 data sources. > > With the graph I have no problem because I use AREA to plot the 3 data > sources with the same colour, this way I get a one colour graph with the 3 > data sources merged. > The problem is in the legend, how may I print the merged result values for > the 3 data sources in the LAST, CURRENT, and MAX legend values ? >
If you want to add your DSes, solution would be: CDEF:sum=ds1,ds2,+,ds3,+ (Maybe you should do: CDEF:sum=ds1,UN,0,ds1,IF,ds2,UN,0,ds2,IF+,ds3,UN,0,ds3,IF,+ to avoid unknown values) Then graph sum and GPRINT sum with LAST, MAX. If you want to put it all into one graph so that the highest will win, CDEF will be: CDEF:merge=ds1,ds2,GT,ds1,ds2,IF CDEF:result=merge,ds3,GT,merge,ds3,IF example: rrdtool graph --start 1068612000 test.png DEF:ds1=merge.rrd:ds1:AVERAGE DEF:ds2=merge.rrd:ds2:AVERAGE DEF:ds3=merge.rrd:ds3:AVERAGE CDEF:merge=ds1,UN,0,ds1,IF,ds2,UN,0,ds2,IF,GT,ds1,UN,0,ds1,IF,ds2,UN,0,ds2,IF,IF CDEF:result=merge,ds3,UN,0,ds3,IF,GT,merge,ds3,UN,0,ds3,IF,IF PRINT:result:LAST:"LAST\: %02.0lf" PRINT:result:MAX:"MAX\: %02.0lf" PRINT:result:MIN:"MIN\: %02.0lf" Then GPRINT result with LAST,MAX. HTH, Stephan -- Stephan Harren Manager Site Operations AboveNet Deutschland GmbH ------------------------------- Phone +49 69 90554 153 Fax +49 69 90554 111 Cell +49 173 7011126 -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
