Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prabdeb/parallelshellexecution
For executing any Linux Commands in Parallel - A Docker/Perl based setup
https://github.com/prabdeb/parallelshellexecution
command-line concurrency multitasking parallel perl shell
Last synced: 8 days ago
JSON representation
For executing any Linux Commands in Parallel - A Docker/Perl based setup
- Host: GitHub
- URL: https://github.com/prabdeb/parallelshellexecution
- Owner: prabdeb
- Created: 2017-11-10T19:23:21.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-06T05:59:08.000Z (over 6 years ago)
- Last Synced: 2024-11-18T20:58:28.025Z (2 months ago)
- Topics: command-line, concurrency, multitasking, parallel, perl, shell
- Language: Perl
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Parallel Shell Execution
For executing any Linux Commands in Parallel with proper log management and error handling - A Perl based setup
## How to use
This utility can be placed in any location in a linux box and can be executed from there.
```sh
$ git clone https://github.com/prabdeb/ParallelShellExecution.git
$ cd ParallelShellExecution
$ ./parallel.plUSAGE: ./parallel.pl -l [Log Directory] -f [File Containing All Commands] -c [Commands Seprated by (,)]
-l : Log Directory where all logs will be dumped, default $(pwd)
-f : File Containing All Commands, separated by new line,
to provide unique log file name to command, appaned -> commandLogFileName end of each command,
else it will create the log with command sequence number
-c : Provide all the commands separated by (,) useful in case of few small commands
-m : Maximum Number of Process, which should be executed parallel, default and highest: 5
-t : Specify Timeout in second, example 1800 for 30 Mintues, default: 0 (means no timeout)
```## Use with Docker
To execute as docker container, follow -
```sh
$ docker pull prabdeb/parallel
$ docker run prabdeb/parallel -c 'echo "I am command 1",echo "I am command 2"'20180806 10:54:42 - Starting Parallel Execution of Commands below with Maximum Parallel Process of 5 -
20180806 10:54:42 - echo "I am command 1"
20180806 10:54:42 - echo "I am command 2"
20180806 10:54:42 - =================== START EXECUTION =======================
20180806 10:54:42 - Executing echo "I am command 1"
20180806 10:54:42 - Executing echo "I am command 2"
20180806 10:54:42 - I am command 1
20180806 10:54:42 - I am command 2
20180806 10:54:42 - Successfully executed echo "I am command 1"
20180806 10:54:42 - Successfully executed echo "I am command 2"
20180806 10:54:42 - -
20180806 10:54:42 - -
20180806 10:54:42 - =================== FAILURE SUMMARY =======================
20180806 10:54:42 - =================== EXIT DICISSION ========================
20180806 10:54:42 - Successfully executed All the Commands
```