[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Perl CGI output truncated - FIXED

Thanks Craig, your suggestion made me this about checking out an old looking glass script (which I then noticed didnt have the same issue) and noticed the rsh command used the -n switch...

Using rsh with the –n switch prevents is from pulling the output from stdin, this did the trick and all now works as expected.

It is strange the truncation is only occurring on routers with the SB IOS release!?

Thanks for the help everyone.

On Wed, Oct 29, 2008 at 10:50 AM, Craig Sanders <cas@taz.net.au> wrote:
On Tue, Oct 28, 2008 at 03:39:14PM +1100, Gerard Sharpe wrote:
> Scratching my head with an issue where my Perl CGI output is being
> truncated, however when running directly from the command line it
> works. I've tried apache2 without any chance.
> Below is a minimal version of a script I'm useing to pull info from a
> Cisco router and display in the web browser:

have you tried the Net::Telnet::Cisco module?

or you might want to look at how Looking Glass does it:


 "LG is a Looking Glass written in Perl as a CGI script. It can execute
  almost all BGP-related commands and do ping and traceroute in
  routers or relay these queries to other looking glasses. It supports
  both IPv4 and IPv6 commands, and is tested with Cisco, Zebra, and
  Juniper. It can connect to a router using SSH, telnet or rsh. "


craig sanders <cas@taz.net.au>

Reply to: