[rrd-developers] [PATCH] Standard deviation aggregation function for VDEF

Patrick J Cherry patrick at bytemark.co.uk
Tue Sep 4 10:23:59 CEST 2007


Hello.

Having written a method for calculating standard deviation using CDEFs
and VDEFs, I decided that I'd patch rrdtool to have an STDEV aggregation
function for VDEF.

Here how I calculated it with VDEFs and CDEFs:

rrdtool graph /dev/null \
  DEF:01min=load.rrd:01min:AVERAGE \
  VDEF:01min_mean=01min,AVERAGE
  CDEF:01min_deviation=01min,01min_mean,- \
  CDEF:01min_s_deviation=01min_deviation,01min_deviation,* \
  VDEF:01min_ms_deviation=01min_s_deviation,AVERAGE \
  CDEF:01min_rms_deviation=01min,0,*,01min_ms_deviation,SQRT,+ \
  VDEF:01min_stdev=01min_rms_deviation,FIRST \
  PRINT:01min_stdev:%lf

Rather longwinded -- maybe I could have done it a bit better?

So I thought a patch would be easier, and it wasn't so hard, so here it
is.  It patches OK against the latest SVN snapshot (1.2.99907080300),
but not against the version shipped with Debian stable (1.2.15) --
things have moved around quite a bit since then.

Best wishes,

-- 
Patrick Cherry                                 Bytemark Hosting Support
                                             http://www.bytemark.co.uk/
                                             tel: +44 (0) 845 004 3 004
-------------- next part --------------
A non-text attachment was scrubbed...
Name: standard_deviation.patch
Type: text/x-diff
Size: 3697 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/rrd-developers/attachments/20070904/9fd5ec31/attachment-0001.bin 


More information about the rrd-developers mailing list