bug-parallel
[Top][All Lists]
Advanced

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

Re: GNU Parallel Bug Reports --ssh 'autossh' not working and --ssh 'auto


From: Marco Tamassia
Subject: Re: GNU Parallel Bug Reports --ssh 'autossh' not working and --ssh 'autossh -M {PORT} not expanded
Date: Wed, 23 Sep 2015 22:07:14 +1000

Ok, that was a bit of a silly example, sorry.
The thing is, I have some sets parameters that I want to be executed in parallel, remotely, using autossh to keep the connection up instead of ssh. To have autossh working, every monitoring connection need to use a different port. So the command would look like this:
parallel --xapply --header : --ssh 'autossh -M '{PORT} -sshlogin "HOST1,HOST2,HOST3" ./my_software {PARAM_A} {PARAM_B} {PARAM_C} ::: PORT `seq 1 64` ::: PARAM_A 1 2 5 10 ::: PARAM_B 0.1 0.2 0.5 1 ::: PARAM_C alg1 alg2 alg3 alg4
The parameter PORT is not something that I would use with my software, but is still something that I need to be different for each call and I don't see any other way of achieving this.


On 23 September 2015 at 19:16, Andreas Bernauer <address@hidden> wrote:
On 23/09/15 10:53, Marco Tamassia wrote:
> My use case is tightly related to how autossh operates.
> In autossh you specify a port that the software uses for monitoring the
> ssh connection (I don't know the internals).
> Since I am going to have more than one connection, I need to specify
> different numbers for each remote call.
> For example, normally you would do autossh -M 20000 HOST sleep 60, but
> if you wanted to have other parallel calls to the same host you would
> probably to call them autossh -M 20001HOST sleep 60, autossh -M
> 20002HOST sleep 60, ...
> My idea was to call parallel as follows:
> echo 20000 20001 20002 | parallel --ssh 'autossh -M '{} --sshlogin HOST
> sleep 60

I still don't understand: you are not using '{}' in the command.

Shouldn't your example be

echo 20000 20001 20002 | parallel autossh -M {} HOST sleep 60

?

-Andreas



--
Marco Tamassia

reply via email to

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