NAME

gx-watch-locks - Watch status of gx-map lock files


SYNOPSIS

gx-watch-locks -help

gx-watch-locks -version

gx-watch-locks [options]


DESCRIPTION

gx-watch-locks, part of the gx-map system, is an administrative command. It checks for the existence of lock files created by several gx-map commands.

The following commands currently create lock files:

gx-ca-update
gx-check-index
gx-check-requests
gx-db-check-requests

Lock files are used to prevent more than one instance of a program from executing concurrently and possibly corrupting data files. If one of these commands dies or hangs for any reason, it can leave a lock file in place, preventing the same command from running again. This can freeze updates to the grid-mapfile or to the grid-security/certificates directory.

In some circumstances, a command can legitimately take a long time to execute, so the existence of a lock file doesn't necessarily indicate a problem. A lock file contains a brief message which includes a time stamp, the name of the program that created it, and the name of the host on which it's running. This should be examined to determine whether the lock is actually stale.

The gx-watch-locks command prints a list of current lock files. By default, lock files younger than 5 minutes are ignored, and the list is only displayed once. Command-line options can change this behavior.

Stale locks can be removed using the gx-remove-locks command (q.v.).


OPTIONS

Option processing is done using the Perl Getopt::Long module.

Options may be specified with a single or double leading '-' character. Option names may be abbreviated to whatever is unique. Arguments may be separated either by a blank or by an '=' character. For example, ``-foobar 42'', ``--foobar=42'', and ``-foob 42'' would all be equivalent.

-help
Display a usage message and exit.

-version
Display the software version number and exit.

-loop
Rather than displaying the current locks and exiting, check repeatedly, by default every 5 minutes. The screen is cleared before each redisplay. This is suitable for running in a separate terminal window to continuously monitor the current status.

-interval seconds
Check every interval seconds rather than every 5 minutes.

-beep
Beep if any lock is older than 5 minutes.

-directory dir
Specify a gx-map installation or data directory. The default is the installation containing this copy of gx-watch-locks.

-all
Show all lock files. By default, lock files younger than 5 minutes are ignored.


SEE ALSO

gx-map(7), gx-remove-locks(8), gx-ca-update(8), gx-check-index(8), gx-check-requests(8), gx-db-check-requests(8)


AUTHOR

Keith Thompson, San Diego Supercomputer Center, <kst@sdsc.edu>


COPYRIGHT AND LICENSE

See the file LICENSE in the gx-map distribution, installed in the etc/gx-map subdirectory.