[rrd-developers] How to create a new Data Type and Consolidation Function?

Steve Shipway s.shipway at auckland.ac.nz
Fri Feb 4 05:32:38 CET 2011

> We need to graph a COUNTER (as input) but for output, instead of a rate of
> change, we simply need the difference against the previous reading (instead
> of difference against the previous reading divided by the polling period in
> seconds, as the existing COUNTER data type of RRDTool).

I think you can achieve this by using a normal COUNTER and then using AVG*interval

> Also for Consolidation, we would like to simply add all the values, so a new
> Consolidation Function is needed as well (in addition to the existing

Again, you can probably get this by using SUM( AVG * interval )

This is how Routers2 gives the total traffic count for the last 24 hours -- it asks for a sum over the last 24*12 cdp AVG values, multiplied by 300 (since the interval is 5min).  A bit of maths will show you that this results in the correct total value for the period.


Steve Shipway
ITS Unix Services Design Lead
University of Auckland, New Zealand
Floor 1, 58 Symonds Street, Auckland
Phone: +64 (0)9 3737599 ext 86487
DDI: +64 (0)9 924 6487
Mobile: +64 (0)21 753 189
Email: s.shipway at auckland.ac.nz
 Please consider the environment before printing this e-mail 

More information about the rrd-developers mailing list