l.johnson wrote:
> 
> Hi everybody,
> just trying to "simply" sum values 
> eg)
> tot =0
> tot= tot+ value at time t
> tot = tot + value at time t+1  and so on 
> 
> seems so easy, but no result with that kind of code:
> ...
> DEF:val=$RRDFILE:val:MAX
> CDEF:tot1=tot,PREV,UN,0,tot,IF              // not sure for the syntax, 
> anyway .. always incorrect ! 
> CDEF:tot= tot1,val,+
> ...
> 
> in other words , did anybody test the use of PREV or PREV(vname) as described 
> in the rrdgraph manual or 
> http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/tutorial/cdeftutorial.html

???

If this example is in the tutorial, it is wrong.  I most certainly
didn't put it in there.

There's no relation whatsoever between PREV(tot1) and tot.

Anyway:

If "average" is "total/time"  then "total" is "average * time".

No need for complicated PREV statements.

-- 
   __________________________________________________________________
 / [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