]> git.ipfire.org Git - thirdparty/util-linux.git/blame - misc-utils/lslocks.8
findmnt: error on --target /non-exist
[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
f29bc6e1
KZ
18.BR \-i , " \-\-noinaccessible"
19Ignore lock files which are inaccessible for the current user.
20.TP
b3a2e889
KZ
21.BR \-J , " \-\-json"
22Use JSON output format.
23.TP
eae1ef2f
BS
24.BR \-n , " \-\-noheadings"
25Do not print a header line.
26.TP
27.BR \-o , " \-\-output " \fIlist\fP
28Specify which output columns to print. Use
4473c8dc
DB
29.B "--help"
30to get a list of all supported columns.
e68948e1 31
37684203
BS
32The default list of columns may be extended if \fIlist\fP is
33specified in the format \fI+list\fP (e.g. \fBlslocks -o +BLOCKER\fP).
eae1ef2f
BS
34.TP
35.BR \-p , " \-\-pid " \fIpid\fP
36Display only the locks held by the process with this \fIpid\fR.
37.TP
38.BR \-r , " \-\-raw"
4473c8dc 39Use the raw output format.
eae1ef2f
BS
40.TP
41.BR \-u , " \-\-notruncate"
42Do not truncate text in columns.
7ab71099
BS
43.TP
44.BR \-V , " \-\-version"
45Display version information and exit.
46.TP
47.BR \-h , " \-\-help"
48Display help text and exit.
4473c8dc
DB
49
50.SH OUTPUT
51.IP "COMMAND"
52The command name of the process holding the lock.
4473c8dc 53.IP "PID"
eae1ef2f 54The process ID of the process which holds the lock.
74fa8244 55.IP "TYPE"
7ab71099
BS
56The type of lock; can be FLOCK (created with \fBflock\fR(2)) or POSIX
57(created with \fBfcntl\fR(2) and \fBlockf\fR(3)).
4473c8dc
DB
58.IP "SIZE"
59Size of the locked file.
74fa8244 60.IP "MODE"
eae1ef2f
BS
61The lock's access permissions (read, write). If the process is blocked and waiting for the lock,
62then the mode is postfixed with an '*' (asterisk).
4473c8dc 63.IP "M"
eae1ef2f 64Whether the lock is mandatory; 0 means no (meaning the lock is only advisory), 1 means yes.
7ab71099 65(See \fBfcntl\fR(2).)
4473c8dc
DB
66.IP "START"
67Relative byte offset of the lock.
4473c8dc
DB
68.IP "END"
69Ending offset of the lock.
4473c8dc 70.IP "PATH"
f29bc6e1
KZ
71Full path of the lock. If none is found, or there are no permissions to read
72the path, it will fall back to the device's mountpoint and "..." is appended to
73the path. The path might be truncated; use
7ab71099 74\fB\-\-notruncate\fR to get the full path.
7badb909 75.IP "BLOCKER"
eae1ef2f 76The PID of the process which blocks the lock.
7badb909 77
4473c8dc
DB
78.SH NOTES
79.nf
7ab71099
BS
80The \fBlslocks\fR command is meant to replace the \fBlslk\fR(8) command,
81originally written by Victor A. Abell <abe@purdue.edu> and unmaintained
82since 2001.
4473c8dc
DB
83.fi
84
85.SH AUTHORS
86.nf
87Davidlohr Bueso <dave@gnu.org>
88.fi
89
90.SH "SEE ALSO"
66083665
MF
91.BR flock (1),
92.BR fcntl (2),
f00218ff 93.BR lockf (3)
4473c8dc
DB
94
95.SH AVAILABILITY
96The lslocks command is part of the util-linux package and is available from
97ftp://ftp.kernel.org/pub/linux/utils/util-linux/.