<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi there,<div><br></div><div>Does anyone know why this fails:</div><div><br></div><div><div><font class="Apple-style-span" face="Courier">rrdtool graph /path/to/outputimage/rrd.png \</font></div><div><font class="Apple-style-span" face="Courier"> --interlaced --imgformat PNG --end 1289434618 --start 1286756217 \</font></div><div><font class="Apple-style-span" face="Courier"> --width 600 --height 200 --title 'TEST' \</font></div><div><font class="Apple-style-span" face="Courier"> DEF:dt=/path/to/dt.rrd:dt:AVERAGE \</font></div><div><font class="Apple-style-span" face="Courier"> VDEF:dtfoo=dt,MAXIMUM \</font></div><div><font class="Apple-style-span" face="Courier"> CDEF:dtmaxdiff=dtfoo,16,- \</font></div><div><font class="Apple-style-span" face="Courier"> LINE1:dtmaxdiff#990000:'TESTFOO' \</font></div><div><font class="Apple-style-span" face="Courier"> GPRINT:dt:LAST:'Latest value for TESTFOO\: %4.0lf%s\j'</font></div><div><br></div><div>The output I get from rrdtool is:</div><div><br></div><div><font class="Apple-style-span" face="Courier">ERROR: rpn expressions without DEF or CDEF variables are not supported</font></div><div><br></div><div>If I try and add backslashes to the path (a la <a href="http://www.mrtg.org/rrdtool/doc/rrdgraph_rpn.en.html">http://www.mrtg.org/rrdtool/doc/rrdgraph_rpn.en.html</a>, note between the VDEF and CDEF rpn command there is not a carriage return anymore, just whitespace and a backslash):</div><div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier">rrdtool graph /path/to/outputimage/rrd.png \</font></div><div><font class="Apple-style-span" face="Courier"> --interlaced --imgformat PNG --end 1289434618 --start 1286756217 \</font></div><div><font class="Apple-style-span" face="Courier"> --width 600 --height 200 --title 'TEST' \</font></div><div><font class="Apple-style-span" face="Courier"> DEF:dt=/path/to/dt.rrd:dt:AVERAGE \</font></div><div><font class="Apple-style-span" face="Courier"> VDEF:dtfoo=dt,MAXIMUM \ </font><span class="Apple-style-span" style="font-family: Courier; ">CDEF:dtmaxdiff=dtfoo,16,- \</span></div><div><font class="Apple-style-span" face="Courier"> LINE1:dtmaxdiff#990000:'TESTFOO' \</font></div><div><font class="Apple-style-span" face="Courier"> GPRINT:dt:LAST:'Latest value for TESTFOO\: %4.0lf%s\j'</font></div></div><div><br></div><div>I now get the output:</div><div><br></div><div><font class="Apple-style-span" face="Courier">ERROR: Could not make sense out of ' CDEF:dtmaxdiff=dtfoo,16,-'</font></div><div><br></div><div>What I want is to find the maximum value for the data set ('dtfoo = dt,MAXIMUM'), then take that value and subtract 16 from it (dtmaxdiff = dtfoo,16,-), then plot that value.</div><div><br></div><div>Any ideas why both of these fail?</div><div><br></div><div>Thanks in advance,</div><div>- Rob</div></div></body></html>