Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Expect hang to get buigger output...
Hi All,

I dont know why expect hangs..... when it tries to get a bigger output
from ssh, In telnet it is not hang. So i think one of conclusion is may
be some timing issue or packets size issue. But i have gbic lan card,
so packet issue can not be come. May be some timing issue or buffer
issuse in picture.

Can anybody tell me the exact problem of hanging and solution.

I have another question is that how to clear expect_out(buffer) memory.

Thanks in advance,
-- Puneet


Report this thread to moderator Post Follow-up to this message
Old Post
Puneet
04-26-05 09:02 AM


Re: Expect hang to get buigger output...
I'd suggest setting exp_internal to one and seeing what the pattern matching
is. Post here if it's not clear to you. Does the beginning of the pattern
you are looking for span over 2000 bytes to the end of the pattern? Then you
might need to set your match_max variable to some higher number of bytes.

Outside of the login, there should not be any difference in the way output
is displayed from ssh to telnet (give the same shell / terminal on the other
end).

I think you clear the expect_out(buffer) but just performing the expect
command without any parameters:

expect


"Puneet" <mr.puneet.goyal@gmail.com> wrote in message
news:1114492365.062732.171090@z14g2000cwz.googlegroups.com...
Hi All,

I dont know why expect hangs..... when it tries to get a bigger output
from ssh, In telnet it is not hang. So i think one of conclusion is may
be some timing issue or packets size issue. But i have gbic lan card,
so packet issue can not be come. May be some timing issue or buffer
issuse in picture.

Can anybody tell me the exact problem of hanging and solution.

I have another question is that how to clear expect_out(buffer) memory.

Thanks in advance,
-- Puneet



Report this thread to moderator Post Follow-up to this message
Old Post
Patrick Dunnigan
04-26-05 09:02 PM


Re: Expect hang to get buigger output...
Puneet wrote:
> Hi All,
>
> I dont know why expect hangs..... when it tries to get a bigger
output
> from ssh, In telnet it is not hang. So i think one of conclusion is
may
> be some timing issue or packets size issue. But i have gbic lan card,
> so packet issue can not be come. May be some timing issue or buffer
> issuse in picture.
>
> Can anybody tell me the exact problem of hanging and solution.
>
> I have another question is that how to clear expect_out(buffer)
memory.
>
> Thanks in advance,
> -- Puneet


My best practice to avoid getting into such problem is to adapt my code
to match every line as it comes using regexp and anchors. If you can
quote your code I might be able to see how it can be improved. You can
also try to turn on debugging [exp_internal 1] and see what exactly is
happenning. Perhaps there are some extra characters generated only
during yr ssh session that affects your matching.

Rgrds,
Khaled


Report this thread to moderator Post Follow-up to this message
Old Post
Khaled
04-27-05 08:59 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Tcl archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:29 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.