[rrd-users] RPN Confusion

Simone Felici s.felici at alpikom.it
Wed Dec 5 16:21:40 CET 2007


Simone Felici ha scritto:
> Hi!
> 
> Ok, maybe discussed into archives, but I cannot find any solution.
> Now I want to understood the RPN syntax to write my own graph with different colors.
> I'm at this point... trying to determinate a stack value.
> 
> in example, changing color every 20 units.
> The first CDEF is ok (0-20), it's an area:
> 
> C1=ds,20,GE,20,ds,IF
> also if ds>20 then C1=20, else C1=ds. And this goes to AREA
> Until here, OK!
> 
> The second will be a stack (20-40).
> if ds>40, then C2=20, elseif ds>20 then C2=ds-20 else C2=0
> 
> The last it's a stack too:
> if ds>lastvaluelimit, then Cn=ds-lastvaluelimit, else Cn=0
> 
> I cannot write it into RPN, have no idea how to set elseif and make operations to variables only in the else case.
> I've read the tutorial, it's not discussed how use multiple IF
> 
> 
> Please :(
> 
> 

Solved.... sorry for the mail ;)

middle stack:
C2=d,40,GE,20,d,20,GE,d,20,-,0,IF,IF

The lasta stack it's ok too:
Cn=ds,lastvaluelimit,GE,ds,lastvaluelimit,-,0,IF

Now I've to check eventually UNKN values ;)

Byebye

Happy!
Simon


-- 
Simone Felici                    E-Mail: s.felici at alpikom.it
Divisione Tecnica                Tel:    0461 030 111
Alpikom S.p.A.                   Fax:    0461 030 112
v.Fersina, 23 - 38100 Trento     URL:    http://www.alpikom.it



More information about the rrd-users mailing list