[rrd-users] Re: Bug? : RRDs perl module is very picky about trailing white spaces
Alex van den Bogaerdt
alex at ergens.op.het.net
Mon Aug 29 11:33:52 MEST 2005
[snip]
> "COMMENT:CPU Utilization (%)\\n",
[snip]
> "COMMENT: Minimum","GPRINT:cpu:MIN:%3.2lf%%","COMMENT:Maximum\: ","GPRINT:cpu:MAX:%3.2lf%%\\n",
[snip]
You enter "\\n" and rrdtool gets to see "\n"
You enter "\:" and rrdtool gets to see ":"
Notice the pattern?
> "COMMENT:Average\\: ","GPRINT:cpu:AVERAGE:%3.2lf%%\\n",
You enter "\\:" and rrdtool gets to see "\:". RRDtool will
not complain about that comment line. It has seen an escape
character and knows not to interpret that colon.
> Error:Garbage ': ' after command: COMMENT:Maximum:
Slightly confusing: the command is "COMMENT:Maximum" and that colon is
not from your script line but from english text. In other words, rrdtool
accepted until "maximum" and complained about every token that followed,
including its token separator ":". You gave it a token separator of ":"
and a token of " ".
> Well, I could live without colons ;)
Not necessary. Just escape colons like every other "special" char.
Your operating system and/or your script parser may eat some escape
characters (yours does) in which case you need to escape an escape char.
HTH
Alex
--
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