[rrd-users] Re: totalling..

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Thu Apr 4 23:21:16 MEST 2002

Wupsje wrote:

> How can there still be differences between TOTALS when they are calculation
> they're totals from the same data?
> Cause i started with a clean rrd file less then a week ago (30th March).
> -- URL : http://www.ee.ethz.ch/~slist/pantomime/WpS_weekly.png
> -- URL : http://www.ee.ethz.ch/~slist/pantomime/WpS_monthly.png
> -- URL : http://www.ee.ethz.ch/~slist/pantomime/WpS_yearly.png

What TOTAL does is this:

            for (step=0;step<steps;step++) {
                if (finite(data[step*src->ds_cnt])) {
                    sum += data[step*src->ds_cnt];
                    cnt ++;

            dst->vf.val  = sum*src->step;
            dst->vf.when = cnt*src->step;

So, for each step in an RRA that is not unknown nor infinite, collect
its value into a grand total.  After this multiply the total by the
amount of time.  This works (or at least I think this works) because
you can add up rates: (b1/s + b2/s) == (b1+b2)/s

If these numbers are different then I guess this is a list of possible
- you are not working with AVERAGEs
- you have unknown data which becomes known data (due to xff)
- the program is flawed
   - either my total code
   - or the data consolidation

Please dump the database and do the calculations by hand.  This
shouldn't be too hard as there's not much data yet.

Try to spot irregularities in the data.  Pretend to be rrdtool and
do some of the consolidation yourself.  See if this matches the RRA.

 / 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
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

More information about the rrd-users mailing list