[rrd-users] Compute, RPN and floats
jphthierry at free.fr
jphthierry at free.fr
Fri Oct 31 09:47:10 CET 2008
Hi,
I just noticed a problem with some of my rrd files and especially compute DS.
Let me give you an example. My rrd creation command is the following one:
rrdtool create toto.rrd --start $starttime --step $step \
DS:rawhr:GAUGE:$heartbeat:U:U \
DS:hr:COMPUTE:rawhr,6.25,*,25,-,100,MIN \
DS:temp10:GAUGE:$heartbeat:-50:100 \
RRA:AVERAGE:0.5:25:87600
but when I look at the output of rrdtool info, I get:
rrdtool create toto.rrd --start $starttime --step $step \
DS:rawhr:GAUGE:$heartbeat:U:U \
DS:hr:COMPUTE:rawhr,6,*,25,-,100,MIN \
DS:temp10:GAUGE:$heartbeat:-50:100 \
RRA:AVERAGE:0.5:25:87600
The 6.25 constant is now 6 :-((. I have the same issue with all my COMPUTE DS
incorporating floating point constants in the RPN expression.
I thought it may be due to my locale settings (french in this case). I tried:
export LC_NUMERIC="en_EN.UTF-8"
rrdtool create toto.rrd --start $starttime --step $step \
DS:rawhr:GAUGE:$heartbeat:U:U \
DS:hr:COMPUTE:rawhr,6.25,*,25,-,100,MIN \
DS:temp10:GAUGE:$heartbeat:-50:100 \
RRA:AVERAGE:0.5:25:87600
but without any success. Any idea?
Jean-Philippe
P.S.: I am running rrdtool 1.2.19 on Ubuntu 8.04
More information about the rrd-users
mailing list