1b65f freezing output - The Tcl programming language
Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
freezing output

Posted by erickio (erickio), 27 December 2004
I have a tcl/expect script that sends a "show ip route" command to a router. The output that is displayed from this command is around 800 to 100 lines. I don't understand what the source of the problem would be, but about half the time while the screen is displaying the output, my script freezes, and doesn't start again. I don't know if this is an issue with the size of the buffer being too small, or what else it could be. if you need any code examples i can show. tia

Posted by admin (Graham Ellis), 27 December 2004
Potentially a timing problem or something - use log_user to trace the output and see where it hangs.

Yes - a code sameple would help - otherwise we're guessing   - see the "posting FAQ" at http://www.wellho.net/forum/Assistance/Posting-FAQ.html

Posted by erickio (erickio), 27 December 2004
instead of using log_user to trace the output i used it to mask the output. and it seems to work fine now (im getting a diff problem now), but in terms of hanging while displaying the information, my script works. i think the reason it was hanging is that too much information was being displayed and it was making my script crash.


------
#sid is the spawn_id
#shop is the show command output

global sid shop
set shop ""

send -i $sid "show ip route\n"

expect {
  -i $sid "*\n" {append shop $expect_out(buffer)
                exp_continue
               }
  -i $sid "#" {}
   }

send -i $sid "exit\n"



This page is a thread posted to the opentalk forum at www.opentalk.org.uk and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2013: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 899360 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho
0