[rrd-users] Graphing to STDOUTusing PERL on Win32 with IIS
Mike_Bragg at teamhealth.com
Mike_Bragg at teamhealth.com
Fri Mar 5 20:35:11 MET 2004
Hello,
I'm trying to create a PERL script utilizing RRDs:graph that dynamically
generates pictures without creating temporary files.
My setup is:
Win2k server
IIS
ActiveState PERL v5.6.1 build 635
RRDs shared PERL module.
I verified that using PERL as a cgi script works on the web server. Here's
the PERL script I'm trying to run:
#---------------------------------
use RRDs;
$|=1;
binmode(STDOUT);
print "Content-type: image/png\n\n";
$rrd="\\path_to_data\\data\\site.1.rrd";
RRDs::graph ("-",
"--step=300",
"--start=-86400",
"--end=-300",
"--imgformat=PNG",
"--x-grid=HOUR:1:DAY:1:HOUR:1:0:%H",
"--vertical-label=bits per second",
"DEF:inoctets=$rrd:input:AVERAGE",
"DEF:outoctets=$rrd:output:AVERAGE",
"CDEF:inb=inoctets,8,*",
"CDEF:out=outoctets,8,*",
"AREA:inb#00C000:In traffic",
"LINE1:out#0000FF:Out traffic"
);
if ($ERROR = RRDs::error) {
die "$0: unable to graph `$rrd': $ERROR\n";
}
#---------------------------------
If I manually run the PERL script from a DOS window with the filename
specified as "-", the data is not sent to STDOUT. All that is displayed is
the "Content-type: image/png" line. If I use a filename such as
"temp.png" in place of the "-", the PNG file is generated. When I go to
the URL for the PERL script with a browser, the browser just runs and runs
without stopping or giving an error.
Any help or examples will be greatly appreciated.
Thanks,
Mike
--
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