[rrd-users] simple [?] question

Erik de Mare erik at oezie.org
Thu Feb 7 08:10:37 CET 2008


from the manual:
PERCENT 
This should follow a DEF or CDEF vname. The vname is popped, another number
is popped which is a certain percentage (0..100). The data set is then
sorted and the value returned is chosen such that percentage percent of the
values is lower or equal than the result. Unknown values are considered
lower than any finite number for this purpose so if this operator returns
an unknown you have quite a lot of them in your data. Infinite numbers are
lesser, or more, than the finite numbers and are always more than the
Unknown numbers. (NaN < -INF < finite values < INF) 
Example: VDEF:perc95=mydata,95,PERCENT

rrdtool graph - \
DEF:mydata="/usr/share/cacti/site/rra/sw135s3_traffic_in_31.rrd":traffic_in:AVERAGE
\
DEF:b="/usr/share/cacti/site/rra/sw135s3_traffic_in_31.rrd":traffic_out:AVERAGE
\
VDEF:perc95=mydata,95,PERCENT
PRINT:perc95:"%.2lf %s"

with PRINT it prints it to the stdout and with GPRINT it is printed inside
the graph.

Mvg,
Erik de Mare

On Wed, 6 Feb 2008 19:00:18 -0800, "John Bramlett" <j.bramlett at gmail.com>
wrote:
> I need some help formulating a command to extract some data from rrd
> files created by cacti.  All I want returned is a single number
> representing 95th percentile for an arbitrary time period (no
> graphical output; text only).
> 
> I'm not as clueless as this question is but rrdtool is kind of tough
> since I just need this one thing I was hoping someone could help out
> with a general form for a command.
> 
> Below is the command that cacti is using to generate the same number
> that I'm looking for.  (The constant string "13.42 mb/s" in the last
> COMMENT line is what I'm interested in retrieving, but don't know how
> cacti gets to that.)
> 
> 
<snip>



More information about the rrd-users mailing list