Hi Craig, hi the list, I think my question was not well understood :o) Take an example : Today, on monday, I have a peak trafic on an ethernet interface at 30 Mbit/s. If I look my graph for today, I can see this peak. But If I look the weekly graph, the peak is not here. The values are averaged, because of the CF AVERAGE.
I manage to define another RRA with the CF MAX and to graph the MAX
values. With a daily graph, the AVERAGE and MAX are the same, it's normal
because we can see all the values on the graph, but with a weekly graph, I
can see the MAX values.
To graph those values, I did that :
<?
// DNS Request
function graph_dns_reqs ($data) {
$opts_DEF =
rrdtool_get_def($data,array(snmp_dns_reqs_b=>"snmp_dns_reqs"));
$opts_GRAPH = array(
"DEF:max_reqs_b=/opt/jffnms/rrd/interface-21-15.rrd:data:MAX",
"CDEF:snmp_dns_reqs=snmp_dns_reqs_b,3600,*",
"CDEF:max_reqs=max_reqs_b,3600,*",
"AREA:snmp_dns_reqs#1000ff:'DNS Requests\\n'",
"GPRINT:snmp_dns_reqs:MAX:'Max\:%5.0lf'",
"GPRINT:snmp_dns_reqs:AVERAGE:'Average\:%5.0lf'",
"GPRINT:snmp_dns_reqs:LAST:'Last\:%5.0lf\\n'",
"LINE1:max_reqs#C0C0C0:'Max dns req\\n'",
"GPRINT:max_reqs:MAX:'Max Requests\:%6.0lf'",
"GPRINT:max_reqs:AVERAGE:'Average\:%5.0lf'",
"GPRINT:max_reqs:LAST:'Last\:%5.0lf\\n'"
);
$opts_header[] = "--vertical-label='DNS Requests per hour'";
return array ($opts_header, array_merge($opts_DEF,$opts_GRAPH));
}
?>
For the second DEF, it is static, I don't know how to have a second DEF
with the rrdtool_get_def function... if someone knows...
A little problem, is the size of the rrd file, 2 time bigger, but I don't
know how to do that by an other way.
I join a graph to illustrate.
Pierre.
> On Fri, Sep 10, 2004 at 12:06:47AM +0200, Pierre-Damien Gatouillat wrote:
>> hmmm, yes it works, I put an "enter" and not a "space".
>>
>> Maybe I'm wrong, but when we have a look to a weekly or monthly graph,
>> all the value are average. The maxima have disappear...
>>
>> I thought with another rra, I could print the maxima. Or is there
>> another solution ?
>
> Be careful about what you are after. The MAX or AVERAGE is the
> consolidation function (CF). This is the function that is used to
> combine the data samples together. It is not used for the maximum value
> across a specific time.
>
> Don't get me wrong, MAXIMUM does have uses. It can help with peak loads
> across several samples, but then the default for JFFNMS is a 1:1 sample,
> data point ratio so it doesn't help that much.
>
> For example, our busy time is around 10am. The graphs as they stand
> print the maximum for the whole day, which is the largest 5 minute
> average value. So if the 10am average is 30Mbps then that is the
> maximum.
>
> The MAXIMUM CF will take the samples and give you the largest value for
> consolidation. So if your samples are 1,1,5,4,20 and your ratio is 5:1
> then the value for that whole time period is 20. The average CF would
> say it was about 6.
>
> The problem is that there is already averaging going on due to sampling.
> If you poll once a minute, the best you can get is the average rate
> across that minute. This assumes you are using counters. So using
> MAXIMUM means you are getting a maximum of an average, which means the
> value changes depending on how lucky or unlucky you poller is. The
> AVERAGE CF will be approximately the same.
> - Craig
> --
> Craig Small GnuPG:1C1B D893 1418 2AF4 45EE 95CB C76C E5AC 12CA DFA5
> Eye-Net Consulting http://www.enc.com.au/ MIEE Debian developer
> csmall at : enc.com.au ieee.org debian.org
>
<<attachment: weekly_with_peak.png>>
