parallel execution of multiple system commands on a single unix host from windows

2013-07-01T16:47:07

I need to execute multiple system commands in parallel on a remote unix machine(only through ssh) from my windows machine.
I have used paramiko module to do the ssh to the remote machine. In the same script, I have used python subprocess module to fire the commands in parallel on the remote machine.
But I am unable to do it . Could anyone please let me know how to achieve this scenario using subprocess module? or any other way to look into the problem?

My line of code where it is not working is : processes.append(Popen(task,shell=True)) ----> task is getting executed on my own windows machine and not getting executed on the remote unix machine. it gives me a error an windows error. Also I don't know whether my subprocess code will work for achieving parallel runs here.

But I am successful in achieving parallel runs with the same piece of code using subprocess module if I copy the code to the unix machine and run the script locally.
Problem comes when I am executing the code from the windows machine and doing ssh to the remote machine.

Copyright License:
Author:「user2538252」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/17400473/parallel-execution-of-multiple-system-commands-on-a-single-unix-host-from-window

About “parallel execution of multiple system commands on a single unix host from windows” questions

I need to execute multiple system commands in parallel on a remote unix machine(only through ssh) from my windows machine. I have used paramiko module to do the ssh to the remote machine. In the same
I have a below script which i'm using to execute commands on remote hosts as a cetralized user, but this script is reads the host file and execute the command one by one however it also remains on ...
I have SSH connection created like: ssh -MNf -S /tmp/mysocket user@host And I'm using ssh without password for this session. I want to run multiple parallel commands (for example: 500 parallel co...
I have a management script that we'll call mngcntl.sh. This script can take up to 5 seconds to run. It is located at x different places on each server. I want to execute this script it in para...
In Unix, we can put multiple commands in a single line like this: $ date ; ls -l ; date I tried a similar thing in Windows: > echo %TIME% ; dir ; echo %TIME But it printed the time and does...
I want to ask about command-line commands execution in Kernel.php. I have multiple commands scheduled to run every 15 minutes. Some of these commands take 5-8 minutes to process (fetching and ana...
Is it possible to use sed and awk kind of commands in python that works on windows operating system? For Unix operating system we can import os package and use os.system to perform any unix operati...
I am using ssh exec ant task in my script for executing some commands in unix system(change permission,etc) i am executing these scripts from a distributed system. After the execution of the scrip...
In the answer to this question a guy said that "a single core CPU can allow only parallel execution" "So a multi-core CPU allows not only parallel but also concurrent execution of processes. On ...
Can I run unix commands in a windows server container docker for windows? I tried Cygwin tools installed in my host (Windows) in the docker but that doesn't work. --Perhaps the cygwin binaries are...

Copyright License:Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.