summaryrefslogtreecommitdiffstats
path: root/misc-utils/lslocks.8.adoc
diff options
context:
space:
mode:
Diffstat (limited to 'misc-utils/lslocks.8.adoc')
-rw-r--r--misc-utils/lslocks.8.adoc27
1 files changed, 23 insertions, 4 deletions
diff --git a/misc-utils/lslocks.8.adoc b/misc-utils/lslocks.8.adoc
index 21ad643..2084d96 100644
--- a/misc-utils/lslocks.8.adoc
+++ b/misc-utils/lslocks.8.adoc
@@ -29,13 +29,14 @@ lslocks - list local system locks
*lslocks* lists information about all the currently held file locks in a Linux system.
-Note that lslocks also lists OFD (Open File Description) locks, these locks are not associated with any process (PID is -1). OFD locks are associated with the open file description on which they are acquired. This lock type is available since Linux 3.15, see *fcntl*(2) for more details.
-
== OPTIONS
*-b*, *--bytes*::
include::man-common/in-bytes.adoc[]
+*-H*, *--list-columns*::
+List the available columns, use with *--json* or *--raw* to get output in machine-readable format.
+
*-i*, *--noinaccessible*::
Ignore lock files which are inaccessible for the current user.
@@ -71,14 +72,20 @@ COMMAND::
The command name of the process holding the lock.
PID::
-The process ID of the process which holds the lock or -1 for OFDLCK.
+The process ID of the process.
TYPE::
-The type of lock; can be FLOCK (created with *flock*(2)), POSIX (created with *fcntl*(2) and *lockf*(3)) or OFDLCK (created with *fcntl*(2)).
+The type of lock; can be LEASE (created with *fcntl*(2)), FLOCK (created with *flock*(2)), POSIX (created with *fcntl*(2) and *lockf*(3)) or OFDLCK (created with *fcntl*(2)).
SIZE::
Size of the locked file.
+INODE::
+The inode number.
+
+MAJ:MIN::
+The major:minor device number.
+
MODE::
The lock's access permissions (read, write). If the process is blocked and waiting for the lock, then the mode is postfixed with an '*' (asterisk).
@@ -97,10 +104,22 @@ Full path of the lock. If none is found, or there are no permissions to read the
BLOCKER::
The PID of the process which blocks the lock.
+HOLDERS::
+The holder(s) of the lock. The format of the holder is _PID_,_COMMAND_,_FD_.
+If a lock is an open file description-oriented lock, there can be more than one holder for the lock.
+See the NOTES below.
+
== NOTES
The *lslocks* command is meant to replace the *lslk*(8) command, originally written by mailto:abe@purdue.edu[Victor A. Abell] and unmaintained since 2001.
+"The process holding the lock" for leases, FLOCK locks, and
+OFD locks is a fake-concept. They are associated with the open file
+description on which they are acquired. With *fork*(2) and/or
+*cmsg*(3), multiple processes can share an open file description. So
+the holder process of a lease (or a lock) is not uniquely determined.
+*lslocks* shows the one of the holder processes in COMMAND and PID columns.
+
== AUTHORS
mailto:dave@gnu.org[Davidlohr Bueso]