I am running a XMC script to receive the output of show config/sh run against different devices:
XOS, VSP, EOS (B-Series, S-Series, ...).
cli_result = emc_cli.send("sh config")
It works fine except if I started the script with the S-Series. Whit S-Series I receive a
"Error: session exceeded timeout: 30 secs"
In difference to the other devices a “show conf” on CLI lasts more the 30 seconds (approximatly 55 seconds). I think thats the problem here.
I tried to cover that with a change to:
cli_result = emc_cli.send("sh config, True, 80")
In my opinion this should lead the script to wait for 80 secondes for a response of the send commend.
But there is no difference. I receive the same error. The hole script timeout is larger than the 120 seconds and should not be a problem here.
Is it correct that a emc_cli.send("sh config, True, 80") leads the script to wait for 80 secondes for an answer?
- Any ideas how to solve the problem?
Best answer by Stephane Grosjean
I just found that Scripting forum!
If this is still a topic, I *think* the timeout you are setting (80) is for the CLI command, but there’s also a Script Timeout in XMC. You may need to tweak it also…
There’s a key in the emc_vars dictionary for that (scriptTimeout).
You can also add a session timeout in the code, like so:
# update the session timeout in seconds