Thread

Posted on Tue Feb 26 23:16:30 2008 by chicks1dig1unix
how to increase timeout in waiting for command response
Hi I'm trying to capture the output of a command that takes a while ( about a minute) to generate on the router. How can I increase the timeout threshold so
$session_obj->cmd()
doesnt time out and exit before it gets the output?
Direct Responses: 7278 | Write a response
Posted on Thu Mar 6 08:34:35 2008 by oliver in response to 7214
Re: how to increase timeout in waiting for command response
Hi chicks1dig1unix, There is a Timeout option for the cmd method which will do what you want. Pass it a number of secon +ds. You will need to change the way you call the method though, from this: $s->cmd('show interfaces'); to this: $s->cmd( String => 'show interfaces', Timeout => 60, ); There are other options, mentioned in the docs, Hope that helps, regards, oliver.
Write a response