[rrd-users] 95% Percentile number to Display as a Negative?

Alex van den Bogaerdt alex at vandenbogaerdt.nl
Wed Mar 17 10:12:49 CET 2010


> "VDEF:if_in_pc=if_in_bits,95,PERCENT" \
> "VDEF:if_out_pc=if_out_bits,95,PERCENT" \

> The above 95th Percentile lines calculate the positive 95th Percentile for
> both (if_in and if_out) data sources in my RRD however I cannot convert 
> the
> VDEF result to a negative for use as a HRULE when rendering my graph. I 
> also
> cannot obviously calculate my 95th percentile figures using the negative
> integers.
>
> How do I flip the VDEF result to a negative for use in HRULE? or how do I
> get around this all together? I wish I had listend in maths ....
>
> I hope what I posted makes sense :D, thanks in advance.

It's a bit of a hack, but it is doable.

Use your VDEF value in another CDEF.  Let that CDEF multiply by -1.

You need an array of rates, so you need an existing DEF or CDEF in this new 
CDEF as well. Once the array is generated, you can drop its rates. You may 
need to tweak a bit, but something like this should work:

CDEF:if_out_pc_neg=if_out_bits,POP,if_out_pc,-1,* 



More information about the rrd-users mailing list