<!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/4.4.4">
</HEAD>
<BODY>
Hi Chris,<BR>
<BR>
I assume that it has to do with different "bucket-sizes" which is a result of your different timeframes.<BR>
The max-functions are working on finding the max-values in a Array of data-values.<BR>
<BR>
Lest just have an example with 10 values
<PRE>
A: 2 3 4 5 5 6 4 3 3 4
B: 6 6 8 5 4 4 3 2 1 1
</PRE>
<BR>
If you look on each of the value - and sum that up with the same number of values - you will get:
<PRE>
AB: 8 9 12 10 9 10 7 5 4 5
</PRE>
<BR>
And the max of this will be 12.<BR>
<BR>
But when looking at a year, you may have consolidated the individual numbers into larger buckets - where the max-values are kept.<BR>
Lets just create an example where two values are "joined" (timeslot increased to contain 2 values) - so we reduce the buckets to 5.<BR>
Most people have maybe 2 weeks of data with full resolution, and then consolidate this to larger buckets (from minutes to hours) - and then after a few months of them - go up to some even larger buckets (hours to days).<BR>
<BR>
With the same max, we would then have:
<PRE>
A2: 3 5 6 4 4
B2: 6 8 4 3 1
And our new max-array of the sum would be:
AB2: 9 13 10 7 5
</PRE>
Where the max-value is 13 - and not 12 as above.<BR>
<BR>
I'm not sure what you want to accomplish.<BR>
If you are trying to look on some bandwidth-numbers you should probably not use max anyway - as even a very short peak would offset your hole yearly-data.<BR>
<BR>
Regards, Johan<BR>
<BR>
On Tue, 2013-08-06 at 06:27 -0700, Chris Mason wrote:
<BLOCKQUOTE TYPE=CITE>
Hi,
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
I am trying to create a combined graph with data from two data sources and I am seeing some unexpected results. I have removed everything from my graph and produced a simple script which recreates the problem:
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
DEF:A='a.rrd':DS1:MAX
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
DEF:B='b.rrd':DS1:MAX
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
CDEF:AB=A,B,ADDNAN<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
PRINT:A:MAX:'A\: %.3lf %S'
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
PRINT:B:MAX:'B\: %.3lf %S'
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
PRINT:AB:MAX:'Total\: %.3lf %S'
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
If I graph this with "--start -1m" I get the following:
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
A: 749.807 M<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
B: 1744.822 M
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
Total: 2325.624 M
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
and with "--start -1y":
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
A: 749.807 M
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
B: 1744.822 M
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
Total: 2430.266 M
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
When I attempt to display data with "--start -1y" this is where the problem occurs. As you can see the MAX value for A and B hasn't changed, but my total has?
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
When I convert these values into bps then the difference is 837mbps which isn't a small amount.
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
Am I doing something wrong or is this expected?
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
Thanks,
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
Chris
</BLOCKQUOTE>
</BODY>
</HTML>