Expect long timeout seems not work

gs_kanata used Ask the Experts™
I have a TCL script to run against a device. But one of the device status changes very slowly and it usually take between 10-20 minutes. So I set the timeout to 20 minutes. When the script is running, I could aslo manually check the device status. The interesting thing is that it always get timeout wait for that status and even the status has been changed correctly. The expect_out(buffer) is empty.

set timeout 1200

expect {


     timeout {

        puts $expect_out(buffer)


So I am wondering during so long timeout period, how often does the TCL/Expect code to check the terminal output? It seems that it has fallen to sleep and then suddenly wake up withing looking for anything.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
if you add "exp_internal 1" to the start of your expect script, it will print out the datat it recevies every time it tests it - you will then see how often it does the check.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial