[rrd-users] Average value over last ten minutes?

Per Rovegård per.rovegard at gmail.com
Tue Jul 10 14:30:21 CEST 2012

On 10 jul 2012, at 00:55, Steve Shipway <s.shipway at auckland.ac.nz> wrote:

> If you want a rolling 10min average calculated every minute, you should instead use the 'rrdtool xport' function to pull out 1min interval data, and then use a CDEF to calculate the last-10-min average by utilising the trendnan RPN function -- eg, 
> rrdtool xport -e now -s 'end-10min' -s 60
>  DEF:x=rrdfile.rrd:ds:AVERAGE CDEF:tenminavg=x,600,TRENDNAN
>  XPORT:tenminavg
> NOTE that your 1min RRA will need to be AT LEAST 20 cdp long for this to work!  So, use RRA:AVERAGE:0.5:1:20 as a minimum.  This is from memory so check the syntax...

This is pretty much identical to what I suggested earlier, although I used a longer time span. So I'd say it's correct. :-)


More information about the rrd-users mailing list