From: Roland G. <RGi...@cp...> - 2003-07-14 22:13:25
|
Zitat von Alan Jiang <al...@ra...>: > Hi, > I have an emergency problem that I need your help. I have just > installed expect-1.15 on redhat 9.0 and receive the following warning > message: > > Warning: your default pty can only handle 155 bytes at a time! > ok 30 > > This warning message didn't come up during the installation on > !!!redhat 7.1!!!! > I use your expect module to work with rsync to synchronize two > website. > It now takes forever to update (serveral runs for just one small > file). > Can you please tell me how this problem can be solved? Thanks. well, this is a linux kernel problem, somebody decided that ptys need not handle lines longer than 155 bytes at a time, so there. I'm just the messenger, talk to redhat about that issue. normally it should work anyway, but theres no guarantee. but are you sure that it is this issue that is causing the problem? maybe its located somewhere else? have you tried the rsync procedure manually? tried to find where the time is lost in the expect script? -- RGi...@cp... |
From: <db...@CT...> - 2003-07-15 21:27:17
|
I tried reproducing the slowness problem you mentioned since one of my boxes is Redhat 9 but was unable. I tried the following: 1.) scripting lengthy "ls -la" in a telnet session to remote machine. 2.) scripting rsync <username>@<hostname>:<remotefile> <localfile> for JPG file about 160K in size. When installing modules, I got the same "default pty only handles 155 bytes" message, also another message saying that raw pty was ok, and handled 512+ bytes. This was when running "make test" on the Expect module. Setting both $exp->raw_pty(1) and $exp->raw_pty(0) on different trial runs before spawning either process didn't seem to make a difference. Both processes took just a second or so each. I'm trying to think of what could be causing your problem. If you're using Expect to spawn rsync, it's the rsync process that's moving the data; not expect. expect is just it's parent and thus getting STDOUT from the rsync process, so I'm thinking the amount of data rsync is moving between the websites in itself should be irrelevant. Are you running the most current versions of everything? If you can post some of the relevant code I'll take a look when I get a minute Alan Jiang <al...@ra...> Sent by: To: expect <ex...@ih...> exp...@li...urc cc: exp...@li... eforge.net Subject: Re: [Expectperl-discuss] help!! 07/14/03 08:03 PM I am quite sure it is a expect problem because if I run the rsync process independent of expect (i.e. manually entering the password at the prompt insteading of having expect module to automate the procedure), everything runs just fine. One more piece of evidence is that I didn't get this warning message about default pty can only handle 155 bytes when I installed it on redhat 7.2, and the module works perfect on that system. I wonder if rehhat 9.0 is doing something funny that messes up the expect module. Alan On Mon, 14 Jul 2003, expect wrote: > On Mon, 14 Jul 2003 13:14:42 -0400 (EDT) > Alan Jiang <al...@ra...> wrote: > > > Hi, > > I have an emergency problem that I need your help. I have just installed > > expect-1.15 on redhat 9.0 and receive the following warning message: > > > > Warning: your default pty can only handle 155 bytes at a time! > > ok 30 > > > > This warning message didn't come up during the installation on !!!redhat > > 7.1!!!! > > I use your expect module to work with rsync to synchronize two website. > > It now takes forever to update (serveral runs for just one small file). > > Can you please tell me how this problem can be solved? Thanks. > > > > Alan > > You probably need to convince me that it's an Expect problem. > You haven't so far. > > Maybe you can wrap some timings around things using > use Benchmark; > > to make your case. > > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email sponsored by: Parasoft > > Error proof Web apps, automate testing & more. > > Download & eval WebKing and get a free book. > > www.parasoft.com/bulletproofapps1 > > _______________________________________________ > > Expectperl-discuss mailing list > > Exp...@li... > > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > > > > > > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Parasoft > Error proof Web apps, automate testing & more. > Download & eval WebKing and get a free book. > www.parasoft.com/bulletproofapps1 > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > ------------------------------------------------------- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing & more. Download & eval WebKing and get a free book. www.parasoft.com/bulletproofapps1 _______________________________________________ Expectperl-discuss mailing list Exp...@li... https://lists.sourceforge.net/lists/listinfo/expectperl-discuss |
From: Alan J. <al...@ra...> - 2003-07-18 18:39:00
|
Thanks for the prompt reply. As you have suggested, I have included the script below. Maybe that can give you a clue as to what is going wrong. Thanks for the help. ----------------------------------------------------------------------------- #!/usr/bin/perl use Expect; #change the source and destination path here! $ssh=Expect->spawn("rsync -avzu --delete --progress --stats --rsync-path /path-to-rsync -e ssh /source-path account\@xxx.edu:/destination-path"); # No changes needed from here on $ssh->expect(10,"ssword: ") || die "Never got password prompt on rci.rutgers.edu, ".$ssh->exp_error()."\n"; # We got the prompt, so send a password. print $ssh "xxxxxxx"; $match=$ssh->expect(10,"closed by foreign host","-re",'[%>$]\s'); die "Files have been updated on xxx.edu\n" unless $match; $ssh->hard_close(); -------------------------------------------------------------------------- On Tue, 15 Jul 2003 db...@ct... wrote: > > I tried reproducing the slowness problem you mentioned since one of my > boxes is Redhat 9 but was unable. > > I tried the following: > > 1.) scripting lengthy "ls -la" in a telnet session to remote machine. > 2.) scripting rsync <username>@<hostname>:<remotefile> <localfile> for > JPG file about 160K in size. > > When installing modules, I got the same "default pty only handles 155 > bytes" message, also another message saying that raw pty was ok, and > handled 512+ bytes. This was when running "make test" on the Expect > module. Setting both $exp->raw_pty(1) and $exp->raw_pty(0) on different > trial runs before spawning either process didn't seem to make a difference. > Both processes took just a second or so each. > > I'm trying to think of what could be causing your problem. If you're using > Expect to spawn rsync, it's the rsync process that's moving the data; not > expect. expect is just it's parent and thus getting STDOUT from the rsync > process, so I'm thinking the amount of data rsync is moving between the > websites in itself should be irrelevant. Are you running the most current > versions of everything? If you can post some of the relevant code I'll > take a look when I get a minute > > > > > > > > Alan Jiang <al...@ra...> > Sent by: To: expect <ex...@ih...> > exp...@li...urc cc: exp...@li... > eforge.net Subject: Re: [Expectperl-discuss] help!! > > > 07/14/03 08:03 PM > > > > > > > I am quite sure it is a expect problem because if I run the rsync process > independent of expect (i.e. manually entering the password at the prompt > insteading of having expect module to automate the procedure), everything > runs just fine. One more piece of evidence is that I didn't get this > warning message about default pty can only handle 155 bytes when I > installed it on redhat 7.2, and the module works perfect on that system. I > wonder if rehhat 9.0 is doing something funny that messes up the expect > module. > > Alan > > > On Mon, 14 > Jul 2003, expect wrote: > > > On Mon, 14 Jul 2003 13:14:42 -0400 (EDT) > > Alan Jiang <al...@ra...> wrote: > > > > > Hi, > > > I have an emergency problem that I need your help. I have just > installed > > > expect-1.15 on redhat 9.0 and receive the following warning message: > > > > > > Warning: your default pty can only handle 155 bytes at a time! > > > ok 30 > > > > > > This warning message didn't come up during the installation on > !!!redhat > > > 7.1!!!! > > > I use your expect module to work with rsync to synchronize two website. > > > > It now takes forever to update (serveral runs for just one small file). > > > > Can you please tell me how this problem can be solved? Thanks. > > > > > > Alan > > > > You probably need to convince me that it's an Expect problem. > > You haven't so far. > > > > Maybe you can wrap some timings around things using > > use Benchmark; > > > > to make your case. > > |
From: Adrian P. <ad...@po...> - 2003-07-19 10:20:41
|
>>>>> "Roland" == Roland Giersig <RGi...@cp...> writes: Roland> well, this is a linux kernel problem, somebody decided Roland> that ptys need not handle lines longer than 155 bytes at a Roland> time, so there. I'm just the messenger, talk to redhat Which Linux kernel ? In 2.4.20 :- ./include/linux/tty.h:153:#define PTY_BUF_SIZE 4*TTY_FLIPBUF_SIZE ./include/linux/tty.h:137:#define TTY_FLIPBUF_SIZE 512 Which means 2048 not 155. Is the limit some other place, libc or is yet another Redhat x.0 screw up ? On my machine, 2.4.20 glibc 3.2.1 it is definitely 2048 as I have a perl module based upon Expect where each read and write of a big transfer through the pty receives/sends 2048. Sincerely, Adrian Phillips -- Who really wrote the works of William Shakespeare ? http://www.pbs.org/wgbh/pages/frontline/shakespeare/ |