Parallel::ForkManager and Net::OpenSSH to handle timeout

2012-10-15 Thread Rajeev Prasad
I am using Parallel::ForkManager to run multiple ssh sessions on various remote hosts. It is working fine. Sometimes I have a problem: problem is in Net::OpenSSH module that, for whatever reason, when far end does not respond the module does not close the SSH connection (i.e. timeout is not

Re: updating variable in Parent using Parallel::ForkManager

2012-08-01 Thread Dr.Ruud
On 2012-07-30 15:47, punit jain wrote: my $pm = new Parallel::ForkManager(10); my $count=0; foreach my $user (@users) { $pm->start($user) and next; my $result; --- do some processing --- $pm->finish(0, \$result); }

Re: updating variable in Parent using Parallel::ForkManager

2012-07-30 Thread John W. Krahn
punit jain wrote: Hi, Hello, I am facing an issue. Below is code snippet : - my $pm = new Parallel::ForkManager(10); my $count=0; foreach my $user (@users) { $pm->start($user) and next; my $result; --- do some process

Re: updating variable in Parent using Parallel::ForkManager

2012-07-30 Thread Shlomi Fish
Hi Punit, On Mon, 30 Jul 2012 19:17:21 +0530 punit jain wrote: > Hi, > > > I am facing an issue. Below is code snippet : - > It is a good idea to include a self-contained reproducing code that will demonstrate the problem - not incomplete snippets. > my $pm = new Parall

updating variable in Parent using Parallel::ForkManager

2012-07-30 Thread punit jain
Hi, I am facing an issue. Below is code snippet : - my $pm = new Parallel::ForkManager(10); my $count=0; foreach my $user (@users) { $pm->start($user) and next; my $result; --- do some processing --- $pm->finish(0, \$

Re: Query regarding Parallel::ForkManager

2012-03-30 Thread Dr.Ruud
On 2012-03-30 11:14, punit jain wrote: my $file = "/tmp/test"; die "\n Killed as filed doesnot exist \n" if(-e $file); It looks like you have to reverse your test. -e $file or die "[$$] exit early because '$file' doesn't exist\n"; But why even start a child, if its d

Query regarding Parallel::ForkManager

2012-03-30 Thread punit jain
Hi , I am using ForkManager module for multiprocessing in my code below : - use Parallel::ForkManager; $pm = new Parallel::ForkManager($MAX_PROCESSES); foreach $data (@all_data) { # Forks and returns the pid for the child: my $pid = $pm->start and next; ... do some work w

parallel::forkmanager queue implentation in perl

2010-08-06 Thread Ramprasad Prasad
Hello , I have process that picks up multiple files from a directory forks child processes and each child process works on a batch of files and finishes the task I am thinking of this Parent process finds all files in jobs directory , divide tasks into $MAXCHILD processes but not exceeding $MAXBAT

Re: Parallel::ForkManager

2002-01-07 Thread Randal L. Schwartz
>>>>> "James" == James Lucero <[EMAIL PROTECTED]> writes: James> Has anyone successfully used the Parallel::ForkManager James> to download web pages consistently? My series of "Link Checkers" in my columns have had that problem as well. The most r

Parallel::ForkManager

2002-01-07 Thread James Lucero
Has anyone successfully used the Parallel::ForkManager to download web pages consistently? Ultimately I need to download hundreds/thousands of pages more efficiently. I am having two primary problems, 1) its not very fast for me (although in testing I am only using 3 or 4 urls so far, I can