----- Original Message ----- From: "perl_haxor 123" <perl.ha...@gmail.com>
To: "Sisyphus" <sisyph...@optusnet.com.au>
Cc: <beginners@perl.org>
Sent: Thursday, March 11, 2010 10:16 PM
Subject: Re: stripped output from Net::SSH2


Hi Rob,


Thanks a lot for looking into this........i can't execute cat command on
the routing devices, I was trying "sh run" on two devices, the show run
command dumps the current configuration of the routing device......i tried
executing "sh run" on two devices, one of the device has less configuration
and other one has more configuration.....when i ran this script on the
device with less configuration, i got the full output, but when i run the
same script on device with more configuration, i got the stripped
output.........it looks like it is getting timed out..........is there a way
to increase the timeout? (i tried setting $ssh->poll(0), but it didn't
help)......an example would be really helpful.

If it was timing out I would expect the call to '$chan->read($buf, BUFLEN)' to return undef - as that's what's supposed to happen when the call fails. If that happened I think you would be getting an 'uninitialized' warning for '$read >= BUFLEN'. (Still, you might like to double check that $read is not 'undef' when $buf is truncated.)

Also, for a timeout, I would expect to be getting different results each time the script is run. Does that happen ?

A post to perlmonks might throw up some better help than I'm able to provide - if there's nothing forthcoming here.

Cheers,
Rob

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to