[rrd-users] Invalid RPN -- why?

Alex van den Bogaerdt alex at ergens.op.het.net
Thu Dec 13 02:12:42 CET 2007


On Thu, Dec 13, 2007 at 02:07:08AM +0200, Gutza wrote:
> I get an "invalid rpn" error message for the following CDEF:
> 
> CDEF:old=old_percent,user_percent,-,familiar_percent,-,robot_percent,-

Let's look at the stack:

[empty]
old_percent
old_percent,user_percent
old_percent,user_percent,-
{execute}
[old_percent-user_percent]
[old_percent-user_percent],familiar_percent
[old_percent-user_percent],familiar_percent,-
{execute}
[old_percent-user_percent-familiar_percent]
[old_percent-user_percent-familiar_percent],robot_percent
[old_percent-user_percent-familiar_percent],robot_percent,-
{execute}
[old_percent-user_percent-familiar_percent-robot_percent]


Looking good.

> The actual error message I get is this:
> 
> ERROR: invalid rpn expression in: old_percent,user_percent,-,familiar_percent,-,robot_percent,-
> 
> 
> What am I doing wrong?

Perhaps there's a typo in this RPN or in one of the DEFs or CDEFs ?

rrdtool create x.rrd DS:x:GAUGE:120:U:U RRA:AVERAGE:0:1:1

rrdtool graph /dev/null \
        DEF:x=x.rrd:x:AVERAGE \
        CDEF:x1=x \
        CDEF:x2=x \
        CDEF:y=x,x3,-,x1,-

ERROR: invalid rpn expression in: x,x3,-,x1,-

notice how I wrote the innocent looking 'x3' in that last CDEF instead
of using 'x2' as I should have.

I agree: it would help if rrdtool told us it was 'x3' that it couldn't
understand.  No, I'm not going to write the patch.

-- 
Alex van den Bogaerdt
http://www.vandenbogaerdt.nl/rrdtool/



More information about the rrd-users mailing list