|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Linux - Expect script hangs
Hi,
I have script which is based on TCL and expect. It is written to test my code. It usually runs fine for a while and hangs after sometime. Code snippet set l_temp_timeout $timeout OUTPUT_LOG2 2 >>>$expect_out(buffer)<<< OUTPUT_LOG2 2 "Expecting...$my_prompt" set timeout 3 expect { $my_prompt { set l 1 } timeout { OUTPUT_LOG2 2 $expect_out(buffer) } } OUTPUT_LOG2 2 "...Out of Expect $my_prompt" My log for this code normally looks like Retrying... >>>^M^M 238114.0^M ^Mswitch(config-if-hsrp)#<<< Expecting...# ...Out of Expect # But once this hangs it looks like Retrying... >>>^M^M 704802.0^M ^Mswitch(config-if-hsrp)#<<< Expecting...# Screen shot for this ^Mswitch(config-if-hsrp)# echo 704802.0^M 704802.0 ^Mswitch(config-if-hsrp)# sh ip route vrf all^M sh ip route vrf all IP Route Table for VRF "default" : : : : IP Route Table for VRF "cisco3" '*' denotes best ucast next-hop '**' denotes best mcast next-hop '[x/y]' denotes [preference/metric] 0.0.0.0/32, 1 ucast next-hops, 0 mcast next-hops *via Null0, [220/0], 00:25:03, local, discard 255.255.255.255/32, 1 ucast next-hops, 0 mcast next-hops *via sup-eth1, [0/0], 00:25:03, local Even I noticed that the prompt did not come back. Not sure whats the problem. Even if the prompt which is "#" did not show up, at least it should have timed out. Why is it hanging ? Thanks Naveen |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Server Administration > Linux - Expect script hangs |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|