[rrd-users] Division error with RRDTool

This is a discussion on [rrd-users] Division error with RRDTool within the RRD Users forums, part of the Networking and Network Related category; Hi, I'm trying to use the command CDEF to do some division using rrdtool, but the results that i'...


Go Back   Usenet Forums > Networking and Network Related > RRD Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-17-2006
Zabiziz Zaz
 
Posts: n/a
Default [rrd-users] Division error with RRDTool

Hi,
I'm trying to use the command CDEF to do some division using rrdtool, but
the results that i'm getting isn't right.
The code:
"$rrd" graph teste.png \
-aPNG \
-h200 \
-w475 \
--interlaced \
--start=1160535600 \
--end=1160621999 \
--vertical-label=Kbps \
'DEF:TotGeral_Rx_bytes=/usr/local/clientes/graficos/total.rrd:RxBytes:AVERAGE'
\
'CDEF:TotGeral_Rx_bits=TotGeral_Rx_bytes,-8,*,1024,/' \
'DEF:RxOrghttp=/usr/local/clientes/graficos/SERPRO_MF_RJ/service_http.rrd:RxBytesOrg:AVERAGE'
\
'CDEF:RxOrghttp0=RxOrghttp,-8,*,1024,/' \
'CDEF:Perc_Geral_RxOrghttp0=RxOrghttp0,TotGeral_Rx _bits,/,100,*' \
'AREA:RxOrghttp0#746FAE' \
'GPRINT:RxOrghttp0:AVERAGE:Rx %3.1lfKbps' \
'GPRINT:TotGeral_Rx_bits:AVERAGE:Total (%2.3lf)\j' \
'GPRINT:Perc_Geral_RxOrghttp0:AVERAGE:Perc (%2.3lf)\j' \
'LINE:TotGeral_Rx_bits#000000' \


The result of GPRINT:

Rx=-111.6
Total=-1026.422
Perc=6.190

But Perc should be (-111.6/-1026.422)*100 = 10.872

Anybody knows how to fix that?

Thanks!

Zabiziz


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

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:31 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0