[rrd-users] problem with rrdcgi on Apache 2.0.36
Dean Holland
speedster at 3fl.net
Wed Jun 5 17:21:30 MEST 2002
Hi list,
Recently I upgraded Apache from 1.3.24 to 2.0.36 and now the CGI scripts I
had to produce output fail to run. With a querystring they die, but if I
leave the querystring off it runs (just doesn't produce anything as there
are variables missing) I call the CGI with a querystring like the following
http://mrtg.3fl.net/cgi-bin/cpu.cgi?server=loki&rand=3435674645dvdfvb34r43&w
idth=400&height=100
and what I get is a 500 error - premature end of script headers. The apache
logs aren't much more help either
[Wed Jun 05 23:16:00 2002] [error] [client xxx.xxx.xxx.xxx] Premature end of
script headers: cpu.cgi
[Wed Jun 05 23:16:00 2002] [error] [client xxx.xxx.xxx.xxx] ERROR: expected
a filename
Perl CGI scripts run fine.
The script worked in Apache 1.3, I'm wondering if there's something extra I
need to do to either apache or RRDTool to get it to work again.
Here's the script:
#!/usr/bin/rrdcgi
<H1>Active CPU for <RRD::CV server>.3fl.net</h1>
<hr>
<h3>Daily graph</h3>
<RRD::GRAPH ../docs/tmp/<RRD::CV rand>d.png -a PNG --imginfo '<IMG
SRC=tmp/%s WIDTH=%lu HEIGHT=%lu>' --title="Active CPU, <RRD::CV
server>.3fl.net" -v '% cpu usage' -u100 -r -s -1d -e now -h <RRD::CV
height> -w <RRD::CV width>
DEF:ds0=/home/mrtg/<RRD::CV server>.rrd:ds0:AVERAGE
CDEF:stress=ds0,85,GT,ds0,0,IF,80,100,LIMIT
CDEF:normal=ds0
LINE2:normal#00FF00:"cpu usage in %\n"
LINE2:stress#FF0000:""
COMMENT:\n
GPRINT:ds0:MAX:'Maximal'
GPRINT:ds0:MAX:'%0.2lf%%\n'
GPRINT:ds0:AVERAGE:'Average'
GPRINT:ds0:AVERAGE:'%0.2lf%%\n'
GPRINT:ds0:LAST:'Current'
GPRINT:ds0:LAST:'%0.2lf%%'
COMMENT:\n>
<hr>
<h3>Weekly Graph</h3>
<RRD::GRAPH ../docs/tmp/<RRD::CV rand>w.png -a PNG --imginfo '<IMG
SRC=tmp/%s WIDTH=%lu HEIGHT=%lu>' --title="Active CPU, <RRD::CV
server>.3fl.net" -v '% cpu usage' -u100 -r -s -1w -e now -h <RRD::CV
height> -w <RRD::CV width>
DEF:ds0=/home/mrtg/<RRD::CV server>.rrd:ds0:AVERAGE
CDEF:stress=ds0,85,GT,ds0,0,IF,85,100,LIMIT
CDEF:normal=ds0
LINE2:normal#00FF00:"cpu usage in %\n"
LINE2:stress#FF0000:""
COMMENT:\n
GPRINT:ds0:MAX:'Maximal'
GPRINT:ds0:MAX:'%0.2lf%%\n'
GPRINT:ds0:AVERAGE:'Average'
GPRINT:ds0:AVERAGE:'%0.2lf%%\n'
GPRINT:ds0:LAST:'Current'
GPRINT:ds0:LAST:'%0.2lf%%'
COMMENT:\n>
<hr>
<h3>Monthly Graph</h3>
<RRD::GRAPH ../docs/tmp/<RRD::CV rand>m.png -a PNG --imginfo '<IMG
SRC=tmp/%s WIDTH=%lu HEIGHT=%lu>' --title="Active CPU, <RRD::CV
server>.3fl.net" -v '% cpu usage' -u100 -r -s -1m -e now -h <RRD::CV
height> -w <RRD::CV width>
DEF:ds0=/home/mrtg/<RRD::CV server>.rrd:ds0:AVERAGE
CDEF:stress=ds0,85,GT,ds0,0,IF,85,100,LIMIT
CDEF:normal=ds0
LINE2:normal#00FF00:"cpu usage in %\n"
LINE2:stress#FF0000:""
COMMENT:\n
GPRINT:ds0:MAX:'Maximal'
GPRINT:ds0:MAX:'%0.2lf%%\n'
GPRINT:ds0:AVERAGE:'Average'
GPRINT:ds0:AVERAGE:'%0.2lf%%\n'
GPRINT:ds0:LAST:'Current'
GPRINT:ds0:LAST:'%0.2lf%%'
COMMENT:\n>
<hr>
<h3>Yearly Graph</h3>
<RRD::GRAPH ../docs/tmp/<RRD::CV rand>y.png -a PNG --imginfo '<IMG
SRC=tmp/%s WIDTH=%lu HEIGHT=%lu>' --title="Active CPU, <RRD::CV
server>.3fl.net" -v '% cpu usage' -u100 -r -s -1y -e now -h <RRD::CV
height> -w <RRD::CV width>
DEF:ds0=/home/mrtg/<RRD::CV server>.rrd:ds0:AVERAGE
CDEF:stress=ds0,85,GT,ds0,0,IF,85,100,LIMIT
CDEF:normal=ds0
LINE2:normal#00FF00:"cpu usage in %\n"
LINE2:stress#FF0000:""
COMMENT:\n
GPRINT:ds0:MAX:'Maximal'
GPRINT:ds0:MAX:'%0.2lf%%\n'
GPRINT:ds0:AVERAGE:'Average'
GPRINT:ds0:AVERAGE:'%0.2lf%%\n'
GPRINT:ds0:LAST:'Current'
GPRINT:ds0:LAST:'%0.2lf%%'
COMMENT:\n>
<hr>
<h3><a href=/index.php>MRTG home</a></h3>
Thanks in advance!
Dean
--
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