From: Tobias Oetiker Date: Sat, 8 Aug 2015 18:45:37 +0000 (+0200) Subject: new RPN oprators NEWDAY,NEWWEEK,NEWMONTH and NEWYEAR allowing to create X-Git-Tag: v1.5.4~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=530c9cef19b234886af67c0512312216f1778fef;p=thirdparty%2Frrdtool-1.x.git new RPN oprators NEWDAY,NEWWEEK,NEWMONTH and NEWYEAR allowing to create charts where the traffic is added up into a monthly total. --- diff --git a/doc/rrdgraph_rpn.pod b/doc/rrdgraph_rpn.pod index c5c1c0b4..33433dcb 100644 --- a/doc/rrdgraph_rpn.pod +++ b/doc/rrdgraph_rpn.pod @@ -198,14 +198,14 @@ average is essentially computed as shown here: Value at sample (t1) will be the average between (t1-delay) and (t1) Value at sample (t2) will be the average between (t2-delay) and (t2) -TRENDNAN is - in contrast to TREND - NAN-safe. If you use TREND and one -source value is NAN the complete sliding window is affected. The TRENDNAN -operation ignores all NAN-values in a sliding window and computes the +TRENDNAN is - in contrast to TREND - NAN-safe. If you use TREND and one +source value is NAN the complete sliding window is affected. The TRENDNAN +operation ignores all NAN-values in a sliding window and computes the average of the remaining values. B -Create a "sliding window" average/sigma/percentil of another data series, +Create a "sliding window" average/sigma/percentil of another data series, that also shifts the data series by given amounts of time as well Usage - explicit stating shifts: @@ -249,17 +249,17 @@ average is essentially computed as shown here: and between (t1-shift2-window) and (t1-shift2) -The function is by design NAN-safe. +The function is by design NAN-safe. This also allows for extrapolation into the future (say a few days) -- you may need to define the data series whit the optional start= parameter, so that +- you may need to define the data series whit the optional start= parameter, so that the source data series has enough data to provide prediction also at the beginning of a graph... -The percentile can be between [-100:+100]. +The percentile can be between [-100:+100]. The positive percentiles interpolates between values while the negative will take the closest. Example: you run 7 shifts with a window of 1800seconds. Assuming that the rrd-file has a step size of 300 seconds this means we have to do the percentile calculation -based on a max of 42 distinct values (less if you got NAN). that means that in the +based on a max of 42 distinct values (less if you got NAN). that means that in the best case you get a step rate between values of 2.4 percent. so if you ask for the 99th percentile, then you would need to look at the 41.59th value. As we only have integers, either the 41st or the 42nd value. @@ -270,7 +270,7 @@ to get the effective value. The negative returns the closest value distance wise - so in the above case 42nd value, which is effectively returning the Percentile100 or the max of the previous 7 days in the window. -Here an example, that will create a 10 day graph that also shows the +Here an example, that will create a 10 day graph that also shows the prediction 3 days into the future with its uncertainty value (as defined by avg+-4*sigma) This also shows if the prediction is exceeded at a certain point. @@ -290,8 +290,8 @@ This also shows if the prediction is exceeded at a certain point. CDEF:perc95=86400,-7,1800,95,value,PREDICTPERC \ LINE1:perc95#ffff00:95th_percentile -Note: Experience has shown that a factor between 3 and 5 to scale sigma is a good -discriminator to detect abnormal behavior. This obviously depends also on the type +Note: Experience has shown that a factor between 3 and 5 to scale sigma is a good +discriminator to detect abnormal behavior. This obviously depends also on the type of data and how "noisy" the data series is. Also Note the explicit use of start= in the CDEF - this is necessary to load all @@ -348,6 +348,13 @@ rate based presentations to absolute numbers CDEF:abs=rate,STEPWIDTH,*,PREF,ADDNAN +B,B,B,B + +These three operators will return 1.0 whenever a step is the first of the given periode. The periodes are determined +according to the local timezone AND the C settings. + + CDEF:mtotal=rate,STEPWIDTH,*,NEWMONTH,PREV,0,IF,ADDNAN + B