how to parallelize ssh operation?
Hi All,
I have a script which runs from local site and use ssh to connect to 10 remote servers to execute same script which ofcourse is available in remote servers. The script which i run at remote site takes 20 mins to get complete so my script execution time is 20 * 10 = 200 mins. I'm thinking about running "SSH" operation in background like below, but it throws an error. nohup ssh remoteserver script-name & error:- [1] + Stopped (SIGTTIN) ./script-name & Is there any way we can parallelize the ssh operation so that i can finish off my script in 10 mins? |
I think you can get rid of the nohup. Just the & at the end of the line should start the processes in the background. If you want to wait for all processes to finish just put a line below that says "wait" without the quotes.
Code:
ssh remoteserver1 script-name & From Wikipedia: Code:
SIGTTIN and SIGTTOU |
Thanks. I have got a way to do it. I need to use -n option to redirect standard input to /dev/null.
|
Quote:
|
This problem has been solved with utilities like 'pssh' and 'mussh'.
|
Quote:
|
All times are GMT -5. The time now is 08:09 PM. |