[rrd-users] Re: newbie help please.... RRDTool 'DEF' statement parsing

Hugo van der Kooij hvdkooij at vanderkooij.org
Tue May 20 07:53:49 MEST 2003

On Tue, 20 May 2003, Matchan, Neil W wrote:

> I'm trying to pass an array of 'defs, cdefs, area & line' definitions to RRDTool but only the 1st 'def' statement seems to be accepted.
> The idea behind this is to have a Perl CGI script create graphs based upon user selected 'devices' and 'intefaces'. As these are
> user selectable, the number of 'DEF, CDEF, AREA and LINE1' statements used will vary, so I can't pre-define them to the script.
> The CGI builds the necessary strings and stores them in various arrays, I then use the array names in the RRDs::graph statement.
> eg.
> @def0[0] = "DEF:router0in1=" . $path . "/router0_fa01.rrd:ds0:MAX";
> @def0[1] = "DEF:router0in2=" . $path . "/router0_fa02.rrd:ds0:MAX";
> @def0[2] = "DEF:router1in1=" . $path . "/router1_fa01.rrd:ds0:MAX";
> @def0[3] = "DEF:router1in2=" . $path . "/router1_fa02.rrd:ds0:MAX";
> @def0[4] = "DEF:router2in1=" . $path . "/router2_fa01.rrd:ds0:MAX";
> @def0[5] = "DEF:router2in2=" . $path . "/router2_fa02.rrd:ds0:MAX";

Pardon me but shouldn't this be :

$def0[0], $def0[1], .....


 All email sent to me is bound to the rules described on my homepage.
    hvdkooij at vanderkooij.org		http://hvdkooij.xs4all.nl/
	    Don't meddle in the affairs of sysadmins,
	    for they are subtle and quick to anger.

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

More information about the rrd-users mailing list