X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=doc%2Fcdeftutorial.pod;h=101f1c9d0f70317524c08aa74fb079949e643cb1;hb=ec028ffc51de6a4d33427ea505e2839b0516fd7d;hp=fe580634e25032e1dc085c6c1407bebb9f5c9975;hpb=0fe03275068c0e55d01a7cc2308fa12fdee569cf;p=rrdtool.git diff --git a/doc/cdeftutorial.pod b/doc/cdeftutorial.pod index fe58063..101f1c9 100644 --- a/doc/cdeftutorial.pod +++ b/doc/cdeftutorial.pod @@ -838,6 +838,31 @@ the other half of your graph. This can be done in a relatively simple way: what you need is the "wipeout" variable and place a negative sign before it: "CDEF:wipeout2=wipeout,-1,*" +=head2 Filtering data + +You may do some complex data filtering: + + MEDIAN FILTER: filters shot noise + + DEF:var=database.rrd:traffic:AVERAGE + CDEF:prev1=PREV(var) + CDEF:prev2=PREV(prev1) + CDEF:prev3=PREV(prev2) + CDEF:median=prev1,prev2,prev3,+,+,3,/ + LINE3:median#000077:filtered + LINE1:prev2#007700:'raw data' + + + DERIVATE: + + DEF:var=database.rrd:traffic:AVERAGE + CDEF:prev1=PREV(var) + CDEF:time=TIME + CDEF:prevtime=PREV(time) + CDEF:derivate=var,prev1,-,time,prevtime,-,/ + LINE3:derivate#000077:derivate + LINE1:var#007700:'raw data' + =head1 Out of ideas for now This document was created from questions asked by either myself or