[rrd-users] RRD Newbee needs help with RRD Perl script

Mark Woodruff n3hf at yahoo.com
Wed Nov 4 19:52:37 CET 2009

Chris, Thank you for the feedback. I tried rewriting something with RRDs but no success, something must be missing from the installation (I think!).
Can't locate loadable object for module RRDs in @INC (@INC contains: /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.
.5 /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/ve
dor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl .) at ./temp-one.cgi line 27
Compilation failed in require at ./temp-one.cgi line 27.

From: Koaps <koaps at yahoo.com>
To: Mark Woodruff <n3hf at yahoo.com>
Sent: Tue, November 3, 2009 8:42:04 PM
Subject: Re: [rrd-users] RRD Newbee needs help with RRD Perl script

I have no idea about RRDp but I have used RRDs with no issues in perl scripts.

The graph subroutine I used looked like this:

#    print "Creating graph\n";
    RRDs::graph ("$png_path/$k.png",
                "--title=$TITLE $k",
        "COMMENT:    \\n",
        "LINE2:$AVG_LINE:Average MB/s",
        "GPRINT:mbs:AVERAGE:\\: %5.2lf",
        "GPRINT:mbs:LAST:    Last\\: %5.2lf\\n",
        "LINE1:$UPPER_LINE:Upper Bound",
        "LINE1:$LOWER_LINE:Lower Bound",
        if ($err) {print "problem generating the graph: $err\n";}

with variables defined like this:
NOTE: $k for me was pulled from a reference I generated, you should be able to set it to your RRD without any issues.

# RRDTool vars #
my $png_path = "/var/www/html/";
my $TITLE =  "IO Test:";
my $VLABEL = "Bytes per second (B/s)";
my $BACK = "BACK#000000";
my $CANVAS = "CANVAS#202020";
my $GRID = "GRID#666666";
my $FRAME = "FRAME#202020";
my $BASE = 1024;
my $AVG_LINE = "AVG#0000FF";
my $UPPER_LINE = "UPPER#ff0000";
my $LOWER_LINE = "LOWER#ff0000";


--- On Tue, 11/3/09, Mark Woodruff <n3hf at yahoo.com> wrote:

> From: Mark Woodruff <n3hf at yahoo.com>
> Subject: [rrd-users] RRD Newbee needs help with RRD Perl script
> To: rrd-users at lists.oetiker.ch
> Date: Tuesday, November 3, 2009, 5:03 PM
> Recently installed Version 1.3.8
> and have been trying to make a Perl script wrritten by Brian
> Lane (Digitemp) from what I have been able to determine the
> scripts hangs up on the line containing:
>  $answer=RRDp::read;
> # Output a HTML header for the PNG
> image to follow
> print $cgi->header('image/png');
> # Generate the graph
> RRDp::cmd "graphv - --imgformat PNG",
> "--start '$starttime' --end
> '$endtime'",
> "--width $width --height $height",
> "DEF:temp_c=$rrd:$var:AVERAGE",
> "CDEF:temp_f=temp_c,9,*,5,/,32,+",
> "LINE1:temp_f$color:'$label'";
> $answer=RRDp::read;
> print $$answer;
> RRDp::end;
> After reading rrd tutiorial I wrote a
> shorten bash script which works fine which tells me my
> RRD datafile is fine. Is there a bug and/or do I have
> installation issue?? 
> Mark
> -----Inline Attachment Follows-----
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20091104/2d978dbe/attachment-0001.htm 

More information about the rrd-users mailing list