Hi,

I have 2 thresholds: normal and high. 
Algorithm should be following:

if (x < normal)
        color = green
if(normal < x < high)
        color = yellow
if(x > high)
        color = red

For AREA type graphs I can do it just fine. However there is a problem
with LINE type graphs. When I implement this algorithm for LINE graphs I
get multiple disconnected segments because my CDEF takes point which is
less then threshold and the next point is greater then threshold. 

What i need is something like this for the red state:

if(xprev < high && high < x) {
        return high;
}
if(xprev > high && x < high) {
        return high;
}
return x;

My question is how I can do this in RPN notation for RRDtool.
In particular how I can implement logical operations(guess i can get and by 
checking 1+1=2) and return statement. 
 
-- 
 Sasha Mikheev                      Linux -- put a penguin in your processor

 Avalon Net Ltd, CTO
 http://avalon-net.co.il/~sasha


--
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