aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md16
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.