On Wed, Nov 29, 2000 at 12:49:07PM +0100, Engels, Manfred wrote: : : Hi, : : I just started making a small Perl program which utilizes the RRD tool as a : library from within Perl, and I run into trouble using the 'RRDs::graph' : function. : : First of all I should say I run Perl & RRD from Windoze 2000. The UTIL.RRD : is located in c:\test, whilst the perl program is in c:\prg (This is also : the directory where the output should be created). Here is the part of the : program that fails: : : : : <snip> : $database = "c:\\test\\util.rrd"; : $outputgraph = "c:\\prg\\util.gif"; : : RRDs::graph ($outputgraph, "DEF:myutil=$database:Utilization:AVERAGE", : "LINE2:myutil#FF0000"); : my $ERR=RRDs::error; : die "\nError whilst updating $outputgraph\nError: $ERR\n" if $ERR; : <snap> : : : : When I run this, I get the following error: : : Error whilst updating C:\prg\util.gif : Error: can't parse DEF 'myutil=c:\test\util.rrd:Utilization:AVERAGE' -2
This needs to go in a FAQ or something. The ':' is a delimiter in the DEF, so the line 'DEF:myutil=c:\test\util.rrd:Utilization:AVERAGE' gets parsed as if the ':' in the last half of the file name (after 'c:') is the graph data, instead of 'Utilization'. The solution is to escape your ':' in your path name. The argument for less commonly-used separator is for someone else to make. * Philip Molter * DataFoundry.net * http://www.datafoundry.net/ * [EMAIL PROTECTED] -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
