diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2021-08-21 17:43:32 +0200 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2021-08-21 17:43:32 +0200 |
| commit | 5808757a6cd091ede4a3633c0f175d2a412b0c23 (patch) | |
| tree | 6e784bdf97d35a2d9eb305ba801f119fc65a16f0 /README.md | |
Create repo
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..3f921c2 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# pool.sh a simple processes pool management + +**What is pool.sh ?** pool.sh allows you to create simple pools of processes. This is usefull to run several process in parallel such as simulations. It is design to be used in bash scripts. + +**How it works ?** +- Create a pool with `./pool.sh create <poolname> <capacity>` +- Launch a process in a pool with `./pool.sh run <poolname> <command>` which return the process id `<procid>` If the pool `<poolname>` is full (number of processes equals to `<capacity>`) pool.sh will wait until room has been made in the pool to run `<command>`. +- Get the output of a process with `./pool.sh cat <poolname> <procid>` +- Wait until all the processes are completed with `./pool.sh wait <poolname>` +- Remove a pool with `./pool.sh remove <poolname>` if there is still processes running this call will fail. +- Force the removal of a pool with `./pool.sh remove-force <poolname>` all running processes will be killed and the pool will be deleted +- Additional properties can be attach to processes with `./pool.sh setp <poolname> <procid> <propname> <propvalue>` Defaults properties are `<cmd>`,`<procpid>`,`<startat>`. +- Properties can be retrieve with `./pool.sh getp <poolname> <procid> <propname>` +- Finally, all the processes output file can be retrieve with `./pool.sh ls <poolname>` + +**Finale quote:** No checks are performed on the pool.sh arguments. Be sure to use the right ones. |
