[rrd-users] reuse of CDEF var for use in loops

josef nus at gmx.at
Thu Nov 17 09:53:52 CET 2011


Hi Sbnm,
would you please let me know an exampe of "append $cmd and executing outside
the loop" ?

i have created this ressource wasting sript, but it works, and i want to
optimize !

$prev=0;
for ( $x  .... ){ 
 if  ($x > 0){
    CDEF:sum$x=sum$prev,ds$x,+ 
    $prev++;
} else {
    CDEF:sum$x=ds$x,1,*
} 

rgds Josef

--
View this message in context: http://rrd-mailinglists.937164.n2.nabble.com/reuse-of-CDEF-var-for-use-in-loops-tp7000894p7003246.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.



More information about the rrd-users mailing list