[rrd-users] CDEF invalid rpn expression

Wiebe Kloosterman wiebe1971 at gmail.com
Thu Dec 28 07:40:36 MET 2006


hallo,

the following php code gives the following error:

rrd_graph() ERROR: invalid rpn expression in: aa,8,*

i have installed
- rrdtool-1.2.15-6.fc5
- rrdtool-php-1.2.15-6.fc5

is there changed anything because it worked on an older system with:
- rrdtool-devel-1.0.40-1.7.3
- rrdtool-1.0.40-1.7.3

   $color1 = "#00FF00"; $color2 = "#0000FF";
   $datum = date("d/m/Y Hi",filemtime("$dir/$file"));
   $factor = 8;
   $getal = rand(100000000,999999999) ;
   $pngfile = "$file.$getal.png";
   $opts = array( "--imgformat", "PNG", "--start", "$starttime",
                  "--end", "$endtime",
                  "--width", "$width", "--height", "$height",
                  "DEF:aa=$dir/$file:ds0:AVERAGE",
                  "DEF:bb=$dir/$file:ds1:AVERAGE",
                  "CDEF:a=aa,8,*",
                  "CDEF:b=bb,8,*",
                  "COMMENT:           $comment\J",
                  "COMMENT:\J",
                  "COMMENT:                   ",
                  "COMMENT: Min          Max          Avg         Last\J",
                  "COMMENT:     ",
                  "AREA:a$color1:",
                  "LINE1:a$color1: In  ",
                  "GPRINT:a:MIN: %9.1lf ",
                  "GPRINT:a:MAX: %9.1lf ",
                  "GPRINT:a:AVERAGE: %9.1lf ",
                  "GPRINT:a:LAST: %9.1lf \J",
                  "COMMENT:     ",
                  "LINE2:b$color2: Uit ",
                  "GPRINT:b:MIN: %9.1lf ",
                  "GPRINT:b:MAX: %9.1lf ",
                  "GPRINT:b:AVERAGE: %9.1lf ",
                  "GPRINT:b:LAST: %9.1lf \J",
                  "COMMENT:\\s",
                  "COMMENT:\J",
                  "COMMENT:Last Updated $datum, \\c"
                );


   $ret = rrd_graph("/afs1/www/images/rrd/$pngfile", $opts, count($opts));

--
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://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list