I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2009-02-18 02:02:12-08 by woodsbc
Timeout during command execution

Oliver,

I am issuing some commands like 'copy running-config tftp' and issuing the required carriage returns for it to start executing the command. However, in the middle of the transfer, the script disconnects from the host with the error of 'pattern match timed-out'. The routers that this occurs on have configurations that are much larger than the ones that successfully execute. These are SSH connections. Where do I increase the timeout value for this?

Thanks.

Brian

Direct Responses: 9995 | Write a response
Posted on 2009-02-18 06:38:21-08 by oliver in response to 9993
Re: Timeout during command execution
Hi Brian,

There are two ways to set a longer timeout, as mentioned in the manual.

The first is on a per-command basis, you issue something like:

$s->cmd(String => 'copy running-config tftp', Timeout => 60);

Or you can set it globally (i.e. will be used for all subsequent commands), and this is done via the Net::Telnet method:

$s->timeout(60);

I hope this helps,

regards,
oliver.
Direct Responses: Write a response