X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=doc%2Fcdeftutorial.pod;h=101f1c9d0f70317524c08aa74fb079949e643cb1;hb=b3bf09be54d5526e591c5c4f49f9244e5eff6b03;hp=3188158479609b49663c70f34a429b84f315afbc;hpb=5837606887a6d81e8b1f7588525cb1c8783fb62b;p=rrdtool.git diff --git a/doc/cdeftutorial.pod b/doc/cdeftutorial.pod index 3188158..101f1c9 100644 --- a/doc/cdeftutorial.pod +++ b/doc/cdeftutorial.pod @@ -29,7 +29,7 @@ other tutorial. =head2 More reading -If you have difficulties with the way I try to explain them please read +If you have difficulties with the way I try to explain it please read Steve Rader's L. It may help you understand how this all works. =head1 What are CDEFs ? @@ -725,7 +725,7 @@ If you do so, you won't be able to use these next GPRINTs: =head2 Degrees Celcius vs. Degrees Fahrenheit - rrdtool graph demo.gif --title="Demo Graph" \ + rrdtool graph demo.png --title="Demo Graph" \ DEF:cel=demo.rrd:exhaust:AVERAGE \ CDEF:far=cel,32,-,0.55555,* \ LINE2:cel#00a000:"D. Celsius" \ @@ -750,7 +750,7 @@ enough for this purpose and it saves a calculation. =head2 Changing unknown into zero - rrdtool graph demo.gif --title="Demo Graph" \ + rrdtool graph demo.png --title="Demo Graph" \ DEF:idat1=interface1.rrd:ds0:AVERAGE \ DEF:idat2=interface2.rrd:ds0:AVERAGE \ DEF:odat1=interface1.rrd:ds1:AVERAGE \ @@ -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