How to run scripts in parallel on a remote machine?

Tom

I can ssh into a remote machine that has 64 cores. Lets say I need to run 640 shell scripts in parallel on this machine. How do I do this?

I can see splitting the 640 scripts into 64 groups each of 10 scripts. How would I then run each of these groups in parallel, i.e. one group on each of one of the available cores.

Would a script of the form

    ./script_A &
    ./script_B &
    ./script_C &
    ...

where script_A corresponds to the first group, script_B to the second group etc., suffice?

The scripts within one group that run on one core are ok to run sequentially, but I want the groups to run in parallel across all cores.

Dmitry Grigoryev

This looks like a job for gnu parallel:

parallel bash -c ::: script_*

The advantage is that you don't have to group your scripts by cores, parallel will do that for you.

Of course, if you don't want to babysit the SSH session while the scripts are running, you should use nohup or screen

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to run programs and scripts NOT in the background on a remote machine?

From Dev

Parallel Python scripts on a remote machine

From Dev

Coded UI - How to make each remote system with a test agent run all the Test Scripts in parallel

From Dev

How to allow jenkins from local machine to run remote python test scripts

From Dev

How to run multiple shell scripts in parallel?

From Dev

how to run complex awk command on remote machine

From Dev

How to run appium script in remote machine?

From Dev

How to run a complex awk script on a remote machine?

From Dev

how to run script on remote machine with delay

From Dev

How to run parallel python scripts from java using the ProcessBuilder

From Java

How can I run multiple npm scripts in parallel?

From Dev

How to run parallel python scripts from java using the ProcessBuilder

From Dev

Run thousands of simple scripts in parallel

From Dev

Run code on remote machine

From Dev

How to run VMware commands from remote scripts on windows

From Dev

How can I run Protractor tests on a remote machine

From Dev

How to run CUDA/OpenGL interop (particle) sample from a remote machine

From Dev

With ssh, how can you run a command on the remote machine without exiting?

From Dev

How to run Get-ChildItem command on a remote machine

From Dev

Running QTP Scripts on a Remote Machine (Windows 7)

From Dev

linux + run script on remote machine

From Dev

Run a Selenium script on a remote machine

From Dev

Gulp: Run multiple node scripts in parallel

From Dev

Run bash scripts in parallel from python script

From Dev

Run two scripts in separate directories, in parallel, and in foreground

From Dev

How do I run MATLAB scripts in parallel (i.e. on multiple cores and without using parfor)?

From Dev

How to run many PHP scripts parallel and redirect output of each script to a file?

From Dev

How do I run MATLAB scripts in parallel (i.e. on multiple cores and without using parfor)?

From Dev

Physical button to run scripts on a Windows machine

Related Related

  1. 1

    How to run programs and scripts NOT in the background on a remote machine?

  2. 2

    Parallel Python scripts on a remote machine

  3. 3

    Coded UI - How to make each remote system with a test agent run all the Test Scripts in parallel

  4. 4

    How to allow jenkins from local machine to run remote python test scripts

  5. 5

    How to run multiple shell scripts in parallel?

  6. 6

    how to run complex awk command on remote machine

  7. 7

    How to run appium script in remote machine?

  8. 8

    How to run a complex awk script on a remote machine?

  9. 9

    how to run script on remote machine with delay

  10. 10

    How to run parallel python scripts from java using the ProcessBuilder

  11. 11

    How can I run multiple npm scripts in parallel?

  12. 12

    How to run parallel python scripts from java using the ProcessBuilder

  13. 13

    Run thousands of simple scripts in parallel

  14. 14

    Run code on remote machine

  15. 15

    How to run VMware commands from remote scripts on windows

  16. 16

    How can I run Protractor tests on a remote machine

  17. 17

    How to run CUDA/OpenGL interop (particle) sample from a remote machine

  18. 18

    With ssh, how can you run a command on the remote machine without exiting?

  19. 19

    How to run Get-ChildItem command on a remote machine

  20. 20

    Running QTP Scripts on a Remote Machine (Windows 7)

  21. 21

    linux + run script on remote machine

  22. 22

    Run a Selenium script on a remote machine

  23. 23

    Gulp: Run multiple node scripts in parallel

  24. 24

    Run bash scripts in parallel from python script

  25. 25

    Run two scripts in separate directories, in parallel, and in foreground

  26. 26

    How do I run MATLAB scripts in parallel (i.e. on multiple cores and without using parfor)?

  27. 27

    How to run many PHP scripts parallel and redirect output of each script to a file?

  28. 28

    How do I run MATLAB scripts in parallel (i.e. on multiple cores and without using parfor)?

  29. 29

    Physical button to run scripts on a Windows machine

HotTag

Archive