lockersh - Run a command under a global lock
lockersh [--dhost <host> --port <port>] --lock <name> [args....]
Obtain a global IPC::Locker lock with the passed name.
When the lock is granted, run the arguments as a command in the foreground. When the foreground process exits, release the lock, and return the executed command's exit status.
This makes it very easy to insure only one copy of a program executes across a clump:
lockersh --lock one_sleep_runs sleep 10
Hostname of lockerd server. Defaults to IPCLOCKER_HOST environment variable.
Displays this message and program version and exits.
Name for the lock. This argument may be passed multiple times or with a colon separator to allow one of multiple possible locks to be selected.
Suppress normal operation, and instead print a list of all outstanding locks and their owners.
Port of pidstatd server on remote host. Defaults IPCLOCKER_PORT environment variable.
Set number of seconds before wait for license will timeout. Defaults to wait forever.
Print 'waiting for lock' and similar messages.
Displays program version and exits.
Hostname of lockerd server, or colon separated list including backup servers. Defaults to localhost.
Port number of lockerd server. Defaults to 1751.
The latest version is available from CPAN and from http://www.veripool.org/.
Copyright 2006-2017 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
Wilson Snyder <email@example.com>