You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
(26) |
Dec
(7) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(5) |
Feb
(3) |
Mar
(11) |
Apr
(10) |
May
(2) |
Jun
(5) |
Jul
(13) |
Aug
(2) |
Sep
(3) |
Oct
(10) |
Nov
(18) |
Dec
(29) |
2002 |
Jan
(12) |
Feb
(14) |
Mar
(73) |
Apr
(28) |
May
(21) |
Jun
(39) |
Jul
(40) |
Aug
(42) |
Sep
(20) |
Oct
(4) |
Nov
(9) |
Dec
(18) |
2003 |
Jan
(2) |
Feb
(8) |
Mar
(6) |
Apr
(24) |
May
(24) |
Jun
(14) |
Jul
(16) |
Aug
(36) |
Sep
(34) |
Oct
(23) |
Nov
(4) |
Dec
(15) |
2004 |
Jan
(6) |
Feb
(13) |
Mar
(7) |
Apr
(5) |
May
(11) |
Jun
(5) |
Jul
(4) |
Aug
|
Sep
(2) |
Oct
(16) |
Nov
(4) |
Dec
(9) |
2005 |
Jan
(2) |
Feb
(1) |
Mar
(3) |
Apr
(10) |
May
(5) |
Jun
(13) |
Jul
(3) |
Aug
|
Sep
(7) |
Oct
(5) |
Nov
(1) |
Dec
(9) |
2006 |
Jan
|
Feb
(10) |
Mar
(22) |
Apr
(14) |
May
(5) |
Jun
(4) |
Jul
(19) |
Aug
(7) |
Sep
(16) |
Oct
(4) |
Nov
(1) |
Dec
(16) |
2007 |
Jan
(17) |
Feb
|
Mar
(35) |
Apr
(5) |
May
(20) |
Jun
(11) |
Jul
(33) |
Aug
(3) |
Sep
(2) |
Oct
(11) |
Nov
(23) |
Dec
(5) |
2008 |
Jan
(10) |
Feb
(9) |
Mar
|
Apr
(6) |
May
(8) |
Jun
(7) |
Jul
|
Aug
(3) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
(20) |
2009 |
Jan
(8) |
Feb
(8) |
Mar
(3) |
Apr
(8) |
May
(2) |
Jun
(11) |
Jul
(2) |
Aug
|
Sep
(3) |
Oct
(1) |
Nov
(7) |
Dec
(4) |
2010 |
Jan
(2) |
Feb
(1) |
Mar
(3) |
Apr
|
May
(2) |
Jun
(2) |
Jul
(7) |
Aug
(3) |
Sep
(7) |
Oct
(2) |
Nov
(1) |
Dec
(4) |
2011 |
Jan
(4) |
Feb
(5) |
Mar
|
Apr
(3) |
May
(2) |
Jun
|
Jul
(6) |
Aug
|
Sep
|
Oct
(6) |
Nov
|
Dec
|
2012 |
Jan
|
Feb
(1) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(7) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
(30) |
Apr
(10) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(12) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Kemp, D. <dk...@em...> - 2003-08-22 16:54:33
|
Hi, I am intermittently getting the following message .... Not a GLOB reference at /usr/local/lib/perl5/site_perl/5.6.1/Expect.pm line 256. This happens on a Solaris 8 system running Perl 5.6.1 and Expect 1.15. The problem is occurring on a production system that has multiple fast processors and a very large amount of memory. It seems to be occurring more often as the number of users on the system that are using my code increases. I do not see the problem on my "slower" test system running the same level of software. Does anyone have any idea what may be triggering this error? What can I do to try an isolate what the cause of the problem may be?? Best Regards, Donald.E.S.Kemp AT&T Network Management Solutions, Building 6000, Langstone Technology Park, Langstone Road, Havant, Hampshire, United Kingdom, PO9 1SA Phone: +44(0)23 9222 8424 email: dk...@em... This message and any attachments to it contain confidential business information exclusively intended for the recipients. Please do not forward or distribute it to anyone else. If you have received this e-mail in error, please call [+44 (0)23 92228424] to report the error and then delete this message from your system. |
From: Roland G. <RGi...@cp...> - 2003-08-22 08:37:18
|
From the Expect docs: Furthermore, patterns can now be specified as array refs containing [$regexp, sub { ...}, @optional_subparms] . When the pattern matches, the subroutine is called with parameters ($matched_expect_obj, @optional_subparms). Wu, LT (=A7d=CD=DD=BCw IEC1) wrote: > Hi, > =20 > I'm having this problem. > I know we can use subroutine in this way, > =20 > [ timeout =3D> sub{$exp->send("quit\n");}], > =20 > or call a subroutine in this way, > =20 > [ qr/SQL>/i =3D> \&dothis ], > =20 > but I want to pass parameters along with the subroutine call, > so I write in this way, > =20 > [ timeout =3D> sub{$exp->send("quit\n");}], > [ qr/SQL>/i =3D> \&dothis(param) ], this would be [ qr/SQL>/i =3D> \&dothis, param ], > but it generated such error message: > =20 > "Pattern #2 doesn't have a CODE referenceafter the pattern" > =20 > Then the timeout in 1st line cannot work, > although the subroutine did receive the parameter. > =20 > So that means I cannot pass any parameters within Expect statement. > How can I solve this problem? > Thanks. > =20 > =20 > Liang > =20 Hope this helps, Roland |
From: Allen H. <al...@hu...> - 2003-08-22 08:27:56
|
I haven't tried exactly what you are doing, but how about this: [ qr/SQL>/i =3D> sub{ dothis(param); dothat(param); }] Allen On Tuesday, August 19, 2003, at 06:54 PM, Wu, LT (=A7d=CD=DD=BCw IEC1) = wrote: > Hi, > =20 > I'm having this problem. > I know we can use subroutine in this way, > =20 > [ timeout =3D> sub{$exp->send("quit\n");}], > =20 > or call a subroutine in this way, > =20 > [ qr/SQL>/i =3D> \&dothis ], > =20 > but I want to pass parameters along with the subroutine call, > so I write in this way, > =20 > [ timeout =3D> sub{$exp->send("quit\n");}], > [ qr/SQL>/i =3D> \&dothis(param) ], > =20 > but it generated such error message: > =20 > "Pattern #2 doesn't have a CODE referenceafter the pattern" > =20 > Then the timeout in 1st line cannot work, > although the subroutine did receive the parameter. > =20 > So that means I cannot pass any parameters within Expect statement. > How can I solve this problem? > Thanks. > =20 > =20 > Liang > =20 > al...@hu... www.hutchison.org/allen/ |
From: <Wu...@in...> - 2003-08-20 04:02:35
|
Hi, =20 I'm having this problem. I know we can use subroutine in this way, =20 [ timeout =3D> sub{$exp->send("quit\n");}], =20 or call a subroutine in this way, =20 [ qr/SQL>/i =3D> \&dothis ], =20 but I want to pass parameters along with the subroutine call, so I write in this way, =20 [ timeout =3D> sub{$exp->send("quit\n");}], [ qr/SQL>/i =3D> \&dothis(param) ], =20 but it generated such error message: =20 "Pattern #2 doesn't have a CODE referenceafter the pattern" =20 Then the timeout in 1st line cannot work, although the subroutine did receive the parameter. =20 So that means I cannot pass any parameters within Expect statement. How can I solve this problem? Thanks. =20 =20 Liang =20 |
From: Guoben Li <gu...@ya...> - 2003-08-13 23:23:53
|
I found what was wrong. It was unrelated to Expectperl. The scp host's public key didn't match the one in user's .ssh/known_hosts file. Thus the command actually prompted warning for unmatched keys rather than "Password:". That was why the program timed out. After updating the key in the file. User runs the test program fine. Thanks, Guoben Li __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com |
From: Guoben Li <gu...@ya...> - 2003-08-13 22:16:35
|
Hi, I have a simple Expectperl test program from "Perl Cookbook". It feeds my password to do an "scp". In sudo it works and did scp a file. But as a user, e.g. myself, the same program timed out for the password prompt: ------------------------------------------------------ my $cmd = "/usr/local/bin/scp $uid\@$frhost:$srcfile $tmpdir/."; my $command = Expect->spawn($cmd) or return "Couldn't start program: $!\n"; $command->log_stdout(0); unless ($command->expect(10, "$uid\@$frhost\'s password:")) { print "Waiting for password prompt timed out.\n"; exit; } print $command "$pswd\r"; $command->soft_close(); $command->hard_close(); ------------------------------------------------------- The 1st run: sudo ./test-expect.pl guoben host /tmp/foo passwd The 2nd run: ./test-expect.pl guoben host /tmp/foo passwd What could be the problem? Thanks!! Guoben Li __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com |
From: Roland G. <RGi...@cp...> - 2003-08-13 06:50:36
|
> I issue command2 with both a pattern match and a timeout. I find that > when the output from command1 contains the pattern match, the expect() > call for command2 terminates before it's looked at the output from > command2, and I essentially get out of sync with commands and command > output. > > I tried clear_accum() between command1 and command2, but before() was > not altered, and the problem persists. Have you actually seen this with $Expect::Exp_Internal=1;? I would guess that command1 is still running (as you don't wait for it) and still produces output while you are already expecting for patterns for command2 (which isn't even running at this time). The right way is to wait for the (shell) prompt that indicates completion of command1 before issuing another command... Hope this helps, Roland -- RGi...@cp... |
From: Eric G. <er...@re...> - 2003-08-12 19:23:07
|
Hi, I having this problem: I issue command1 and use a timeout to terminate the expect() call since I don't know what I'm going to get back from command1. This sets before() to command1's output as expected. I issue command2 with both a pattern match and a timeout. I find that when the output from command1 contains the pattern match, the expect() call for command2 terminates before it's looked at the output from command2, and I essentially get out of sync with commands and command output. I tried clear_accum() between command1 and command2, but before() was not altered, and the problem persists. I would have thought Expect would have sucked up command1's output into before() and made it unavailable for matching on future expect() calls. Guess not, but I can't seem to get rid of it with clear_accum(). It seems that an actual pattern match acts differently from a timeout in terms of what is available to match on the next expect() call. For a timeout, the contents of before() appears available for matching on the next expect() call while on an actual pattern match, before() is not available. Ideas on how to fix this? I thought of making a call to expect() between command1 and command2 feeding the end of the before() result which should cause an actual pattern match. Is there a simpler/more elegant way? -Eric |
From: Roland G. <RGi...@cp...> - 2003-08-12 09:43:36
|
How about asking the author of Net::FTP::Recursive?! From the docs I don't see a way to tell the module to not send the subdirs. OTOH this is easy to write on your own, using Net::FTP. not expect($others, [qr/to do/, sub {print $_[0] "your homework!\n"}]); Srinivasan wrote: > Hi All, > > Do anyone have the perl code to transfer the specific directory alone to > the remote server through Net::FTP::Recursive. > > Please send it asap. > > Thanks in Advance. > > Srini > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > |
From: Srinivasan <uva...@sh...> - 2003-08-11 14:54:39
|
Hi All, Do anyone have the perl code to transfer the specific directory alone to the remote server through Net::FTP::Recursive. Please send it asap. Thanks in Advance. Srini |
From: Roland G. <RGi...@cp...> - 2003-08-09 09:09:32
|
> I'm on a WinNT box with IIS webserver using PHP. I'm trying to make a > connection to a mainframe os/390 to be able to "browse" a VSAM file and load > an array with data that I need. I can currently log into the mainframe > using a JAVA telnet client tn3270, and can use PHP (or PERL) to FTP test > files. FTP is out of the question since this file I need to work with is > enormous. This sounds like you are trying to run activestate perl directly under winnt. You sould look into cygwin, which gives you a pretty good unix system on windows. Cygwin comes with its own perl and pseudo-tty-emulation and IO::Tty and Expect works on it AFAIK, so Net::Telnet probably will also work within cygwin. Apart from that, what is running on the OS/390? Linux? Z/OS? If that is the case, you should have rsh or better ssh capabilities. Then I'd do it like this: open3(\*WTR, \*RDR, \*ERR, "ssh $os390host perl"); print WTR $remote_script; while(<RDR>) { # process result line by line } This spawns a perl interpreter on the remote host, sends it a script to do some work (in that case, extracting some part of the huge file) and reads back the result. No need to install something on the remote side, no need for Expect. Hope this helps. Roland |
From: Theisen, G. <gar...@ed...> - 2003-08-08 23:07:23
|
Ok all....for the time being I'm throwing in the towel on trying to get Net::Telnet to work on my NT4 box to an os/390. Can't get past the darn prompt issue. What about using Net::FTP for downloading a PART of a file? In other words, start downloading a file (an enormous one in this case) from a certain point/byte/character (from a new download...not a restart)? -Or- It looks like tied_fh () Returns a filehandle tied to the Net::Cmd (used with Net::Ftp) object. I can't seem to find any doco on tied_fh(). Could this be used to assign a scalar var to it and read through it to grab only the data i need out of the enormous mainframe VSAM file in question, while the FTP connection is established? Gary |
From: Theisen, G. <gar...@ed...> - 2003-08-08 18:30:01
|
Hi all, I've been searching/reading for a solution for the following: I'm on a WinNT box with IIS webserver using PHP. I'm trying to make a connection to a mainframe os/390 to be able to "browse" a VSAM file and = load an array with data that I need. I can currently log into the mainframe using a JAVA telnet client tn3270, and can use PHP (or PERL) to FTP = test files. FTP is out of the question since this file I need to work with = is enormous. I'm working on calling a PERL script (from my PHP web script), to = "create behind the scenes" a telnet session into the mainframe to begin work on = the file. I've tried Net::Telnet, but w/no success. The problem is I'm on = a winNT box. The code is below. The output is cryptic, and nothing I = can read so there is a communication/protocol problem with what the = mainframe is expecting/receiving (I think). I've just found out about IO::Tty and IO::Pty. But don't want to spin = my wheels for another week. Has anyone out there successfully used any of those PERL modules to connect (automatically...w/o direct user input = like a terminal) to a mainframe from a WinNT box? Any help/pointers/directions = to tutorials would be greatly appreciated! Gary use Net::Telnet; # Config Variables #$host =3D @ARGV[0]; #$user =3D @ARGV[1]; #$pass =3D @ARGV[2]; $host =3D "mainframe.com"; $user =3D "user"; $pass =3D "pass"; $secs =3D 10; $command =3D open (SOLRPT, "user.test.solrpt"); $command .=3D $solrpt =3D <SOLRPT>; $command .=3D close(SOLRPT); # debug log of data sent to host. $dumplog =3D 'i:/perl/dumplog.txt'; # debug log of data received from host. $inputlog =3D 'i:/perl/inputlog.txt'; $mode =3D 1; $term =3D 'vt100'; # Net::Telnet object creation. my $telnet =3D new Net::Telnet ( Prompt =3D> '/\>$/', Telnetmode=3D>0, Timeout =3D> $secs); $telnet->errmode("return"); $log=3D $telnet->input_log($inputlog); $dlog=3D $telnet->dump_log($dumplog); # login $telnet->open($host); $telnet->login($user, $pass);# or die "login failed: = @{[$telnet->errmsg]}"; $telnet->waitfor('/\>$/'); # execute command on remote host. @output =3D $telnet->cmd( String =3D> $command, Prompt =3D> '/\>/', Timeout =3D> $secs, Cmd_remove_mode =3D> $mode ) or die "Command failed: $!"; @output =3D $telnet->waitfor('/.:\>/'); #close telnet session $telnet->close; # print STDOUT returned from remote command. print @output; foreach (@output) { print "$_\n"; } FROM THE DUMP LOG: < 0x00000: ff fd 28 =FF=FD( > 0x00000: 0d 0a .. |
From: expect <ex...@ih...> - 2003-08-07 18:14:41
|
On Mon, 04 Aug 2003 17:19:18 -0400 Sayre Swarztrauber <sa...@qu...> wrote: > I am new to Expect. I am using it to control some serial devices that > our company manufactures. They are connected on /dev/tty ports directly > as RS232 devices. I open the port using IO::File and then connect that > handle to Expect. > > I have a problem where Expect.pm occasionally closes the filehandle on > the port giving the following message from the debug output: > > Waiting for new data (6 seconds)... > handle id(3): new data. > handle id(3): EOF > handle id(3): closing... > Returning from expect with TIMEOUT or EOF > > > I have patched my problem by commenting out the > > $exp->hard_close(); > > on line 853 of Expect.pm - which I realize is a drastic step. > > What am I doing wrong? Why would expect decide to close my filehandle? > What can I do about it so that I do not have to modify the Expect.pm > program. > > Any help would be greatly appreciated. This sounds familiar to me...something about been there and done that. Of course this may not be your problem. I simply didn't understand that to cause Expect to wait forever on a pattern match the perl 'undef' function has to be used in place of a $timeout value. What I did was just not define it and it didn't do what I Expect'd. my $proghandle = new Expect; $proghandle = Expect->spawn($myprog); $proghandle->expect(undef, $whatiamexpecting); It may make sense to modify the docs slightly to point out that the perl function undef should be specified. perldoc Expect "Simple interface: Given $timeout in seconds Expect will wait for $object's handle to produce one of the match_patterns. Due to o/s limitations $timeout should be a round number. If $timeout is 0 Expect will check one time to see if $object's handle contains any of the match_patterns. If $timeout is undef Expect will wait forever for a pattern to match." |
From: expect <ex...@ih...> - 2003-08-07 17:38:10
|
On Wed, 6 Aug 2003 16:45:26 -0400 "Harter, Douglas" <dh...@st...> wrote: > There is an example of this in the 'Exploring Expect' book, Pg 5, but I > want the differences with ExpectPerl. > > I am a beginner with Unix, Perl, and Expect, but I am trying to cut down my > development time, so wonder if someone can give me an example using > ExpectPerl to set passwords using the Unix passwd command. I am a System > Administrator who could really use a script to set passwords automatically. > I still have to work out getting the modules installed on our system, but if > I can show it can be done, it will help. > > Using TCL/Expect, it would be: > spawn passwd [lindex $argv 0] > set password [lindex $argv 1] > expect "password:" > send "$password\r" > expect "password:" > send "$password\r" > expect eof > > > How would I do it in ExpectPerl??? Couple of things, I'm pretty sure that someone has solved this problem already and that at least one good solution exists. But if you want to write one yourself that's great. If you want someone else to write one for you then you might find that an existing solution will get you going faster than reinventing the wheel. If you're still committed to doing it yourself, write some perl, using Expect.pm if you'd like, and then show us what you've come up with. The best way to learn is to look at example expect code. Some comes with the Expect.pm module and if you look in the archives for this list you'll find some too. |
From: <db...@CT...> - 2003-08-07 17:32:15
|
I'd do more error checking than this, but something like this should be a start, and would be a rough minimal equivalent to your Tcl/Expect code. I did not test. You can do a perldoc Expect if you're running into syntax problems and also take a look at more complex examples there. You can find there also documentation on case-like expect format if you are already familiar with Tcl version. use Expect; my $username = shift; my $password = shift; my $exp = Expect->spawn("passwd $username"); $exp->expect(10, "password:"); $exp->send(10, "$password"); $exp->expect(10, "password:"); $exp->send(10, "$password"); $exp->expect(10, 'eof'); "Harter, Douglas" <dh...@st...> To: "Expect Mailing List Perl (E-mail)" Sent by: <exp...@li...> exp...@li...urc cc: eforge.net Subject: [Expectperl-discuss] Perl Expect with passwd 08/06/2003 04:45 PM There is an example of this in the 'Exploring Expect' book, Pg 5, but I want the differences with ExpectPerl. I am a beginner with Unix, Perl, and Expect, but I am trying to cut down my development time, so wonder if someone can give me an example using ExpectPerl to set passwords using the Unix passwd command. I am a System Administrator who could really use a script to set passwords automatically. I still have to work out getting the modules installed on our system, but if I can show it can be done, it will help. Using TCL/Expect, it would be: spawn passwd [lindex $argv 0] set password [lindex $argv 1] expect "password:" send "$password\r" expect "password:" send "$password\r" expect eof How would I do it in ExpectPerl??? . ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Expectperl-discuss mailing list Exp...@li... https://lists.sourceforge.net/lists/listinfo/expectperl-discuss |
From: Harter, D. <dh...@st...> - 2003-08-06 20:45:45
|
There is an example of this in the 'Exploring Expect' book, Pg 5, but I want the differences with ExpectPerl. I am a beginner with Unix, Perl, and Expect, but I am trying to cut down my development time, so wonder if someone can give me an example using ExpectPerl to set passwords using the Unix passwd command. I am a System Administrator who could really use a script to set passwords automatically. I still have to work out getting the modules installed on our system, but if I can show it can be done, it will help. Using TCL/Expect, it would be: spawn passwd [lindex $argv 0] set password [lindex $argv 1] expect "password:" send "$password\r" expect "password:" send "$password\r" expect eof How would I do it in ExpectPerl??? . |
From: Austin S. <te...@of...> - 2003-08-04 22:06:28
|
On Mon, Aug 04, 2003 at 05:19:18PM -0400, Sayre Swarztrauber wrote: > I am new to Expect. I am using it to control some serial devices that > our company manufactures. They are connected on /dev/tty ports directly > as RS232 devices. I open the port using IO::File and then connect that > handle to Expect. > > I have a problem where Expect.pm occasionally closes the filehandle on > the port giving the following message from the debug output: > > Waiting for new data (6 seconds)... > handle id(3): new data. > handle id(3): EOF > handle id(3): closing... > Returning from expect with TIMEOUT or EOF > > > I have patched my problem by commenting out the > > $exp->hard_close(); > > on line 853 of Expect.pm - which I realize is a drastic step. > > What am I doing wrong? Why would expect decide to close my filehandle? > What can I do about it so that I do not have to modify the Expect.pm > program. I concur, this doesn't seem like something that should be done during expect(). It should be up to the user to close the filehandle. Also while checking this out I noticed: # ugly hack for broken solaris ttys that spew <blank><backspace> # into our pretty output $buffer =~ s/ \cH//g; should probably either be somewhere else or have a non-default flag for turning it on. Users should be able to expect 8-bit clean data by default - at least when the handle isn't a pty. Austin |
From: Sayre S. <sa...@qu...> - 2003-08-04 21:19:37
|
I am new to Expect. I am using it to control some serial devices that our company manufactures. They are connected on /dev/tty ports directly as RS232 devices. I open the port using IO::File and then connect that handle to Expect. I have a problem where Expect.pm occasionally closes the filehandle on the port giving the following message from the debug output: Waiting for new data (6 seconds)... handle id(3): new data. handle id(3): EOF handle id(3): closing... Returning from expect with TIMEOUT or EOF I have patched my problem by commenting out the $exp->hard_close(); on line 853 of Expect.pm - which I realize is a drastic step. What am I doing wrong? Why would expect decide to close my filehandle? What can I do about it so that I do not have to modify the Expect.pm program. Any help would be greatly appreciated. Thank you very much, Sayre Swarztrauber |
From: <db...@CT...> - 2003-08-04 14:15:39
|
Did you try sending Control-C with \r ? might be a buffering thing .. "Andrew & Laurie White" <and...@ve...> To: <exp...@li...> Sent by: cc: exp...@li...urc Subject: [Expectperl-discuss] expect issues with eforge.net gdb 08/04/2003 03:47 AM Hello I am trying to use expect perl to control a gdb session running an application. I can easily communicate with gdb when attaching to the pid of the application initially. However, when I do a continue and the application is now running again, I can't seem to get it to respond when I send the gdb expect object a control-c. In "real-life" that's how one can get control back to the keyboard of the debugger. My kludge which still doesn't work, is to send a SIGINT signal to the process directly. Problem is that when gdb responds, the gdb->expect("SIGINT") never sees the response because it's after the kill 2, $targetpid command. Something of a race.... My theory why this doesn't work is that gdb is doing things with the terminal that the gdb object is referring to. Has anyone worked with gdb before using expect? my code is summarized below $gdb = new Expect; .... $gdb->spawn("gdb", ($target)); $gdb->expect (10, "\(gdb\)", etc....); $gdb->send("attach $targetpid\r"); $gdb->expect (10, "\(gdb\)", etc....); $gdb->send("continue\r"); $gdb->expect(10, "Continue", etc....); taget app is now in control. in this case it's a network server. ... $gdb->send("\cC"); #seems to hang here and never gets to the expect. i confirmed with gdb->debug(2) #my sneaking suspicion is i am sending controlc to gdb but it's not the correct place to send it # really i need to send to the target (which isn't an object) $gdb->expect (10, "\(gdb\)", etc....); kludge (that doesn't work either but does get a response equivalent to sending controlC) $gdb = new Expect; .... $gdb->spawn("gdb", ($target)); $gdb->expect (10, "\(gdb\)", etc....); $gdb->send("attach $targetpid\r"); $gdb->expect (10, "\(gdb\)", etc....); $gdb->send("continue\r"); $gdb->expect(10, "Continue", etc....); taget app is now in control. in this case it's a network server. ... kill 2, $targetgdb->expect (10, "\(gdb\)", etc....); $gdb->expect (10, "\(gdb\)", etc....); #never sees the gdb process output even though it scrolls across the screen. thanks. aw ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Expectperl-discuss mailing list Exp...@li... https://lists.sourceforge.net/lists/listinfo/expectperl-discuss |
From: Andrew & L. W. <and...@ve...> - 2003-08-04 04:01:58
|
Hello I am trying to use expect perl to control a gdb session running an application. I can easily communicate with gdb when attaching to the pid of the application initially. However, when I do a continue and the application is now running again, I can't seem to get it to respond when I send the gdb expect object a control-c. In "real-life" that's how one can get control back to the keyboard of the debugger. My kludge which still doesn't work, is to send a SIGINT signal to the process directly. Problem is that when gdb responds, the gdb->expect("SIGINT") never sees the response because it's after the kill 2, $targetpid command. Something of a race.... My theory why this doesn't work is that gdb is doing things with the terminal that the gdb object is referring to. Has anyone worked with gdb before using expect? my code is summarized below $gdb = new Expect; .... $gdb->spawn("gdb", ($target)); $gdb->expect (10, "\(gdb\)", etc....); $gdb->send("attach $targetpid\r"); $gdb->expect (10, "\(gdb\)", etc....); $gdb->send("continue\r"); $gdb->expect(10, "Continue", etc....); taget app is now in control. in this case it's a network server. ... $gdb->send("\cC"); #seems to hang here and never gets to the expect. i confirmed with gdb->debug(2) #my sneaking suspicion is i am sending controlc to gdb but it's not the correct place to send it # really i need to send to the target (which isn't an object) $gdb->expect (10, "\(gdb\)", etc....); kludge (that doesn't work either but does get a response equivalent to sending controlC) $gdb = new Expect; .... $gdb->spawn("gdb", ($target)); $gdb->expect (10, "\(gdb\)", etc....); $gdb->send("attach $targetpid\r"); $gdb->expect (10, "\(gdb\)", etc....); $gdb->send("continue\r"); $gdb->expect(10, "Continue", etc....); taget app is now in control. in this case it's a network server. ... kill 2, $targetgdb->expect (10, "\(gdb\)", etc....); $gdb->expect (10, "\(gdb\)", etc....); #never sees the gdb process output even though it scrolls across the screen. thanks. aw |
From: Dave S. <kin...@ya...> - 2003-08-01 17:51:44
|
I am running FreeBSD. I've also used the MAKEDEV command to make as many ptys on my machine as it can support, which is supposedly 256. I know that I am not using that many though. I am not using Expect purely for interaction with the ssh login prompt. I also need it to send commands to programs that run within the ssh shell, and to read back the output of those commands. If you know of another way to do this (besides the already mentioned Net::SSH), I'd be grateful for the info. Thanks, Dave --- Roland Giersig <RGi...@cp...> wrote: > > 1) "Cannot open a pty". > > This comes from a failure of the pty_allocate > > function, in the "new" subroutine of Pty.pm. My > Pty.pm > > is version 1.02. I cannot find the "pty_allocate" > > subroutine in any .pm or .pl file on my system, so > I > > don't know why it is failing sometimes. > > Looks like you ran out of ptys on your system. This > can happen if you > have a lot of simultanious connections to spawned > commands (or a lot of > windows open). You didn't say what OS you are > running on, you may want > to look into /dev to see how pty* there are. Or into > /dev/ptmx/. Go ask > a local guru. > > BTW, the pty_allocate() is written in C and in an > .XS module... > > > > 2) "Error: could not connect pty as controlling > > terminal!" > > This may be related to 1) and also is very > system-dependent. Maybe an > OS-upgrade is in order? > > Oh, and I think somebody already pointed out the SSH > module? Be sure to > read the entry in the Expect FAQ about automating > ssh. You should NOT be > using Expect purely to enter passwords for login, > there are better > mechanisms for that... > > Hope this helps, > > Roland > -- > RGi...@cp... > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built > ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are > available now. > Download today and enter to win an XBOX or Visual > Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com |
From: Roland G. <RGi...@cp...> - 2003-08-01 06:45:34
|
> 1) "Cannot open a pty". > This comes from a failure of the pty_allocate > function, in the "new" subroutine of Pty.pm. My Pty.pm > is version 1.02. I cannot find the "pty_allocate" > subroutine in any .pm or .pl file on my system, so I > don't know why it is failing sometimes. Looks like you ran out of ptys on your system. This can happen if you have a lot of simultanious connections to spawned commands (or a lot of windows open). You didn't say what OS you are running on, you may want to look into /dev to see how pty* there are. Or into /dev/ptmx/. Go ask a local guru. BTW, the pty_allocate() is written in C and in an .XS module... > 2) "Error: could not connect pty as controlling > terminal!" This may be related to 1) and also is very system-dependent. Maybe an OS-upgrade is in order? Oh, and I think somebody already pointed out the SSH module? Be sure to read the entry in the Expect FAQ about automating ssh. You should NOT be using Expect purely to enter passwords for login, there are better mechanisms for that... Hope this helps, Roland -- RGi...@cp... |
From: Dave S. <kin...@ya...> - 2003-07-31 22:38:13
|
Thanks I'm trying to install this module now, though I'm running into some dependency issues. Can I ask you some questions in the mean time? 1) How does the SSH module operate when I call commands that take a long time to run, and have a lot of output (i.e. cat'ing a large file). Will the 'cmd' subroutine time out ever? Will it be able to return that much data in the return value list? 2) Can I add in a timeout value to the 'cmd', such that it will never wait longer than x seconds for a command to complete. This is useful for some of my tests, which can often get hung if there's a bug in them. Thanks, Dave --- Chris Snyder <cas...@pe...> wrote: > You might want to look at using Net::SSH instead. > > > At 12:08 PM 7/31/2003 -0700, you wrote: > >Hi! > > > >I really need some help, and am so glad that I've > >finally found this discussion group! > > > >I am using Perl and Expect to manage a simple test > >infrastructure at my company. Every so often a cron > >job fires off a Perl script. That script then > executes > >other Perl scripts, which monitor tests via Expect. > >Most of those scripts start out by calling > >Expect->spawn("ssh"), to ssh to another machine and > >run/monitor their specific test. > > > >Occasionally though, Expect's spawn routine dies > with > >one of two errors, both of which come from the > Pty.pm > >module. I can't figure out what they mean or how to > >fix them though, which is driving me batty! > > > >1) "Cannot open a pty". > > This comes from a failure of the pty_allocate > >function, in the "new" subroutine of Pty.pm. My > Pty.pm > >is version 1.02. I cannot find the "pty_allocate" > >subroutine in any .pm or .pl file on my system, so > I > >don't know why it is failing sometimes. > > > >2) "Error: could not connect pty as controlling > >terminal!" > > I see this one more often. It is also in Pty.pm, > in > >the make_slave_controlling_terminal subroutine. > >According to the code, it comes from a failure to > open > >/dev/tty. > > > >Can anyone help me? Expect is about the only tool I > >can use for my testing infrastructure (that I know > >about at least). But these occasional failures make > my > >infrastructure itself unreliable. I could really > use > >some assistance. > > > >Thanks so much, > >Dave > > > >__________________________________ > >Do you Yahoo!? > >Yahoo! SiteBuilder - Free, easy-to-use web site > design software > >http://sitebuilder.yahoo.com > > > > > >------------------------------------------------------- > >This SF.Net email sponsored by: Free pre-built > ASP.NET sites including > >Data Reports, E-commerce, Portals, and Forums are > available now. > >Download today and enter to win an XBOX or Visual > Studio .NET. > >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > >_______________________________________________ > >Expectperl-discuss mailing list > >Exp...@li... > >https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com |
From: Dave S. <kin...@ya...> - 2003-07-31 19:08:35
|
Hi! I really need some help, and am so glad that I've finally found this discussion group! I am using Perl and Expect to manage a simple test infrastructure at my company. Every so often a cron job fires off a Perl script. That script then executes other Perl scripts, which monitor tests via Expect. Most of those scripts start out by calling Expect->spawn("ssh"), to ssh to another machine and run/monitor their specific test. Occasionally though, Expect's spawn routine dies with one of two errors, both of which come from the Pty.pm module. I can't figure out what they mean or how to fix them though, which is driving me batty! 1) "Cannot open a pty". This comes from a failure of the pty_allocate function, in the "new" subroutine of Pty.pm. My Pty.pm is version 1.02. I cannot find the "pty_allocate" subroutine in any .pm or .pl file on my system, so I don't know why it is failing sometimes. 2) "Error: could not connect pty as controlling terminal!" I see this one more often. It is also in Pty.pm, in the make_slave_controlling_terminal subroutine. According to the code, it comes from a failure to open /dev/tty. Can anyone help me? Expect is about the only tool I can use for my testing infrastructure (that I know about at least). But these occasional failures make my infrastructure itself unreliable. I could really use some assistance. Thanks so much, Dave __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com |