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: Thomas R. <ros...@re...> - 2007-01-04 15:13:29
|
But then it complains about =A0"insecure PATH" =0A=0AAlso too many scripts = to modify :(=0A=0A-Thomas=0A=0A=0AOn Thu, 04 Jan 2007 Blackstone,J.David wr= ote :=0A> I'd just set @INC explicitly in the Perl program.=0A>=0A>jdb=0A= >=0A>=0A> Hi,=0A> I am using Perl v 5.6.1 on HP-UX 11.11i=0A>=0A> Scenar= io is as follows:=0A> 1. General Ops user (opsusr) runs a C binary (mybin)= =0A> mybin (owner: app Mode: 4750 [SUID bit is set])=0A> 2. The mybin fil= e calls a shell script (myshell.sh) as app user=0A> 3. myshell.sh sets the= PERLLIB and calls a perl file as app user=0A>=0A> Problem:=0A> Perl comp= lains about @INC since taint mode is on (effective user=0A>!=3D real user)= =0A>=0A> What I need:=0A> Disable taint mode completely on the UX server.= .. no worries=0A>about security!=0A>=0A> Can this be achieved and how?=0A>= =0A> Tx,=0A> Thomas=0A=0A=0A |
From: Thomas R. <ros...@re...> - 2007-01-04 15:11:43
|
My "requirement" is a script executed by ops user calls the perl file as ap= p user (using suid only) =0A=0AHence perl taint mode is getting ON.=0A=0AI = tried cleansing INC as mentioned. However it yet fails with cannot find pm = in INC and shows only the default PERLLIB not the one set in the sh file. = =0A=0APlease advise.=0A=0ARegards,=0AThomas=0A=0A=0AOn Thu, 04 Jan 2007 Chr= is Snyder wrote :=0A>Normally taint mode is off by default.=0A>=0A>However = according to perldoc perlsec, if perl notices that the real and=0A>effectiv= e uids and/or gids differ, it will turn taint mode on.=0A>=0A>If you can ma= ke sure that the real and effective uids/gids are the same,=0A>and make sur= e you are not explicitly invoking taint mode (-T), you=0A>shouldn't have a = problem.=0A>=0A>Otherwise I suppose a simple yet relatively niave way of de= aling with=0A>this would be to do something like this:=0A>=0A>foreach my $k= (@INC)=0A>{=0A> if($k =3D~ /(.*))=0A> {$k =3D $1;}=0A>}=0A>=0A>Thi= s should preserve @INC as it is, but at the same time convince perl=0A>that= you have "inspected" the values, and thus they are no longer=0A>tainted.= =0A>=0A>Note that you have NOT inspected the values, at least not very=0A>t= horoughly.=0A>=0A>Always remember, just because I think something is true, = doesn't make it=0A>so. If you take my advice, and it destroys your system,= I will feel=0A>badly. I won't accept any responsibility, but I'll still f= eel bad for=0A>you.=0A>=0A>Have a nice day,=0A>Chris=0A>=0A>On Thu, 2007-01= -04 at 13:51 +0000, Thomas Rosario wrote:=0A> > Hi,=0A> > I am using Perl v= 5.6.1 on HP-UX 11.11i=0A> >=0A> > Scenario is as follows:=0A> > 1. General= Ops user (opsusr) runs a C binary (mybin)=0A> > mybin (owner: app Mode: 47= 50 [SUID bit is set])=0A> > 2. The mybin file calls a shell script (myshell= .sh) as app user=0A> > 3. myshell.sh sets the PERLLIB and calls a perl file= as app user=0A> >=0A> > Problem:=0A> > Perl complains about @INC since tai= nt mode is on (effective user !=3D=0A> > real user)=0A> >=0A> > What I need= :=0A> > Disable taint mode completely on the UX server... no worries about= =0A> > security!=0A> >=0A> > Can this be achieved and how?=0A> >=0A> > Tx,= =0A> > Thomas=0A=0A=0A |
From: Chris S. <cas...@pe...> - 2007-01-04 14:49:58
|
Normally taint mode is off by default. However according to perldoc perlsec, if perl notices that the real and effective uids and/or gids differ, it will turn taint mode on. If you can make sure that the real and effective uids/gids are the same, and make sure you are not explicitly invoking taint mode (-T), you shouldn't have a problem. Otherwise I suppose a simple yet relatively niave way of dealing with this would be to do something like this: foreach my $k (@INC) { if($k =~ /(.*)) {$k = $1;} } This should preserve @INC as it is, but at the same time convince perl that you have "inspected" the values, and thus they are no longer tainted. Note that you have NOT inspected the values, at least not very thoroughly. Always remember, just because I think something is true, doesn't make it so. If you take my advice, and it destroys your system, I will feel badly. I won't accept any responsibility, but I'll still feel bad for you. Have a nice day, Chris On Thu, 2007-01-04 at 13:51 +0000, Thomas Rosario wrote: > Hi, > I am using Perl v 5.6.1 on HP-UX 11.11i > > Scenario is as follows: > 1. General Ops user (opsusr) runs a C binary (mybin) > mybin (owner: app Mode: 4750 [SUID bit is set]) > 2. The mybin file calls a shell script (myshell.sh) as app user > 3. myshell.sh sets the PERLLIB and calls a perl file as app user > > Problem: > Perl complains about @INC since taint mode is on (effective user != > real user) > > What I need: > Disable taint mode completely on the UX server... no worries about > security! > > Can this be achieved and how? > > Tx, > Thomas > > > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ Expectperl-discuss mailing list Exp...@li... https://lists.sourceforge.net/lists/listinfo/expectperl-discuss |
From: Thomas R. <ros...@re...> - 2007-01-04 13:54:21
|
Hi,=0AI am using Perl v 5.6.1 on HP-UX 11.11i=0A=0AScenario is as follows:= =0A1. General Ops user (opsusr) runs a C binary (mybin)=0Amybin (owner: app= Mode: 4750 [SUID bit is set])=0A2. The mybin file calls a shell script (my= shell.sh) as app user=0A3. myshell.sh sets the PERLLIB and calls a perl fil= e as app user=0A=0AProblem:=0APerl complains about @INC since taint mode is= on (effective user !=3D real user)=0A=0AWhat I need:=0ADisable taint mode = completely on the UX server... no worries about security!=0A=0ACan this be = achieved and how?=0A=0ATx,=0AThomas=0A=0A=0A |
From: Christoph S. <csc...@am...> - 2006-12-27 09:28:48
|
I think sending an exit and let the objects clean itself is the cleanest way and could be also the fastest (the exit is performed more or less concurrently in all objects as the sending should be an async action). I'll try this. this is so simple, why didn't I think about it :-( BTW, why are you using Expect? You could execute the shell commands via qx'ssh'. Unless you're starting some interactive programs remotely... >> the applicaction depends on env variables which wouldn't be set in one-off shell commands (commands either don't work at all or behave differently. I did a wrapper to set the variables and performs the one off command, but I had to work around problems caused by starting application: the app contains deamons and when they are started in a one off ssh command with nohub, the ssh remains, as it wants all processes to stop prior end. As said this can be worked around with killing itself using different signals depending on the commands exit code - but this is nothing I have a good feeling with. Using expect is much cleaner as it uses an interactive ssh as a user would do (no difference to a human keyin what so ever). Thanks to you and Austin. Best Regards, Christoph Schwaiger "Roland Giersig" <rgi...@cp...> To exp...@li... cc bcc Subject Re: [Expectperl-discuss] speed up object close "Roland Giersig" <rgi...@cp...> Sent by: exp...@li... 23-12-06 17:44 I'll second Austins first approach: make the spawned commands exit cleanly. That means, send an "exit\r" or whatever is needed after you get the output from the remote commands. This will cause the remote side to close everything down and you will get an EOF and the spawned command will terminate and the close() will return immediately. BTW, why are you using Expect? You could execute the shell commands via qx'ssh'. Unless you're starting some interactive programs remotely... Regards, Roland PS: Frohe Weihnukka! :o) On 12/23/06, Austin Schutz <te...@of...> wrote: > On Fri, Dec 22, 2006 at 02:49:11PM +0100, Christoph Schwaiger wrote: > > Hello Austin, > > > > thanks for your answer. Currently, I'm already using hard_close, but > > wonder, due to the many objects I close sequentially, even hard_close > > takes too long. > > Would you have an idea how to speed the closure up? > > > you can always just kill(9, $expect->pid()); and then wait(); > > By default nothing does that because sending signals other than > 9 allows the process to clean itself up before exit. But that is the fastest > way to make sure it goes away _now_. In fact you can skip on the wait() if > you don't mind leaving zombies around until your perl process exits. > > Austin > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Expectperl-discuss mailing list Exp...@li... https://lists.sourceforge.net/lists/listinfo/expectperl-discuss |
From: Roland G. <rgi...@cp...> - 2006-12-23 16:44:38
|
I'll second Austins first approach: make the spawned commands exit cleanly. That means, send an "exit\r" or whatever is needed after you get the output from the remote commands. This will cause the remote side to close everything down and you will get an EOF and the spawned command will terminate and the close() will return immediately. BTW, why are you using Expect? You could execute the shell commands via qx'ssh'. Unless you're starting some interactive programs remotely... Regards, Roland PS: Frohe Weihnukka! :o) On 12/23/06, Austin Schutz <te...@of...> wrote: > On Fri, Dec 22, 2006 at 02:49:11PM +0100, Christoph Schwaiger wrote: > > Hello Austin, > > > > thanks for your answer. Currently, I'm already using hard_close, but > > wonder, due to the many objects I close sequentially, even hard_close > > takes too long. > > Would you have an idea how to speed the closure up? > > > you can always just kill(9, $expect->pid()); and then wait(); > > By default nothing does that because sending signals other than > 9 allows the process to clean itself up before exit. But that is the fastest > way to make sure it goes away _now_. In fact you can skip on the wait() if > you don't mind leaving zombies around until your perl process exits. > > Austin > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > |
From: Austin S. <te...@of...> - 2006-12-23 05:14:36
|
On Fri, Dec 22, 2006 at 02:49:11PM +0100, Christoph Schwaiger wrote: > Hello Austin, > > thanks for your answer. Currently, I'm already using hard_close, but > wonder, due to the many objects I close sequentially, even hard_close > takes too long. > Would you have an idea how to speed the closure up? > you can always just kill(9, $expect->pid()); and then wait(); By default nothing does that because sending signals other than 9 allows the process to clean itself up before exit. But that is the fastest way to make sure it goes away _now_. In fact you can skip on the wait() if you don't mind leaving zombies around until your perl process exits. Austin |
From: Christoph S. <csc...@am...> - 2006-12-22 13:49:25
|
Hello Austin, thanks for your answer. Currently, I'm already using hard_close, but wonder, due to the many objects I close sequentially, even hard_close takes too long. Would you have an idea how to speed the closure up? Regards & merry XMas! Christoph Schwaiger Austin Schutz <te...@of...> To Christoph Schwaiger <csc...@am...> cc exp...@li... bcc Subject Re: [Expectperl-discuss] speed up object close Austin Schutz <te...@of...> Sent by: exp...@li... 22-12-06 03:58 > does: > foreach my $obj (@Objects) { > $obj->hard_close(); > > Can this be speeded up somehow? Shall I try to i.e. fork 8 children of > which each one is responsible for closing 10 objects? Why is the closure > of an expect object relatively slow? > Because it allows the process to die gracefully before it kill -9s it. The graceful manner is usually to get the process to terminate itself and just be ready for that. That's usually done by closing the handle, e.g. close ($obj), or sending "exit\r" to whatever you are logged into. If the child is ready to go away hard_close will return quickly. Austin ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Expectperl-discuss mailing list Exp...@li... https://lists.sourceforge.net/lists/listinfo/expectperl-discuss |
From: Roland G. <rgi...@cp...> - 2006-12-22 12:33:25
|
Moving Expect objects between processes would mean moving open filehandles between processes, which IS possible on some architectures; but I don't know of a perl module that does that. This definitively would have a lot hack-value, but I doubt that it warrants the trouble... ;-) So yes, your idea with a connection manager server seems the most feasible.= .. Best regards, Roland On 12/20/06, HACKATHORN, TODD (SWBT) <th...@at...> wrote: > > > > > Hello, > > I am new to this group, but have been using Expect for Perl for some time > now. I am starting to think what I am trying to do is not going to work,= so > I thought I would ask the experts. > > > > What I am doing is: > > I use expect for Perl in centos 4.4, and Perl 5.8.5 I have a wrapper that > makes a object by spawning a s3270 process and allowing a interface like > get_string($row, $col, $len), put_string($str, $row, $col) and so on=85. = All > that has worked great for some time. > > > > I am trying to create a "connection manager" of sorts, it would keep 3 li= ve > connections up logged in and ready to go at all times, then when my clien= t > programs need a connection to our legacy 3270 systems, it would be able t= o > ask for an existing connection and start running with out the overhead ti= me > of logging in. Sounds easy enough. Where I am stuck is getting an Expec= t > object to move from one process to another. I have tried IPC::Sharable b= ut > it keeps giving me an error saying it can't use a GLOB, I guess that is w= hat > a reference to the Expect object is. My question is does anyone here kno= w > of a way I can convert this Expect object to a reference that can be pass= ed > in this way? Or is there a way I can export the connection as a normal f= ile > handle, and pass that reference to the other process and init a new Expec= t > object on a existing connection(already logged in)? > > > > I have though about making a client/server set up through TCP, the server > would open a connection, and do what ever is needed to keep it alive, the= n > the "worker processes" could send it simple request to put, and get strin= gs > and what not. But that seems like a lot of overhead. I already have a f= air > amount of overhead. I don't really want to go down the road of writing m= y > own 3270 emulator from scratch, the s3270 already works well. > > > > I greatly appreciate any advice, or suggestions you can give. > > > > Thanks, > > > > Todd Hackathorn > > Th...@at... > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share y= our > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > > > |
From: Austin S. <te...@of...> - 2006-12-22 03:08:18
|
On Thu, Dec 21, 2006 at 07:48:38AM -0600, HACKATHORN, TODD (SWBT) wrote: > Austin, > Thanks for the idea. > I don't think screen will work for my needs based on the documentation I > read about it. This system is meant to be non-interactive. A script > runs and interacts with databases, and does automated screen scraping, > to a 3270 terminal. Really no need for additional terminals, or a way > for someone to interact with the script. The basic use of screen is to detach active terminals so you can go back to them later. That sounds a lot like what you are considering. > Dereferencing sounds like what I need to do, but I am not familiar with > how to do that. Can you give any further information about the syntax > of dereferencing a glob? > > > my_print(*$expect, "print this using the dereferenced glob"); > Austin |
From: Austin S. <te...@of...> - 2006-12-22 03:03:49
|
> does: > foreach my $obj (@Objects) { > $obj->hard_close(); > > Can this be speeded up somehow? Shall I try to i.e. fork 8 children of > which each one is responsible for closing 10 objects? Why is the closure > of an expect object relatively slow? > Because it allows the process to die gracefully before it kill -9s it. The graceful manner is usually to get the process to terminate itself and just be ready for that. That's usually done by closing the handle, e.g. close ($obj), or sending "exit\r" to whatever you are logged into. If the child is ready to go away hard_close will return quickly. Austin |
From: HACKATHORN, T. \(SWBT\) <th...@at...> - 2006-12-21 13:48:49
|
Austin, Thanks for the idea. I don't think screen will work for my needs based on the documentation I read about it. This system is meant to be non-interactive. A script runs and interacts with databases, and does automated screen scraping, to a 3270 terminal. Really no need for additional terminals, or a way for someone to interact with the script. Usually these scripts run many times a day, on systems that are not even logged in, I use the s3270 so it doesn't have to create a window at all. I have found that is faster that way. Dereferencing sounds like what I need to do, but I am not familiar with how to do that. Can you give any further information about the syntax of dereferencing a glob? Thanks, Todd Hackathorn Th...@at... -----Original Message----- From: Austin Schutz [mailto:te...@of...]=20 Sent: Wednesday, December 20, 2006 4:06 PM To: HACKATHORN, TODD (SWBT) Cc: exp...@li... Subject: Re: [Expectperl-discuss] Connection Manager using Expect On Wed, Dec 20, 2006 at 03:42:56PM -0600, HACKATHORN, TODD (SWBT) wrote: >=20 > I am trying to create a "connection manager" of sorts, it would keep 3 > live connections up logged in and ready to go at all times, then when my > client programs need a connection to our legacy 3270 systems, it would > be able to ask for an existing connection and start running with out the > overhead time of logging in. This sounds a lot like screen. If I were to try something like this, I would figure out how to do it manually using screen and then figure out how to interface expect with screen. > Sounds easy enough. Where I am stuck is > getting an Expect object to move from one process to another. I have > tried IPC::Sharable but it keeps giving me an error saying it can't use > a GLOB, I guess that is what a reference to the Expect object is. My > question is does anyone here know of a way I can convert this Expect > object to a reference that can be passed in this way? Or is there a way > I can export the connection as a normal file handle, and pass that > reference to the other process and init a new Expect object on a > existing connection(already logged in)? an Expect object is a glob reference. A glob is what perl uses to hold other data types, more or less. This is useful because there is no "filehandle" data type native to perl 5, so filehandles are accessed via their glob. Some things, such as print(), will automatically dereference the glob when you call them, such as 'print $expect "sending this to expect";'. Other processes don't expect a reference, so you need to dereference the glob before you pass it to the receiving sub, e.g.=20 my_print(*$expect, "print this using the dereferenced glob"); > I have though about making a client/server set up through TCP, the > server would open a connection, and do what ever is needed to keep it > alive, then the "worker processes" could send it simple request to put, > and get strings and what not. But that seems like a lot of overhead. I > already have a fair amount of overhead. I don't really want to go down > the road of writing my own 3270 emulator from scratch, the s3270 already > works well. >=20 Sounds like work. Again, I would use screen, then maybe have some aliased script which would access screen. You could have users do something like 'ssh terminalhost screenscript' for access. Or whatever makes sense. Austin |
From: Christoph S. <csc...@am...> - 2006-12-21 09:44:32
|
Hello, the tool I created using expect allows to perform shell command(s) entered on a web page on selected remote hosts as selected users. this works quite well and there is no real problem. The only issue I would like to improve is the speed with which the expect handles are closed after all commands have been executed. As sometimes a command, in parallel performed on 80 hosts take only, lets say 10s including logging in, the closure takes two minutes. The tool does: foreach my $obj (@Objects) { $obj->hard_close(); Can this be speeded up somehow? Shall I try to i.e. fork 8 children of which each one is responsible for closing 10 objects? Why is the closure of an expect object relatively slow? Thanks & Brgrds, Christoph Schwaiger |
From: Austin S. <te...@of...> - 2006-12-20 22:10:55
|
On Wed, Dec 20, 2006 at 03:42:56PM -0600, HACKATHORN, TODD (SWBT) wrote: > > I am trying to create a "connection manager" of sorts, it would keep 3 > live connections up logged in and ready to go at all times, then when my > client programs need a connection to our legacy 3270 systems, it would > be able to ask for an existing connection and start running with out the > overhead time of logging in. This sounds a lot like screen. If I were to try something like this, I would figure out how to do it manually using screen and then figure out how to interface expect with screen. > Sounds easy enough. Where I am stuck is > getting an Expect object to move from one process to another. I have > tried IPC::Sharable but it keeps giving me an error saying it can't use > a GLOB, I guess that is what a reference to the Expect object is. My > question is does anyone here know of a way I can convert this Expect > object to a reference that can be passed in this way? Or is there a way > I can export the connection as a normal file handle, and pass that > reference to the other process and init a new Expect object on a > existing connection(already logged in)? an Expect object is a glob reference. A glob is what perl uses to hold other data types, more or less. This is useful because there is no "filehandle" data type native to perl 5, so filehandles are accessed via their glob. Some things, such as print(), will automatically dereference the glob when you call them, such as 'print $expect "sending this to expect";'. Other processes don't expect a reference, so you need to dereference the glob before you pass it to the receiving sub, e.g. my_print(*$expect, "print this using the dereferenced glob"); > I have though about making a client/server set up through TCP, the > server would open a connection, and do what ever is needed to keep it > alive, then the "worker processes" could send it simple request to put, > and get strings and what not. But that seems like a lot of overhead. I > already have a fair amount of overhead. I don't really want to go down > the road of writing my own 3270 emulator from scratch, the s3270 already > works well. > Sounds like work. Again, I would use screen, then maybe have some aliased script which would access screen. You could have users do something like 'ssh terminalhost screenscript' for access. Or whatever makes sense. Austin |
From: HACKATHORN, T. \(SWBT\) <th...@at...> - 2006-12-20 21:43:11
|
Hello, I am new to this group, but have been using Expect for Perl for some time now. I am starting to think what I am trying to do is not going to work, so I thought I would ask the experts. =20 What I am doing is: I use expect for Perl in centos 4.4, and Perl 5.8.5 I have a wrapper that makes a object by spawning a s3270 process and allowing a interface like get_string($row, $col, $len), put_string($str, $row, $col) and so on.... All that has worked great for some time. =20 I am trying to create a "connection manager" of sorts, it would keep 3 live connections up logged in and ready to go at all times, then when my client programs need a connection to our legacy 3270 systems, it would be able to ask for an existing connection and start running with out the overhead time of logging in. Sounds easy enough. Where I am stuck is getting an Expect object to move from one process to another. I have tried IPC::Sharable but it keeps giving me an error saying it can't use a GLOB, I guess that is what a reference to the Expect object is. My question is does anyone here know of a way I can convert this Expect object to a reference that can be passed in this way? Or is there a way I can export the connection as a normal file handle, and pass that reference to the other process and init a new Expect object on a existing connection(already logged in)? =20 I have though about making a client/server set up through TCP, the server would open a connection, and do what ever is needed to keep it alive, then the "worker processes" could send it simple request to put, and get strings and what not. But that seems like a lot of overhead. I already have a fair amount of overhead. I don't really want to go down the road of writing my own 3270 emulator from scratch, the s3270 already works well. =20 I greatly appreciate any advice, or suggestions you can give. =20 Thanks, =20 Todd Hackathorn Th...@at... =20 |
From: Juan P. F. G. <jfe...@gm...> - 2006-12-18 16:42:51
|
Roland, Austin: Thanks for your answer, that made the trick... Another important consideration, set a decent timeout value on that expect() to allow the complete capture... |
From: Austin S. <te...@of...> - 2006-12-16 21:20:18
|
On Fri, Dec 15, 2006 at 07:51:42AM -0700, Juan Pablo Feria Gomez wrote: > those cisco's sh comands should create a log of 1400 lines, but expect > stops at line 321... > > how can i capture the entire command's output? > Expect prompts between each command you send. Austin |
From: Roland G. <rgi...@cp...> - 2006-12-16 18:02:42
|
You have to call expect() in between so the script reads back the output from the cisco. Hope this helps, Roland On 12/15/06, Juan Pablo Feria Gomez <jfe...@gm...> wrote: > Hi all, i have problems logging a session to a cisco router, i send > some show commands , but expect stops capturing to the log... > > Here is my code: > > $telnet->log_file("$host.txt", "w"); > $telnet->send_slow(0, "ter le 0\n"); > $telnet->send_slow(0, "sh ver\n"); > $telnet->send_slow(0, "sh run\n"); > $telnet->send_slow(0, "sh diag\n"); > $telnet->send_slow(0, "sh flash\n"); > $telnet->send_slow(0, "sh ip int bri\n"); > $telnet->send_slow(0, "sh interfaces\n"); > $telnet->send_slow(0, "sh ip route\n"); > $telnet->send_slow(0, "sh dial-p voice sum\n"); > $telnet->send_slow(0, "sh processes memory\n"); > $telnet->send_slow(0, "sh processes cpu\n"); > $telnet->send_slow(0, "sh processes history\n"); > $telnet->send_slow(0, "q\n"); > $telnet->send_slow(0, "\n"); > $telnet->log_file(undef); > > those cisco's sh comands should create a log of 1400 lines, but expect > stops at line 321... > > how can i capture the entire command's output? > > Thanks in advance > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > |
From: Roland G. <rgi...@cp...> - 2006-12-16 18:01:37
|
The problem is that this is extremely system-dependent, as ptys are different from OS to OS. It may be /dev/pts/3 or /dev/ptx3 or ... xterm on the other hand seems to use the BSD-style /dev/ptyp3 (taking the "p3" via -S). Unfortunately there is no way to force IO::Tty to only use the BSD-style ptys. You might be able to open the /dev/ttypX-/dev/ptypX pairs manually (like tcl does) and use them via exp_init(). A much better way (for all of us!) would be to patch xterm to take a complete path to a pty with the -S option (I'm wondering why nobody already did this) in a backward-compatible way... Sorry, I don't see an easy solution to this... Servus aus Wien! Roland On 11/21/06, N. Weuster <nor...@ar...> wrote: > hello, > > as Expect/Tcl/multixterm is not an option on my systems, I am trying to port > multixterm (spawning xterms with expect) to perl using Expect.pm. In > multixterm it looks so easy. > > At the moment I got stuck, finding the right slave parameters for xterm > "-S". > > Have anyone already tried so and could advise? > > kind regards > Norbert > > > xterm-man page: > -Sccn Specifies the last two letters of the name of a pseudoterminal to > use in slave mode, plus the number of the inherited file descriptor. The > option is parsed ``%c%c%d''. This allows the xterm command to be used as an > input and output channel for an existing program and is sometimes used in > specialized applications. > > my approaches: > $object=new Expect(); > $object->slave->stty(qw(raw -echo)); > $ptyname=$object->slave->ttyname(); > $ptyno=fileparse($ptyname); > # print "ptyname=$ptyname ptyno=$ptyno\n"; > $no2= $ptyno % 10; > $no1= ( $ptyno - $no2 ) / 10 ; > $PTYHANDLE=$object->pty_handle(); print "PTYHANDLE=$PTYHANDLE\n"; > $command="xterm"; > $fno1=fileno($object); > $fno2=fileno($object->slave()); > # print "fno1:$fno1 fno2:$fno2 \n"; > @parameter= ("-S$no1${no2}????????????"); > @stats1=stat ($object); > @stats2=stat ($object->slave()); > print "stats1:@stats1\nstats2:@stats2\n"; > $object->spawn($command, @parameter); > > > > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > > > > |
From: Juan P. F. G. <jfe...@gm...> - 2006-12-15 14:51:46
|
Hi all, i have problems logging a session to a cisco router, i send some show commands , but expect stops capturing to the log... Here is my code: $telnet->log_file("$host.txt", "w"); $telnet->send_slow(0, "ter le 0\n"); $telnet->send_slow(0, "sh ver\n"); $telnet->send_slow(0, "sh run\n"); $telnet->send_slow(0, "sh diag\n"); $telnet->send_slow(0, "sh flash\n"); $telnet->send_slow(0, "sh ip int bri\n"); $telnet->send_slow(0, "sh interfaces\n"); $telnet->send_slow(0, "sh ip route\n"); $telnet->send_slow(0, "sh dial-p voice sum\n"); $telnet->send_slow(0, "sh processes memory\n"); $telnet->send_slow(0, "sh processes cpu\n"); $telnet->send_slow(0, "sh processes history\n"); $telnet->send_slow(0, "q\n"); $telnet->send_slow(0, "\n"); $telnet->log_file(undef); those cisco's sh comands should create a log of 1400 lines, but expect stops at line 321... how can i capture the entire command's output? Thanks in advance |
From: N. W. <nor...@ar...> - 2006-11-20 23:40:02
|
hello, as Expect/Tcl/multixterm is not an option on my systems, I am trying to port multixterm (spawning xterms with expect) to perl using Expect.pm. In multixterm it looks so easy. At the moment I got stuck, finding the right slave parameters for xterm "-S". Have anyone already tried so and could advise? kind regards Norbert xterm-man page: -Sccn Specifies the last two letters of the name of a pseudoterminal to use in slave mode, plus the number of the inherited file descriptor. The option is parsed ``%c%c%d''. This allows the xterm command to be used as an input and output channel for an existing program and is sometimes used in specialized applications. my approaches: $object=new Expect(); $object->slave->stty(qw(raw -echo)); $ptyname=$object->slave->ttyname(); $ptyno=fileparse($ptyname); # print "ptyname=$ptyname ptyno=$ptyno\n"; $no2= $ptyno % 10; $no1= ( $ptyno - $no2 ) / 10 ; $PTYHANDLE=$object->pty_handle(); print "PTYHANDLE=$PTYHANDLE\n"; $command="xterm"; $fno1=fileno($object); $fno2=fileno($object->slave()); # print "fno1:$fno1 fno2:$fno2 \n"; @parameter= ("-S$no1${no2}????????????"); @stats1=stat ($object); @stats2=stat ($object->slave()); print "stats1:@stats1\nstats2:@stats2\n"; $object->spawn($command, @parameter); |
From: Loo, P. # P. <Pet...@so...> - 2006-10-05 18:29:32
|
Jdb, Sorry about that, I finally realize what you were talking about. The PARFILE. Of course, how can I have forgotten this. Thanks a lot. =20 Peter -----Original Message----- From: exp...@li... [mailto:exp...@li...] On Behalf Of Loo, Peter # PHX Sent: Thursday, October 05, 2006 8:52 AM To: Blackstone, J. David; exp...@li... Subject: Re: [Expectperl-discuss] Expect->spawn('sqlldr' The problem here is I want to hide my password from ps -ef command. I guess I am not understanding your question. =20 Peter -----Original Message----- From: Blackstone, J. David [mailto:jda...@ci...] Sent: Thursday, October 05, 2006 8:31 AM To: Loo, Peter # PHX; exp...@li... Subject: RE: [Expectperl-discuss] Expect->spawn('sqlldr' Is there a reason you need to use Expect for this? Why not create your input file and control file and then just execute sqlldr with "system"? jdb ________________________________ From: exp...@li... [mailto:exp...@li...] On Behalf Of Loo, Peter # PHX Sent: Wednesday, October 04, 2006 17:30 To: exp...@li... Subject: [Expectperl-discuss] Expect->spawn('sqlldr' =09 =09 Hello All, =20 I am attempting to use Expect to spawn "sqlldr" then feeding it the data returned from a SELECT statement. Everything appears to work except nothing is getting loaded. The reason I chose to use Expect.pm is to hide the "password" from the Unix command "ps -ef". Below is what I am trying to do. I hope you can help shed some light. =20 my $sqlldr =3D new Expect; =20 $sqlldr->spawn('sqlldr', join('@', $DBUSER, $s_dbName)) || die "Cannot spawn sqlplus: $!\n"; =20 $sqlldr->expect(30, ['control =3D ', sub { my $self =3D shift; =09 $self->send("$cntrlFile\n"); $self->expect(0, '-re', "\n"); } ] ); =09 #$self->log_stdout(0); =09 #$self->log_stdout(1); =20 $sqlldr->expect(30, ['Password:', sub { my $self =3D shift; =09 $self->send("$DBPASS\n"); $self->expect(0, '-re', "\n"); } ] ); =20 while ($row =3D $s_sth->fetchrow_arrayref()) { my $rec =3D join($delimiter, @$row); #$sqlldr->send("$rec\n") || die "ERROR: Cannot send to sqlldr: $!\n"; $sqlldr->expect(0, '', sub { my $self =3D shift; $self->send("$rec\n"); } ); } =20 Thanks. =20 Peter This E-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply E-mail, and destroy all copies of the original message. ------------------------------------------------------------------------ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDE V _______________________________________________ Expectperl-discuss mailing list Exp...@li... https://lists.sourceforge.net/lists/listinfo/expectperl-discuss This E-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply E-mail, and destroy all copies of the original message. |
From: Loo, P. # P. <Pet...@so...> - 2006-10-05 15:51:51
|
The problem here is I want to hide my password from ps -ef command. I guess I am not understanding your question. =20 Peter -----Original Message----- From: Blackstone, J. David [mailto:jda...@ci...]=20 Sent: Thursday, October 05, 2006 8:31 AM To: Loo, Peter # PHX; exp...@li... Subject: RE: [Expectperl-discuss] Expect->spawn('sqlldr' Is there a reason you need to use Expect for this? Why not create your input file and control file and then just execute sqlldr with "system"? jdb ________________________________ From: exp...@li... [mailto:exp...@li...] On Behalf Of Loo, Peter # PHX Sent: Wednesday, October 04, 2006 17:30 To: exp...@li... Subject: [Expectperl-discuss] Expect->spawn('sqlldr' =09 =09 Hello All, =20 I am attempting to use Expect to spawn "sqlldr" then feeding it the data returned from a SELECT statement. Everything appears to work except nothing is getting loaded. The reason I chose to use Expect.pm is to hide the "password" from the Unix command "ps -ef". Below is what I am trying to do. I hope you can help shed some light. =20 my $sqlldr =3D new Expect; =20 $sqlldr->spawn('sqlldr', join('@', $DBUSER, $s_dbName)) || die "Cannot spawn sqlplus: $!\n"; =20 $sqlldr->expect(30, ['control =3D ', sub { my $self =3D shift; =09 $self->send("$cntrlFile\n"); $self->expect(0, '-re', "\n"); } ] ); =09 #$self->log_stdout(0); =09 #$self->log_stdout(1); =20 $sqlldr->expect(30, ['Password:', sub { my $self =3D shift; =09 $self->send("$DBPASS\n"); $self->expect(0, '-re', "\n"); } ] ); =20 while ($row =3D $s_sth->fetchrow_arrayref()) { my $rec =3D join($delimiter, @$row); #$sqlldr->send("$rec\n") || die "ERROR: Cannot send to sqlldr: $!\n"; $sqlldr->expect(0, '', sub { my $self =3D shift; $self->send("$rec\n"); } ); } =20 Thanks. =20 Peter This E-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply E-mail, and destroy all copies of the original message. |
From: Loo, P. # P. <Pet...@so...> - 2006-10-04 17:30:12
|
Hello All, =20 I am attempting to use Expect to spawn "sqlldr" then feeding it the data returned from a SELECT statement. Everything appears to work except nothing is getting loaded. The reason I chose to use Expect.pm is to hide the "password" from the Unix command "ps -ef". Below is what I am trying to do. I hope you can help shed some light. =20 my $sqlldr =3D new Expect; =20 $sqlldr->spawn('sqlldr', join('@', $DBUSER, $s_dbName)) || die "Cannot spawn sqlplus: $!\n"; =20 $sqlldr->expect(30, ['control =3D ', sub { my $self =3D shift; $self->send("$cntrlFile\n"); $self->expect(0, '-re', "\n"); } ] ); #$self->log_stdout(0); #$self->log_stdout(1); =20 $sqlldr->expect(30, ['Password:', sub { my $self =3D shift; $self->send("$DBPASS\n"); $self->expect(0, '-re', "\n"); } ] ); =20 while ($row =3D $s_sth->fetchrow_arrayref()) { my $rec =3D join($delimiter, @$row); #$sqlldr->send("$rec\n") || die "ERROR: Cannot send to sqlldr: $!\n"; $sqlldr->expect(0, '', sub { my $self =3D shift; $self->send("$rec\n"); } ); } =20 Thanks. =20 Peter |
From: kim M <km...@gm...> - 2006-10-04 09:48:11
|
Hi I am a newbie to expect, but have used perl for basic hacking for some years. Now I've decided to use the expect module for handling download of software to an embedded target over a serial link. I want to relay progress to the user, and I want to do this in fine grained intervals. It seems the easiest way to do this would be to count the number of chars received. Of cause I want this to happen in the background while I have expect statement blocking for a match. How do I extract the number of received chars from the Expect module? BTW: is this maillist available online or even better through gmane.org? thanks! KimM |