Raymond Vermeer wrote:

> does anyone no how to do the following ?
> I have a rrdfile with 3 GAUGE datasources A, B and C.
> Now I want to graph the following formula on a line or area :
> 
> (A + B - C) / (A + B)

I'll give it a try but first I want to ask you something:
Did you read the tutorial on RPN ?
If yes: what was difficult to understand ?


Anyway, divide the problem in smaller portions:

x1 = (A+B-C)
x2 = (A+B)

result = x1 / x2

divide x1 further:
xx1 = A + B
result = xx1 - C


Paste everything into RPN:

A,B,+,C,-,A,B,+,/

Sanity check, by following the same rules as RRDtool does:

Complete line:   CDEF:result=A,B,+,C,-,A,B,+,/

stack after first calculation   (A+B),C,-,A,B,+,/
stack after second calculation  (A+B-C),A,B,+,/
stack after third calculation   (A+B-C),(A+B),/
stack after fourth calculation  (A+B-C)/(A+B)

I didn't exactly test it but I don't think I made a mistake.  Anyway,
use at own risk (as always by the way).

HTH
-- 
   __________________________________________________________________
 / [EMAIL PROTECTED]                  [EMAIL PROTECTED] \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

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

Reply via email to