[rrd-users] Another question about MAX value
Sorrell, Al
Al_Sorrell at troweprice.com
Tue Apr 16 23:17:14 MEST 2002
I _thought_ I understood this, but...
My user wants to be able to drill down in detail for information anytime in
the past 13 months, so I create a big RRD with just one AVERAGE and one MAX
consolidation for 400 days' worth of data at 10-minute samples:
$incr=10;
$keep_raw = 400*(3600/$incr)*24;
$keep_raw_steps=1;
$hb=2*$incr; #RRD Heartbeat = 2*increment
RRDs::create ($rrdfile,
"--start",$now-1,
"--step",$incr,
"DS:busy:GAUGE:$hb:0:U",
"DS:idle:GAUGE:$hb:0:U",
"DS:dis:GAUGE:$hb:0:U",
"RRA:AVERAGE:0.5:$keep_raw_steps:$keep_raw",
"RRA:MAX:0.5:$keep_raw_steps:$keep_raw"
);
I put a mess of data into the RRD from earlier .csv file and then plot 4
graphs, using varying start times of -24 hours, -7 days, -31 days and -366
days ago, plot the data and show the MAX value for the period graphed:
$now=time(); #Nominal sample time
$now=$now-($now % $incr);# fix minor time offset so time is multiple of
$incr
@sec_ago=(3600*24, 3600*24*7, 3600*24*31, 3600*24*366); #1day, 1
week, 1 month, 1 year
$ngraph=@sec_ago;
for ($graph=0; $graph < $ngraph; $graph++) {
$startplot=$now - $sec_ago[$graph];
...
RRDs::graph "$outfile",
"--title","$title",
"--start","$startplot",
"--end","$now",
"--imgformat","PNG",
"--width","600",
"--height","200",
"--vertical-label","Channels",
"DEF:dis=$rrdfile:dis:AVERAGE",
"DEF:busy=$rrdfile:busy:AVERAGE",
"DEF:idle=$rrdfile:idle:AVERAGE",
"HRULE:$thresh#0000c8:Warning",
"AREA:dis#4040ff:Disabled",
"STACK:busy#fef2a:Busy",
"STACK:idle#00cc40:Idle\\c",
"COMMENT:\\s",
"COMMENT:$comment\\c",
"GPRINT:busy:MAX:Max %1.0lf circuits busy for range plotted.\\c";
}
The periods plotted appear correct but the MAX values on the graphs are
inconsistent -
1 day 7 days 31 days 366 days
MAX 36 56 55 37
I would have expected that since the 31 days and 366 days plots both are a
superset of the 7 days range, that the MAX value should be AT LEAST that
seen during the 7 day plot. Since there is (should be) no aggregation of the
data, I would have expected to see the same value for the last three plots -
I think I'm averaging over 1 sample, which should be the sample value. Not
sure what that would do.
Thanks,
Al
--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-users
mailing list