parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help on remote ssh cmd


From: Ole Tange
Subject: Re: help on remote ssh cmd
Date: Tue, 9 Jul 2013 19:28:21 +0200

On Tue, Jul 9, 2013 at 5:58 AM, p sena <senapati2001@yahoo.com> wrote:

> Seemed both the commands didn't worked ? But the way I showed you it worked
> ( parallel -j 1 --basefile some-file-2-copy  -S H1,H2 ::: "hostname &&
> /home/username/that-file-copied" "hostname &&
> /home/username/that-file-copied") , is that way Ok, is it doing the things
> parallel ?

-j1 forces to run one job per host.

While the above will probably run  "hostname &&
/home/username/that-file-copied" on both, that is not necessarily true
if you have many hosts: If the command finishes on H1 before GNU
Parallel gets the command started on H100, then GNU Parallel may start
it on H1 instead.

So what you are doing does not scale and may cause problems.

This guarantees what you want:

cat hosts.txt | parallel -j10 rsync -Hav
/home/username/that-file-copied {}:/home/username/that-file-copied \;
ssh {} hostname \\\&\\\& /home/username/that-file-copied


/Ole



reply via email to

[Prev in Thread] Current Thread [Next in Thread]