[rrd-users] Perl failing on :dashes

Alex van den Bogaerdt alex at ergens.op.het.net
Wed Jun 18 10:05:22 CEST 2008


On Tue, Jun 17, 2008 at 01:31:03PM -0700, Chris Fogel wrote:

I'm going to answer this in a more generic way, so that others reading
the archive may also benefit from it.

> Using: RRDtool 1.3rc1
> 
> The following example runs fine from command line. Running the same 
> exact thing via perl and 'use RRDs;'
> 
> The last line:
> 	LINE1:zweek#aaaaaa:Previous:dashes


There are four parts here:
LINE1
zweek at aaaaaa
Previous
dashes


Manual, part where LINEx is explained:

LINE[width]:value[#color][:[legend][:STACK]][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]]

Parts:
LINE[width]
value[#color]
legend
STACK
dashes
dash-offset

[] means optional.
[:xxx[:yyy]]  means both xxx and yyy are optional, but if you're going to specify yyy then you must specify xxx

[:[xxx][:yyy]]  means the same, except that you can omit xxx itself, but not its colon:   ::yyy is good, :yyy is not.

[:xxx][:yyy] means both xxx and yyy are optional, but yyy cannot appear in front of xxx.



> Gives me:
> 	problem generating the graph: Garbage found where STACK expected

This is a message introduced in 1.2.x  At that time, STACK was optional and would be the last part: LINE[width]:value[#color][:[legend][:STACK]]

The decision to make the extra colon mandatory was made for those cases where a user would like to have "STACK" as the legend.

It seems to me that currently I could get into trouble if I would like to set "dashes" as my legend.


Back to your problem.

Looking at the error you report, it could be 
(a) the perl command parser is different from the command line parser (unlikely)
(b) you are trying to set legend "Previous:dashes" (also unlikely)
(c) you are using a version 1.2 RRDs and a version 1.3 rrdtool (very likely).

> Trying:
> 	LINE1:zweek#aaaaaa:Previous:STACK:dashes
> fails with:
> 	problem generating the graph: Garbage 'dashes' after command:

This would also be valid for version 1.3 and also not for 1.2; version 1.2. would show this message as nothing should follow :STACK in version 1.2

Verify your RRDs version number.

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



More information about the rrd-users mailing list