[rrd-users] Division Bug with RRDTool

Rodrigo Santos rodrigo.santos at quantiza.com
Fri Dec 2 16:30:49 MET 2005


Hi,

I´m making graphs with rrdtool, but I think that the the percentage 
values do not correspond the reality. I am using template graphs.mf 
without no alteration in expressions RPN.

Expressions:
DEF_subnet_out_bytes = 
DEF:xsubnet_out_bytes=$(rrddir)/subnet.rrd:out_bytes:AVERAGE
DEF_subnet_in_bytes = 
DEF:xsubnet_in_bytes=$(rrddir)/subnet.rrd:in_bytes:AVERAGE

CDEF_subnet_bytes = CDEF:xsubnet_bytes=xsubnet_out_bytes,xsubnet_in_bytes,+

CDEF_subnet_Mbps = CDEF:subnet_Mbps=xsubnet_bytes,.000008,*

In the graph:
'CDEF:div_Mbps_pct=subnet_Mbps,TOTAL_Mbps,/'

The results:
subnet_in_bytes = 128.319883
subnet_out_bytes= 4903.096164
subnet_bytes    = 5031.416047 (IN+OUT)
subnet_Mbps     = 0.040251    (BYTES*0.000008)
TOTAL_Mbps      = 0.079754
div_Mbps        = 0.272552    (subnet_Mbps/TOTAL_Mbps) <========== error

But, using a calculator, 0.040251/0.079754 = 0.504689

I would like to know what´s happening?

Thanks,

Rodrigo

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list