X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=doc%2Frrdgraph_rpn.pod;h=b2a84dd9daa4a1c55d3a354e9de577918e94cc14;hb=a6d79528b4812e8eb3927dba3cdd42e6ca51b287;hp=74ac4ad40751ad898c783bd0185034c7673a0507;hpb=a6f5f1b6b90008e73fa57882276bc643c039bb09;p=rrdtool.git diff --git a/doc/rrdgraph_rpn.pod b/doc/rrdgraph_rpn.pod index 74ac4ad..b2a84dd 100644 --- a/doc/rrdgraph_rpn.pod +++ b/doc/rrdgraph_rpn.pod @@ -15,11 +15,12 @@ takes as many elements from the stack as needed. Pushing is done implicitly, so whenever you specify a number or a variable, it gets pushed onto the stack automatically. -At the end of the calculation there should be one and only one -value left on the stack. This is the outcome of the function and -this is what is put into the I. For B instructions, -the stack is processed for each data point on the graph. B -instructions work on an entire data set in one run. +At the end of the calculation there should be one and only one value left on +the stack. This is the outcome of the function and this is what is put into +the I. For B instructions, the stack is processed for each +data point on the graph. B instructions work on an entire data set in +one run. Note, that currently B instructions only support a limited +list of functions. Example: C @@ -29,7 +30,7 @@ of your RRD script. Example: C This means: push variable I, push the number 8, execute -the operator I<+>. The operator needs two elements and uses those +the operator I<*>. The operator needs two elements and uses those to return one value. This value is then stored in I. As you may have guessed, this instruction means nothing more than I. The real power of B lies in the @@ -126,6 +127,10 @@ B Convert angle in degrees to radians, or radians to degrees. +B + +Take the absolute value. + =item Set Operations B @@ -138,6 +143,13 @@ Example: C will compute the average of the values v1 to v6 after removing the smallest and largest. +B + +Pop one element (I) from the stack. Now pop I elements and build the +average, ignoring all UNKNOWN values in the process. + +Example: C + B Create a "sliding window" average of another data series. @@ -195,8 +207,6 @@ number 2 if it is the second, and so on. This special value allows you to make calculations based on the position of the value within the data set. This function cannot be used in B instructions. -Z<> - =item Time Time inside RRDtool is measured in seconds since the epoch. The @@ -230,7 +240,7 @@ Z<> =head1 VARIABLES -These operators work only on B statements. +These operators work only on B statements. Note that currently ONLY these work for B. =over 4 @@ -272,6 +282,18 @@ finite numbers and are always more than the I numbers. Example: C +=item LSLSLOPE, LSLINT, LSLCORREL + +Return the parameters for a Beast Bquares Bine I<(y = mx +b)> +which approximate the provided dataset. LSLSLOPE is the slope I<(m)> of +the line related to the COUNT position of the data. LSLINT is the +y-intercept I<(b)>, which happens also to be the first data point on the +graph. LSLCORREL is the Correlation Coefficient (also know as Pearson's +Product Moment Correlation Coefficient). It will range from 0 to +/-1 +and represents the quality of fit for the approximation. + +Example: C + =back =head1 SEE ALSO @@ -285,6 +307,6 @@ Make sure to read L for tipsEtricks. =head1 AUTHOR -Program by Tobias Oetiker Eoetiker@ee.ethz.chE +Program by Tobias Oetiker Etobi@oetiker.chE This manual page by Alex van den Bogaerdt Ealex@ergens.op.het.netE