Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time


IPC::Locker provides a server for locks and a Perl package for clients to access that server. The result is that clients can access named locks on a Internet wide basis, solving critical section problems without the mess of NFS or other file locking techniques.

The latest version is available from CPAN and from


use IPC::Locker;
# ...
my $lock = IPC::Locker->lock(host=>'');
# ... Critical section ...


Build and Install the Package

Install from CPAN:

cpan install IPC::Locker

Or, build from sources:

# Obtain distribution kit
git clone
# Build
cd IPC-Locker
git pull
perl Makefile.PL
make test
make install

Install the Daemons

You may wish to install lockerd and pidstatd in a init.rc file so that it is run at system startup. Depending on your distribution, you may be able to just:

cp init.d/lockerd   /etc/init.d/lockerd  # On one server only
cp init.d/pidstatd  /etc/init.d/pidstatd  # On all machines

Edit paths in above to point to /usr/bin instead of /usr/local/bin, if needed.

service lockerd start  # On one server only
service pidstatd start  # On all machines
chkconfig lockerd on  # On one server only
chkconfig pidstatd on  # On all machines

If you get "This account is currently not available." you need to change the daemon account from a shell of /sbin/nologin to /sbin/bash.


If you are using Nagios, sample scripts to check the daemons are included in the nagios subdirectory.


IPC::Locker provides the following programs/packages:


lockerd is the daemon that supports IPC::Locker. See man lockerd after installation.


IPC::PidStat is a Perl package which answers the question, "is pid X running on host Y?". See man IPC::PidStat after installation.


pidstat is a program which answers the question, "is pid X running on host Y?". See man pidstat after installation.


pidstat is the daemon that supports IPC::PidStat and pidstat. See man pidstatd after installation.


pidwatch is a program which starts other programs, and kill that program when another job exists. See man pidwatch after installation.


uriexec is a simple wrapper which allows executing a command which is quoted using URI escapes. This prevents layered shells from interpreting special characters. See man uriexec after installation.

check_lockerd and check_pidstatd

check_lockerd and check_pidstatd are Nagios plugins to check lockerd and pidstatd. See the Nagios documentation at for information on installing plugins.


This package is Copyright 1999-2022 by Wilson Snyder <>.

This program 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. This code is provided with no warranty of any kind, and is used entirely at your own risk.