]> git.ipfire.org Git - thirdparty/util-linux.git/blob - misc-utils/lslocks.8
cal: Use ALTMON_* correctly
[thirdparty/util-linux.git] / misc-utils / lslocks.8
1 .\" Man page for the lslocks command.
2 .\" Copyright 2012 Davidlohr Bueso <dave@gnu.org>
3 .\" May be distributed under the GNU General Public License
4
5 .TH LSLOCKS 8 "December 2014" "util-linux" "System Administration"
6 .SH NAME
7 lslocks \- list local system locks
8 .SH SYNOPSIS
9 .B lslocks
10 [options]
11
12 .SH DESCRIPTION
13 .B lslocks
14 lists information about all the currently held file locks in a Linux system.
15
16 .SH OPTIONS
17 .TP
18 .BR \-i , " \-\-noinaccessible"
19 Ignore lock files which are inaccessible for the current user.
20 .TP
21 .BR \-J , " \-\-json"
22 Use JSON output format.
23 .TP
24 .BR \-n , " \-\-noheadings"
25 Do not print a header line.
26 .TP
27 .BR \-o , " \-\-output " \fIlist\fP
28 Specify which output columns to print. Use
29 .B "--help"
30 to get a list of all supported columns.
31
32 The default list of columns may be extended if \fIlist\fP is
33 specified in the format \fI+list\fP (e.g. \fBlslocks -o +BLOCKER\fP).
34 .TP
35 .BR \-p , " \-\-pid " \fIpid\fP
36 Display only the locks held by the process with this \fIpid\fR.
37 .TP
38 .BR \-r , " \-\-raw"
39 Use the raw output format.
40 .TP
41 .BR \-u , " \-\-notruncate"
42 Do not truncate text in columns.
43 .TP
44 .BR \-V , " \-\-version"
45 Display version information and exit.
46 .TP
47 .BR \-h , " \-\-help"
48 Display help text and exit.
49
50 .SH OUTPUT
51 .IP "COMMAND"
52 The command name of the process holding the lock.
53 .IP "PID"
54 The process ID of the process which holds the lock.
55 .IP "TYPE"
56 The type of lock; can be FLOCK (created with \fBflock\fR(2)), POSIX
57 (created with \fBfcntl\fR(2) and \fBlockf\fR(3)) or OFDLCK (created with fcntl(2).
58 .IP "SIZE"
59 Size of the locked file.
60 .IP "MODE"
61 The lock's access permissions (read, write). If the process is blocked and waiting for the lock,
62 then the mode is postfixed with an '*' (asterisk).
63 .IP "M"
64 Whether the lock is mandatory; 0 means no (meaning the lock is only advisory), 1 means yes.
65 (See \fBfcntl\fR(2).)
66 .IP "START"
67 Relative byte offset of the lock.
68 .IP "END"
69 Ending offset of the lock.
70 .IP "PATH"
71 Full path of the lock. If none is found, or there are no permissions to read
72 the path, it will fall back to the device's mountpoint and "..." is appended to
73 the path. The path might be truncated; use
74 \fB\-\-notruncate\fR to get the full path.
75 .IP "BLOCKER"
76 The PID of the process which blocks the lock.
77
78 .SH NOTES
79 .nf
80 The \fBlslocks\fR command is meant to replace the \fBlslk\fR(8) command,
81 originally written by Victor A. Abell <abe@purdue.edu> and unmaintained
82 since 2001.
83 .fi
84
85 .SH AUTHORS
86 .nf
87 Davidlohr Bueso <dave@gnu.org>
88 .fi
89
90 .SH "SEE ALSO"
91 .BR flock (1),
92 .BR fcntl (2),
93 .BR lockf (3)
94
95 .SH AVAILABILITY
96 The lslocks command is part of the util-linux package and is available from
97 https://www.kernel.org/pub/linux/utils/util-linux/.