X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=doc%2Frrdgraph_rpn.src;h=4aad4777011246145786450b9f9b641f1d72a112;hb=c2588300e3b61df51b846dd79d90b3da9628d0cb;hp=3278f84179cad1740956f1a8bf53682d9d0ebefc;hpb=b7c278771851b0dfad0daf1c817fbc93316ef96e;p=rrdtool.git diff --git a/doc/rrdgraph_rpn.src b/doc/rrdgraph_rpn.src index 3278f84..4aad477 100644 --- a/doc/rrdgraph_rpn.src +++ b/doc/rrdgraph_rpn.src @@ -1,6 +1,6 @@ =include name -=head1 SYNOPSYS +=head1 SYNOPSIS IRPN expressionE> := IvnameE>|IoperatorE>|IvalueE> @@ -42,16 +42,12 @@ would do C and need no parentheses. B -I - Pop two elements from the stack, compare them for the selected condition and return 1 for true or 0 for false. Comparing an I or an I value will always result in 0 (false). B -I - Pop one element from the stack, compare this to I respectively to I. Returns 1 for true or 0 for false. @@ -98,9 +94,13 @@ B<+, -, *, /, %> Add, subtract, multiply, divide, modulo -B +B + +Sine, cosine (input in radians), log, exp (natural logarithm), square root + +B -Sine, cosine (input in radians), log, exp (natural logarithm) +Arctangent. Output in radians. B @@ -108,6 +108,42 @@ Round down,up to the nearest integer Z<> +=item Set Operations + +B + +Pop one element from the stack. This is the I of items to be sorted +(or reversed). The top I of the remaining elements are then sorted +(or reversed) in place on the stack. + +Example: C will +compute the average of the values v1..v6 after removing the smallest and +largest. + +B + +Create a "sliding window" average of another data series. + +Usage: +CDEF:smoothed=x,1800,TREND + +This will create a half-hour (1800 second) sliding window average of x. The +average is essentially computed as shown here: + + +---!---!---!---!---!---!---!---!---> + now + delay t0 + <---------------> + delay t1 + <---------------> + delay t2 + <---------------> + + + Value at sample (t0) will be the average between (t0-delay) and (t0) + 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) + =item Special values B @@ -127,6 +163,20 @@ set or otherwise the result of this B at the previous time step. This allows you to do calculations across the data. This function cannot be used in B instructions. +B + +Pushes an I value if this is the first value of a data +set or otherwise the result of vname variable at the previous time +step. This allows you to do calculations across the data. This +function cannot be used in B instructions. + +B + +Pushes the number 1 if this is the first value of the data set, the +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 @@ -190,17 +240,35 @@ Z<> =item MAXIMUM, MINIMUM, AVERAGE -Return the corresponding value +Return the corresponding value, MAXIMUM and MINIMUM also return +the first occurrence of that value in the time component. + +Example: C Z<> =item LAST, FIRST -Return the last,first value including its time +Return the last,first value including its time. The time for +FIRST is actually the start of the corresponding interval, where +the LAST time component returns the end of the corresponding interval. + +Example: C + +Z<> + +=item TOTAL + +Returns the rate from each defined time slot multiplied with the +step size. This can for instance return total bytes transfered +when you have logged bytes per second. The time component returns +the amount of seconds + +Example: C Z<> -=item PERCENTILE +=item PERCENT Should follow a B or B I. This I is popped, another number is popped which is a certain percentage (0..100). The @@ -208,9 +276,10 @@ data set is then sorted and the value returned is chosen such that I percent of the values is lower or equal than the result. I values are considered lower than any finite number for this purpose so if this operator returns an I you have quite a lot -of them in your data... +of them in your data. Binite numbers are lesser, or more, than the +finite numbers and are always more than the I numbers. -Example: C +Example: C =back