# [rrd-users] Re: functionality question

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Sat Sep 8 00:43:09 MEST 2001

```Kempf, Reed wrote:
>         rrdtool graph - \
>         --start \${RRDDATE} \
>         --title \${TITLE} \
>         --imginfo '<IMG SRC="img/%s" WIDTH="%lu" HEIGHT="%lu" ALT="Demo">'\
>         --imgformat PNG \
>

Here you ask for averages ...

> Is there a way to graph the true MIN and MAX values for weekly, monthly and
> yearly time periods.

Sure.  DEF:....:MIN  and DEF:....:MAX

It is important to understand that each CDP is an average, by nature.
When multiple CDPs have to be aggregated into a new one (for instance
due to graphing but also due to consolidating) the minimum of the CDPs
to aggregate is stored in the MIN RRA, same for average and max.

When the data is prepared to be printed (PRINT) or graphed (or GPRINT)
the same happens.

So, for a series of 3,5,7 that needs to be aggregated into one new
value (called x):

When the DEF used MIN:      x=3
When the DEF used AVERAGE:  x=5
When the DEF used MAX:      x=3

When 9 values are used to build a 3 pixel wide graph:
(I know, absurd example, it is just for the discussion)

Values are: 1 2 4 8 16 32 64 128 256

DEF:a=....:MIN
DEF:b=....:AVERAGE
DEF:c=....:MAX

Since the graph is only 3 pixels wide, the 9 values will have to be
consolidated.  a,b,c become: {1,8,64}, {2.33,18.67,149.33}, {4,32,256}

PRINT:a:MIN:"%6.2lf"
This will print the minimum of the minima: 1.00
PRINT:a:AVERAGE:"%6.2lf"
This will print the average of the minima: 24.33
PRINT:a:MAX:"%6.2lf"
This will print the maximum of the minima: 64.00

PRINT:b:MIN:"%6.2lf"
The minimum of the averages: 2.33
PRINT:b:AVERAGE:"%6.2lf"
The average of the averages: 56.78
PRINT:b:MAX:"%6.2lf"
The maximum of the averages: 149.33

PRINT:c:MIN:"%6.2lf"
PRINT:c:AVERAGE:"%6.2lf"
PRINT:c:MAX:"%6.2lf"
The minimum,average,maximum of the maxima: 4,97.33,256

Note: values above may have been miscalculated by me, I didn't use
RRDtool to produce them.

HTH
--
__________________________________________________________________
/ alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. |
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

--
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