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