<span style="font-family: courier new,monospace;">Looks like I did a poor job pasting the commands I&#39;ve been using. </span>
<span style="font-family: courier new,monospace;">Am I wrong to assume
that I can add the max value from each independent RRD? This page seems
to suggest so, but I do not understand why:</span> 
<span style="font-family: courier new,monospace;"><a href="http://www.vandenbogaerdt.nl/rrdtool/min-avg-max.php">http://www.vandenbogaerdt.nl/rrdtool/min-avg-max.php</a></span><br><span style="font-family: courier new,monospace;"><br>
Straight from the command line:</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">/usr/bin/rrdtool graph 1-day.png --end now --start e-1d --imgformat PNG \</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">DEF:service_0=database_0.rrd:audience:MAX CDEF:users_0=service_0,UN,0,service_0,IF \</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">DEF:service_1=database_1.rrd:audience:MAX CDEF:users_1=service_1,UN,0,service_1,IF \</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">DEF:service_2=database_2.rrd:audience:MAX CDEF:users_2=service_2,UN,0,service_2,IF \</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">DEF:service_3=database_3.rrd:audience:MAX CDEF:users_3=service_3,UN,0,service_3,IF \</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">DEF:service_4=database_4.rrd:audience:MAX CDEF:users_4=service_4,UN,0,service_4,IF \</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">DEF:service_5=database_5.rrd:audience:MAX CDEF:users_5=service_5,UN,0,service_5,IF \</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">CDEF:aggregate_users=users_0,users_1,users_2,users_3,users_4,users_5,+,+,+,+,+ \</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">LINE1:aggregate_users#000000 \</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">VDEF:peak_users=aggregate_users,MAXIMUM \</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">VRULE:peak_users#0000FF COMMENT:\\n \</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">GPRINT:peak_users:&#39;Peak of %.0lf users&#39; \</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">GPRINT:peak_users:&#39;%Y/%m/%d %I\:%M%p (%Z):strftime&#39;</span><br style="font-family: courier new,monospace;">
<br><span style="font-family: courier new,monospace;">OUTPUT: <a href="http://www.androidmilitia.com/rrdtool/1-day.png">http://www.androidmilitia.com/rrdtool/1-day.png</a></span><br><br><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">/usr/bin/rrdtool graph 1-week.png --end now --start e-1w --imgformat PNG \</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">DEF:service_0=database_0.rrd:audience:MAX CDEF:users_0=service_0,UN,0,service_0,IF \</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">DEF:service_1=database_1.rrd:audience:MAX CDEF:users_1=service_1,UN,0,service_1,IF \</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">DEF:service_2=database_2.rrd:audience:MAX CDEF:users_2=service_2,UN,0,service_2,IF \</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">DEF:service_3=database_3.rrd:audience:MAX CDEF:users_3=service_3,UN,0,service_3,IF \</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">DEF:service_4=database_4.rrd:audience:MAX CDEF:users_4=service_4,UN,0,service_4,IF \</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">DEF:service_5=database_5.rrd:audience:MAX CDEF:users_5=service_5,UN,0,service_5,IF \</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">CDEF:aggregate_users=users_0,users_1,users_2,users_3,users_4,users_5,+,+,+,+,+ \</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">LINE1:aggregate_users#000000 \</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">VDEF:peak_users=aggregate_users,MAXIMUM \</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">VRULE:peak_users#0000FF COMMENT:\\n \</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">GPRINT:peak_users:&#39;Peak of %.0lf users&#39; \</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">GPRINT:peak_users:&#39;%Y/%m/%d %I\:%M%p (%Z):strftime&#39;</span><br><br><font face="courier new,monospace">OUTPUT: <a href="http://www.androidmilitia.com/rrdtool/1-week.png">http://www.androidmilitia.com/rrdtool/1-week.png</a></font><br>
<br><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">/usr/bin/rrdtool graph 1-month.png --end now --start e-1m --imgformat PNG \</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">DEF:service_0=database_0.rrd:audience:MAX CDEF:users_0=service_0,UN,0,service_0,IF \</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">DEF:service_1=database_1.rrd:audience:MAX CDEF:users_1=service_1,UN,0,service_1,IF \</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">DEF:service_2=database_2.rrd:audience:MAX CDEF:users_2=service_2,UN,0,service_2,IF \</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">DEF:service_3=database_3.rrd:audience:MAX CDEF:users_3=service_3,UN,0,service_3,IF \</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">DEF:service_4=database_4.rrd:audience:MAX CDEF:users_4=service_4,UN,0,service_4,IF \</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">DEF:service_5=database_5.rrd:audience:MAX CDEF:users_5=service_5,UN,0,service_5,IF \</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">CDEF:aggregate_users=users_0,users_1,users_2,users_3,users_4,users_5,+,+,+,+,+ \</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">LINE1:aggregate_users#000000 \</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">VDEF:peak_users=aggregate_users,MAXIMUM \</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">VRULE:peak_users#0000FF COMMENT:\\n \</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">GPRINT:peak_users:&#39;Peak of %.0lf users&#39; \</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">GPRINT:peak_users:&#39;%Y/%m/%d %I\:%M%p (%Z):strftime&#39;</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">OUTPUT: <a href="http://www.androidmilitia.com/rrdtool/1-month.png">http://www.androidmilitia.com/rrdtool/1-month.png</a></span><br style="font-family: courier new,monospace;">
<br><span style="font-family: courier new,monospace;">---------------</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">- Nick Harris -</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">---------------</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><div style="font-family: courier new,monospace;" class="gmail_quote">
On Mon, Jul 6, 2009 at 9:23 PM, Nicholas Harris <span dir="ltr">&lt;<a href="mailto:nicholas.kyle@gmail.com">nicholas.kyle@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello all,<br>
<br>
I&#39;ve dug long and deep but I haven&#39;t found an answer to a problem I&#39;ve
run into recently (though, I am pretty new at this, so please excuse my
ignorance).  <br><br>Here&#39;s the setup: I have a number of RRDs generated with the following command:<br>&#39;/usr/bin/rrdtool create DATABASE_NAME DS:audience:GAUGE:600:0:U RRA:MAX:0.5:1:105120&#39;<br>



<br>Each database stores the number of users in our system, and is
updated every five minutes via Cron. Originally, I had more
consolidation going on, but I&#39;ve been cutting bits out to try and solve
this issue - now I just store five minute snapshots over the course of
a year.<br>


<br>And here&#39;s the rub: when I try to graph out multiple RRDs together
(single graph), the numbers do not match up for different time periods.
I&#39;ll run the graph command for now-1day, now-1week and now-1month, and
get three different results for each.  When I do this for one RRD at a
time, I get consistent results (which leads me to believe something is
wrong with my command). Multiple RRDs at the same time goes bonkers.<br>


<br>The data is pretty limited and should show the exact same data for
each time period. I only ran it for a small amount of time so I could
compare numbers over different periods.<br><br>Any input on this would be greatly appreciated. Here are the commands I&#39;m using and sample outputs. <br>


<br><br>COMMAND:<br>/usr/bin/rrdtool graph 1-day.png --end now --start e-1d --imgformat PNG<br>DEF:service_0=database_0.rrd:audience:MAX CDEF:users_0=service_0,UN,0,service_0,IF <br>



DEF:service_1=database_1.rrd:audience:MAX CDEF:users_1=service_1,UN,0,service_1,IF <br>DEF:service_2=database_2.rrd:audience:MAX CDEF:users_2=service_2,UN,0,service_2,IF <br>DEF:service_3=database_3.rrd:audience:MAX CDEF:users_3=service_3,UN,0,service_3,IF <br>




DEF:service_4=database_4.rrd:audience:MAX CDEF:users_4=service_4,UN,0,service_4,IF <br>DEF:service_5=database_5.rrd:audience:MAX CDEF:users_5=service_5,UN,0,service_5,IF <br>CDEF:aggregate_users=users_0,users_1,users_2,users_3,users_4,users_5,+,+,+,+,+ <br>




LINE1:aggregate_users#FF0000 <br>VDEF:peak_users=concurrent_users,MAXIMUM <br>VRULE:peak_users#0000FF COMMENT:\\n <br>GPRINT:peak_users:&#39;Peak of %.0lf users&#39; <br>GPRINT:peak_users:&#39;%Y/%m/%d %I\:%M%p (%Z):strftime&#39;<br>




<br>RESULT:<br><a href="http://www.androidmilitia.com/rrdtool/1-day.png" target="_blank">http://www.androidmilitia.com/rrdtool/1-day.png</a><br><br><br>COMMAND:<br>/usr/bin/rrdtool graph 1-week.png --end now --start e-1w --imgformat PNG <br>




DEF:service_0=database_0.rrd:audience:MAX CDEF:users_0=service_0,UN,0,service_0,IF <br>DEF:service_1=database_1.rrd:audience:MAX CDEF:users_1=service_1,UN,0,service_1,IF <br>DEF:service_2=database_2.rrd:audience:MAX CDEF:users_2=service_2,UN,0,service_2,IF <br>




DEF:service_3=database_3.rrd:audience:MAX CDEF:users_3=service_3,UN,0,service_3,IF <br>DEF:service_4=database_4.rrd:audience:MAX CDEF:users_4=service_4,UN,0,service_4,IF <br>DEF:service_5=database_5.rrd:audience:MAX CDEF:users_5=service_5,UN,0,service_5,IF <br>




CDEF:aggregate_users=users_0,users_1,users_2,users_3,users_4,users_5,+,+,+,+,+ <br>LINE1:aggregate_users#FF0000 <br>VDEF:peak_users=concurrent_users,MAXIMUM <br>VRULE:peak_users#0000FF COMMENT:\\n <br>GPRINT:peak_users:&#39;Peak of %.0lf users&#39; <br>




GPRINT:peak_users:&#39;%Y/%m/%d %I\:%M%p (%Z):strftime&#39;<br><br>RESULT:<br><a href="http://www.androidmilitia.com/rrdtool/1-week.png" target="_blank">http://www.androidmilitia.com/rrdtool/1-week.png</a><br><br><br>COMMAND:<br>



/usr/bin/rrdtool graph 1-month.png --end now --start e-1m --imgformat PNG <br>
DEF:service_0=database_0.rrd:audience:MAX CDEF:users_0=service_0,UN,0,service_0,IF <br>DEF:service_1=database_1.rrd:audience:MAX CDEF:users_1=service_1,UN,0,service_1,IF <br>DEF:service_2=database_2.rrd:audience:MAX CDEF:users_2=service_2,UN,0,service_2,IF <br>




DEF:service_3=database_3.rrd:audience:MAX CDEF:users_3=service_3,UN,0,service_3,IF <br>DEF:service_4=database_4.rrd:audience:MAX CDEF:users_4=service_4,UN,0,service_4,IF <br>DEF:service_5=database_5.rrd:audience:MAX CDEF:users_5=service_5,UN,0,service_5,IF <br>




CDEF:aggregate_users=users_0,users_1,users_2,users_3,users_4,users_5,+,+,+,+,+ <br>LINE1:aggregate_users#FF0000 <br>VDEF:peak_users=concurrent_users,MAXIMUM <br>VRULE:peak_users#0000FF COMMENT:\\n <br>GPRINT:peak_users:&#39;Peak of %.0lf users&#39; <br>




GPRINT:peak_users:&#39;%Y/%m/%d %I\:%M%p (%Z):strftime&#39;<br><br>RESULT:<br><a href="http://www.androidmilitia.com/rrdtool/1-month.png" target="_blank">http://www.androidmilitia.com/rrdtool/1-month.png</a><br><br><br>I
also tried it on two different systems with the same results: one was
RRDtool 1.2.23 and the other was RRDtool 1.3.7.  I&#39;ve stopped updating
these RRDs - if anyone thinks they can trouble shoot, I&#39;d be happy to
upload them.<br>


<br><br>---------------<br>- Nick Harris -<br>---------------
</blockquote></div><br style="font-family: courier new,monospace;">