[rrd-users] Re: RRDs::create not creating

Todd Caine todd_caine at eli.net
Thu Jun 20 22:19:01 MEST 2002




I would assume that @$names[0] is not what you want.  If you
are just trying to pull the first value out of a list you
should probably just use $names[0].  When a list (anything
that starts with a '@') is interpolated in a string context
Perl will put spaces between the values.  

In the example below you are not setting the $error
variable.  You should probably do something like:

if(my $error = RRDs::error) {
    warn("RRDs error: $error\n");
}

Hopefully that will give you the error message you are
looking for.

Cheers,
Todd

Chris Majewski wrote:
> 
> Folks
> I'm unable to create an rrd with RRDs::create under rrdtool 1.0.35.
> I'm doing this:
> 
>     my @createParams = ($compareRRD,
>                         '--start',
>                         $fromTime,
>                         '--end',
>                         $untilTime,
>                         "DS:@$names[0]:GAUGE:400:U:U",
>                         "RRA:AVERAGE:0.5:1:300");
>     RRDs::create(@createParams);
>     if ($error ne '') { # something bombed
>          warn("RRDs error: ", RRDs::error);
>     }
> 
> I don't get any RRDs error, and yet the file is not created.
> If I create the file beforehand with sysopen(), I end up with an empty
> file. What's up?
> 
> -chris
> 
> --
> 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

-- 
Todd Caine
Software Engineer
Electric Lightwave, Inc.
tcaine at eli.net
(360) 816-4344

--
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