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