---- Original Message ----
From: <[EMAIL PROTECTED]>
To: "Leif Neland" <[EMAIL PROTECTED]>
Cc: <[email protected]>
Sent: Wednesday, December 28, 2005 2:08 PM
Subject: [rrd-users] Re: PERCENT question

> Yes, this is my question: "How many percent is the subnet traffic of
> the total?"
> 
> using RPN expressions, I have:
> 
> subnet = 0.059110
> total  = 0.176248
> using RPN expression 100,subnet,*,total,/ i have 12.02%
> 
> but using a calculator, where:
> 100 * subnet   = 5.911  / total = 33.53%
> subnet / total = 0.3353 * 100   = 33.53%
> 
> What is the problem with RPN expressions??
> 
I did a "constant" CDEF:
CDEF:t=t4,t4,-,100,0.059110,*,0.176248,/,+
GPRINT:t:LAST:%5.2lf

It gives correctly 33.54, as expected. 


( t4,t4,- (equals zero) is just a quick trick to avoid the message:
ERROR: Cannot parse vname from 'CDEF:100,0.059110,*,0.176248,/ )

Post the entire script using the RRD.

Leif





--
Unsubscribe mailto:[EMAIL PROTECTED]
Help        mailto:[EMAIL PROTECTED]
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi

Reply via email to