[rrd-users] What is "'SCALAR' is not a valid function name"?
Bartman
bartman70 at yahoo.com
Tue May 12 17:32:10 CEST 2009
Having similar issue. Have seen this question in a few places and no
response. The following command line works for me:
rrdtool graph bart1.png --start 1242118758 --end 1242119433
DEF:mytemp=cpu-system.rrd:value:AVERAGE LINE2:mytemp#0000FF
However, trying to run it in perl as below:
#!/usr/bin/perl -w
use lib qw( /usr/local/rrdtool-1.3.4/lib/perl );
use RRDs;
my $cur_time = time();
my $end_time = $cur_time;
my $start_time = $end_time - 300;
print "start time: $start_time\n";
print "end time: $end_time\n";
RRDs::graph("bartgen.png", \
"--start=1242118758", \
"--end=1242119433", \
"DEF:system=cpu-system.rrd:value:AVERAGE", \
"LINE2:system#0000FF");
my $err=RRDs::error;
if ($err) {print "problem generating the graph: $err\n";}
print "end of script\n\n";
gives me a 'SCALAR' is not a valid function name error.
Thx,
Bart
Grace Tsai wrote:
>
> Hi,
>
> I am a beginner of using RRDtool. I am writing a Perl script to read
> data from a RRDtool database and generate a graph.
> But I got error
> 'SCALAR' is not a valid function name
>
> from the step:
> RRDs::graph (...
>
> Can you give me some advice please? Thanks.
>
> Grace
>
>
>
>
--
View this message in context: http://n2.nabble.com/What-is-%22%27SCALAR%27-is-not-a-valid-function-name%22--tp1072978p2869910.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.
More information about the rrd-users
mailing list