spinoff of -- untethered child process [on unix w/special parameters]
I need to do the same on solaris but pass separate sets of parameters (ultimately quoted properly) one of which is a serialized var created using data dumper. $taskserialized looks like this $VAR1 = { 'TASKID' => '15459', 'RUNONCE' => 'yes', 'SERVER' => 'LOCALHOST', 'TASK' => 'CHECKCM', }; so something like system("perl", "tasker.pl", "$taskserialized"); but this call also needs to fork to the background Using & as 4th parameter does not produce the desired results and passing one parameter system("perl tasker.pl $taskserialized &") does not pass $taskserialized properly TIA for assistance. ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Net::SSH2::Channel-exec, grabbing stdout
$Bill :) Are you using the http://theoryx5.uwinnipeg.ca/ppms/ repo, Net::SSH2 0.09 version? I'm guessing the libssh2 dependency is satisfied in perhaps the SSH2.dll? At least I hope things get installed correctly via ppm. Anyway, I've tried several valid commands such as '/bin/df -k', 'ls', and your suggestions with no success on retrieving output. I've also tried the suggestions at http://www.perlmonks.org/?node_id=621761 which lean towards using shell() with no luck. Bill Luebkert wrote: listmail wrote: I've just started testing Net::SSH2 in hopes to eventually replace Net::SSH[::W32Perl]. I am having trouble retrieving the stdout data from channel-exec. I do not require an interactive shell, just an ability to execute commands and retrieve the stdout + statuses. Is there something I am missing or do I need to do something different altogether? my $chan = $ssh2-channel(); $chan-blocking(0); my $returnval = $chan-exec('who') or die Couldn't exec 'who'\n; Try several other commands besides who - like 'ls -lF' for eg. Or try 'who --help' and see if that generates usage text. Also try dropping the non-blocking. ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
[Fwd: Re: Net::SSH2::Channel-exec, grabbing stdout]
I just tested against a remote linux server and it worked. I'll have to address this on the Solaris 10 server(s), probably the custom rolled sshd installation/config. Thanks for the assist. Original Message Subject:Re: Net::SSH2::Channel-exec, grabbing stdout Date: Wed, 18 Jun 2008 09:12:10 -0400 From: listmail [EMAIL PROTECTED] To: Bill Luebkert [EMAIL PROTECTED] CC: activeperl@listserv.activestate.com References: [EMAIL PROTECTED] [EMAIL PROTECTED] $Bill :) Are you using the http://theoryx5.uwinnipeg.ca/ppms/ repo, Net::SSH2 0.09 version? I'm guessing the libssh2 dependency is satisfied in perhaps the SSH2.dll? At least I hope things get installed correctly via ppm. Anyway, I've tried several valid commands such as '/bin/df -k', 'ls', and your suggestions with no success on retrieving output. I've also tried the suggestions at http://www.perlmonks.org/?node_id=621761 which lean towards using shell() with no luck. Bill Luebkert wrote: listmail wrote: I've just started testing Net::SSH2 in hopes to eventually replace Net::SSH[::W32Perl]. I am having trouble retrieving the stdout data from channel-exec. I do not require an interactive shell, just an ability to execute commands and retrieve the stdout + statuses. Is there something I am missing or do I need to do something different altogether? my $chan = $ssh2-channel(); $chan-blocking(0); my $returnval = $chan-exec('who') or die Couldn't exec 'who'\n; Try several other commands besides who - like 'ls -lF' for eg. Or try 'who --help' and see if that generates usage text. Also try dropping the non-blocking. ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: [Fwd: Net::SSH::W32perl /Net:SSH::Perl on activeperl win32]
Jenda Krynicky wrote: From: Michael Ellery [EMAIL PROTECTED] I've been trying to use Net::SFTP recently, without luck. When I try to execute a simple fetch with code like: use strict; use Net::SFTP; my $scp = new Net::SFTP( 'SOMEHOST', user = 'SOMEUSER', password = 'SOMEPASS', ) or die Unable to create host connection; my @list = $scp-ls('/tmp'); print HERE IS /tmp\n:; map {print \t$_\n;} @list; my $stat = $scp-get('/tmp/InstalledDB', 'c:/s2/InstalledDB'); print get status is $stat\n; ...I get the error: The getpwuid function is unimplemented at C:/Perl/site/lib/Net/SSH/Perl.pm line 110. Net::SSH2 works fine for me under Windows. Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs This doesn't show up in 5.8.820 repo is there another repo that has it or did you build libssh2 and its dependancies manually. I don't usually build on Windows so I'm not sure what to do about the ./configure part. Thanks. ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Net::SSH2::Channel-exec, grabbing stdout
I've just started testing Net::SSH2 in hopes to eventually replace Net::SSH[::W32Perl]. I am having trouble retrieving the stdout data from channel-exec. I do not require an interactive shell, just an ability to execute commands and retrieve the stdout + statuses. Is there something I am missing or do I need to do something different altogether? : borrowed code from: http://www.nntp.perl.org/group/perl.beginners/2008/04/msg99926.html #!/usr/bin/perl -w use strict; use warnings; use Net::SSH2; #-- my $server='server'; my $user='user'; my $passwd='password'; #-- my $ssh2 = Net::SSH2-new(); $ssh2-debug(1); print Connecting to $server...\n; $ssh2-connect($server) or die 'connect problem'; if( $ssh2-auth_password($user, $passwd)) { my $chan = $ssh2-channel(); $chan-blocking(0); my $returnval = $chan-exec('who') or die Couldn't exec 'who'\n; my($len, $buff); while($len = $chan-read($buff, 1024)) { print $buff; } $chan-close; } else { print Invalid username or password $!\n; } sub usage { die usage: $0 -s server -p passwd\n; } #The following is the output, word for word: Connecting to server... libssh2_channel_open_ex(ss-session, pv_channel_type, len_channel_type, window_size, packet_size, ((void *)0) , 0 ) - 0x22e0130 Net::SSH2::Channel::read(size = 1024, ext = 0) - read 0 bytes - read 0 total Net::SSH2::Channel::DESTROY Net::SSH2::DESTROY object 0x206185c ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
[Fwd: Net::SSH::W32perl /Net:SSH::Perl on activeperl win32]
Just an update. Some debugging that I've done shown that my ssh connection was actually hung and looping between $ssh-client_loop and $ssh-drain_outgoing and never exiting . My assumption was wrong with how things had been fixed up. I seen many Google hits on this problem and allot of the fixes were older and stating to use the soulcage repo! After many hours I made a copy of my working installations' site/lib/Net/SSH folder and pasted into a fresh perl install and then installed the Crypt modules and other dependencies from uwinnipeg.ca. Not the most ideal solution, but performance is good. If I don't get any solution for the existing packages I'll probably end up doing diffs on the files between two site folders and see if I can create a fix. Original Message Subject:Net::SSH::W32perl /Net:SSH::Perl on activeperl win32 Date: Fri, 13 Jun 2008 00:59:29 -0500 From: listmail [EMAIL PROTECTED] To: activeperl@listserv.ActiveState.com I've been using Net::SSH::W32perl 0.06 originally provided by a repo on http://www.soulcage.net/ (Scott Scecina) for a few years now. And my install still works great. Unfortunately this site is down and I can no longer find that specific version and dependencies. I believe Scott had hacked some parts of that package or any of its dependencies so as to make it work without Math::BigInt::GMP but not falling back to the slowest math libs. Without fast math routines using Net::SSH::Perl is incredibly slow (10 minutes or more to connect). A couple years back I solved this problem on Solaris by building against libgmp, but I haven't created a working solution on Windows using a clean development machine. This concerns me since I have applications in production which rely on the continue development and availability of this functionality.I've been testing the packages provided at http://theory.uwinnipeg.ca/ppms/ with no luck on the performance issue so far. I will be testing against Net::SSH:Perl v1.23 (instead of 1.30) next. If anyone has any tips or suggestions, I would appreciate it. ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Net::SSH::W32perl /Net:SSH::Perl on activeperl win32
I've been using Net::SSH::W32perl 0.06 originally provided by a repo on http://www.soulcage.net/ (Scott Scecina) for a few years now. And my install still works great. Unfortunately this site is down and I can no longer find that specific version and dependencies. I believe Scott had hacked some parts of that package or any of its dependencies so as to make it work without Math::BigInt::GMP but not falling back to the slowest math libs. Without fast math routines using Net::SSH::Perl is incredibly slow (10 minutes or more to connect). A couple years back I solved this problem on Solaris by building against libgmp, but I haven't created a working solution on Windows using a clean development machine. This concerns me since I have applications in production which rely on the continue development and availability of this functionality.I've been testing the packages provided at http://theory.uwinnipeg.ca/ppms/ with no luck on the performance issue so far. I will be testing against Net::SSH:Perl v1.23 (instead of 1.30) next. If anyone has any tips or suggestions, I would appreciate it. ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: ActiveState releases ActivePerl 5.8.8.822
http://aspn.activestate.com/ASPN/docs/ActivePerl/5.8/install.html#upgrade_58 If your |site\lib| has been created with ActivePerl 817 or earlier, then you need to completely remove the whole directory tree, do a clean installation, and reinstall your modules with PPM. This is necessary because in ActivePerl 818 the order of |lib| and |site\lib| in | @INC| has been reversed, and all bundled modules now reside in the |lib| directory. Having older versions of these bundled modules in |site\lib| at the front of |@INC| results in a broken installation. I've ran 817 for the longest and it is nice to run across a note like this in which I can keep in mind I upgrade 8.22. Alternatively, you can use *PPM-Profile* to help save and restore your locally installed PPM packages. Is this an applicable option to 817 and earlier? More preferably can anyone share any experience(s) with rebuilding a large perl install from 817 (or earlier) using this method? Jan Dubois wrote: ActiveState is pleased to announce ActivePerl 5.8.8.822, a maintenance release of the complete, ready-to-install Perl distribution for Windows, Mac OS X, Linux, Solaris, AIX and HP-UX. For detailed information or to download ActivePerl, see: http://www.activestate.com/products/activeperl/ == New in ActivePerl 5.8.8.822 == Maintenance release with updates including: * Several hundred updates and bug fixes from the core Perl repository * Bundled modules updated to the latest released versions * Enhanced support for MinGW * Improved Windows installers Download ActivePerl 5.8.8.822 now: http://www.activestate.com/store/activeperl === Getting Started === Whether you're a first-time user or a long-time fan, our free resources will help you get the most from ActivePerl. User forums and FAQs: http://community.activestate.com/products/ActivePerl Mailing list archives: http://aspn.activestate.com/ASPN/Mail/?topic=Perl Documentation: http://aspn.activestate.com/ASPN/docs/ActivePerl === Feedback === Everyone is encouraged to participate in making Perl an even better language. For bugs related to the ActivePerl, please use: http://bugs.ActiveState.com/ActivePerl ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs