Re: [cricket-users] grapher.cgi problems

From: Matthew Stier (Matthew.Stier@tddny.fujitsu.com)
Date: Thu Jun 03 1999 - 09:38:01 PDT


From: Matthew Stier <Matthew.Stier@tddny.fujitsu.com>

I ran into this same problem, upgrading to 0.65. Jeff (Allen) was aware of the problem, but it was not causing him problems, because of the behavior of his webserver (Apache).
Since I am using Netscape Enterprise server, I investigated this on my own.

The problem, is that the router-interfaces style configuration files, use a perl function "map()". The 'use Strict' declaration at the begining of grapher.cgi causes the map
function to complain about the potential keyword "interface", which is part of the "interface-name" option.

I fixed the problem by quoting the map function argument.

*** grapher.cgi Thu Jun 3 10:27:27 1999
--- grapher.cgi.sav Thu Jun 3 10:26:39 1999
***************
*** 156,165 ****
                };

                my(@inst) = ();
! if ($needEval) {
! $inst =~ s/^map\((.*)\)$/map(qw($1))/;
! @inst = eval($inst);
! }

                if ($#inst+1 > 1) {
                        # make the instance selection widget...
--- 156,162 ----
                };

                my(@inst) = ();
! @inst = eval($inst) if ($needEval);

                if ($#inst+1 > 1) {
                        # make the instance selection widget...

David Koski wrote:

> From: David Koski <dkoski@noc.ns.itd.umich.edu>
>
> Anyone been having cgi problems with router interfaces. I've upgraded to
> 0.66 (0.65 was giving me some problems but couldn't replicate it running
> the cgi offline). I've tried using the sample tree configs and get the
> same results. My upper level Default files are pretty much the same as
> the sample tree as well, here's my errors in offline. As you can see it
> is producing the CGI headers and output, but the error is causing it never
> to go to the browser. The barword "interface" not allowed while "strict
> subs" is the same thing show up in my Netscape server logs. 0.63 works
> like a dream but 0.65 and 0.66 (Which is where the database was added)
> dies miserably. It only does this for router interfaces. My router
> specific graph displays work fine.
>
> Thanks
>
> David
>
> %./grapher.cgi
> (offline mode: enter name=value pairs on standard input)
> target=%2Frouter-interfaces%2Fethernet3_0_0&ranges=d%3Aw&view=Bits%2FSec
> Bareword "interface" not allowed while "strict subs" in use at (eval 4)
> line 1, <STDIN> chunk 1.
> Unquoted string "interface" may clash with future reserved word at (eval
> 4) line 1, <STDIN> chunk 1.
> DOH!Content-Type: text/html
>
> <html>
> <head>
> <title>Graphs for ethernet3_0_0</title>
> <meta name="generator" content="Cricket version 0.66 ( Thu Jun 3 00:22:40
> PDT 1999 )">
> </head>
> <body bgcolor=white>
> <!-- you could put your company logo on every page here: -->
> <!-- <img src="images/company-logo.gif" align=left> -->
> <h1>Graphs for ethernet3_0_0</h1>
> <br clear=left>
> <table width=100% cellpadding=5 padding=3 border>
> <tr><td width=70%>
> <h3>Summary</h3>
> <font color=red>Current values not available.</font>
> (Architecture sun4-solaris-thread not supported yet.)
> <p></td><td><center>
> <i>Time Ranges:</i><p>
> <a
> href="http://localhost/./grapher.cgi?target=%2Frouter-interfaces%2Fethernet3_0_0&ranges=d&view=Bits%2FSec">Hourly</a>&nbsp;&nbsp;&nbsp;<br>
> <a
> href="http://localhost/./grapher.cgi?target=%2Frouter-interfaces%2Fethernet3_0_0&ranges=w&view=Bits%2FSec">Daily</a>&nbsp;&nbsp;&nbsp;<br>
> <a
> href="http://localhost/./grapher.cgi?target=%2Frouter-interfaces%2Fethernet3_0_0&ranges=d%3Aw&view=Bits%2FSec">Short-Term</a>&nbsp;&nbsp;&nbsp;<br>
> <a
> href="http://localhost/./grapher.cgi?target=%2Frouter-interfaces%2Fethernet3_0_0&ranges=m%3Ay&view=Bits%2FSec">Long-Term</a>&nbsp;&nbsp;&nbsp;<br>
> <a
> href="http://localhost/./grapher.cgi?target=%2Frouter-interfaces%2Fethernet3_0_0&ranges=d%3Aw%3Am%3Ay&view=Bits%2FSec">All</a>&nbsp;&nbsp;&nbsp;</center></td>
> </tr></table>
> <h3>Hourly graph</h3>
> <img width=596 height=267
> src="http://localhost/./mini-graph.cgi?type=gif&target=%2Frouter-interfaces%2Fethernet3_0_0&inst=map%28interface-name%29&dslist=ifInOctets%2CifOutOctets&range=151200&rand=404">
> <p><h3>Daily graph</h3>
> <img width=596 height=267
> src="http://localhost/./mini-graph.cgi?type=gif&target=%2Frouter-interfaces%2Fethernet3_0_0&inst=map%28interface-name%29&dslist=ifInOctets%2CifOutOctets&range=864000&rand=95">
> <p><table width=100% cellpadding=3>
> <tr>
> <td>
> <a href="http://www.munitions.com/~jra/cricket"><img
> align=left width=58 height=55 src="images/cricket-sm.gif" border=0></a>
> </td>
> <td width=15% valign=center>
> <p align=left><font size=+2>
> <a
> href="http://www.munitions.com/~jra/cricket">Cricket</a>
> <font size=2><br>Version 0.66</font>
> </td>
> <td>
> For questions or comments about this data, contact
> <a href="mailto:cricket">the Cricket Admins</a>.
> </td>
> <td width=120 valign=center>
> <center>
> <a
> href="http://ee-staff.ethz.ch/~oetiker/webtools/rrdtool"><img width=120
> height=34 src="images/rrdtool.gif" border=0></a>
> </td>
> </tr>
> </table>
> <p>
> <font color=red></font>
> </p>
> </body>
> </html>
>
> ------------------------------------------------------------------------
> UMNet MichNet Merit RSNG
> ------------------------------------------------------------------------
> dkoski@umich.edu Technologist
> Unix Administration Technical Team Leader
> Phone: (734)/647-8993 Network Operations Center
> U of M Information Technology Division
>
> ------------------------------------------------------------------------
> "Congratulations to 'Voice-Diary,' our latest ONElist of the Week.
> http://www.onelist.com
> Visit our homepage and share with us how ONElist is changing YOUR life!

--
Matthew Lee Stier                  *  Fujitsu Network Communications
Unix Systems Administrator         |  Two Blue Hill Plaza
Ph: 914-731-2097 Fx: 914-731-2011  |  Sixth Floor
Matthew.Stier@fnc.fujitsu.com      *  Pearl River, NY 10965

------------------------------------------------------------------------ Looking to expand your world? http://www.onelist.com ONElist has nearly 160,000 e-mail communities from which to chose!



This archive was generated by hypermail 2b29 : Mon Mar 06 2000 - 19:00:52 PST