[rrd-users] RPN for thresholds colors for LINE graphs

Sasha Mikheev sasha at netvision.net.il
Tue May 29 14:06:05 MEST 2001



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:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list