[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dynamically changing remote servers list
From: |
Douglas A. Augusto |
Subject: |
Re: Dynamically changing remote servers list |
Date: |
Sat, 13 Sep 2014 23:49:37 -0300 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On 27/08/2014 at 08:38,
Ole Tange <ole@tange.dk> wrote:
> Or even:
>
> parallel_with_daemon --slf original.slf [... other parallel options ...]
Hi,
I've implemented a portable shell script that does that, please check it out:
https://github.com/daaugusto/gnuparallel
Its syntax is:
parallel-update_slf.sh --slf <file> [--sleep <n>] [--timeout <n[%]>] -- [...
GNU Parallel's command options ...]
For example:
seq 0 10 100 | parallel-update_slf.sh --slf original.slf -- 'sleep {}; echo
$(hostname) ran sleep for {}s'
> How is cleanup done? How is cleanup done if the user presses Ctrl-C?
The cleanup is implemented through 'traps' and works on either normal
termination (EXIT) or when the user presses Ctrl-C (INT).
> What happens if the users run multiple instances? With different original.slf?
I made sure that each instance has unique temporary files, so I believe there
is no problem running multiple instances.
Feel free to suggest improvements and to distribute the script along with GNU
Parallel if you would like to.
--
Douglas A. Augusto