]> git.ipfire.org Git - thirdparty/util-linux.git/blob - misc-utils/lslocks.8.adoc
build-sys: release++ (v2.38.1)
[thirdparty/util-linux.git] / misc-utils / lslocks.8.adoc
1 //po4a: entry man manual
2 ////
3 Man page for the lslocks command.
4 Copyright 2012 Davidlohr Bueso <dave@gnu.org>
5 May be distributed under the GNU General Public License
6 ////
7 ////
8 Copyright 1994 Salvatore Valente (svalente@mit.edu)
9 Copyright 1992 Rickard E. Faith (faith@cs.unc.edu)
10 May be distributed under the GNU General Public License
11 ////
12 = lslocks(8)
13 :doctype: manpage
14 :man manual: System Administration
15 :man source: util-linux {release-version}
16 :page-layout: base
17 :command: lslocks
18 :plus: +
19
20 == NAME
21
22 lslocks - list local system locks
23
24 == SYNOPSIS
25
26 *lslocks* [options]
27
28 == DESCRIPTION
29
30 *lslocks* lists information about all the currently held file locks in a Linux system.
31
32 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.
33
34 == OPTIONS
35
36 *-b*, *--bytes*::
37 include::man-common/in-bytes.adoc[]
38
39 *-i*, *--noinaccessible*::
40 Ignore lock files which are inaccessible for the current user.
41
42 *-J*, *--json*::
43 Use JSON output format.
44
45 *-n*, *--noheadings*::
46 Do not print a header line.
47
48 *-o*, *--output* _list_::
49 Specify which output columns to print. Use *--help* to get a list of all supported columns.
50 +
51 The default list of columns may be extended if _list_ is specified in the format _{plus}list_ (e.g., *lslocks -o {plus}BLOCKER*).
52 //TRANSLATORS: Keep {plus} untranslated.
53
54 *--output-all*::
55 Output all available columns.
56
57 *-p*, *--pid* _pid_::
58 Display only the locks held by the process with this _pid_.
59
60 *-r*, *--raw*::
61 Use the raw output format.
62
63 *-u*, *--notruncate*::
64 Do not truncate text in columns.
65
66 include::man-common/help-version.adoc[]
67
68 == OUTPUT
69
70 COMMAND::
71 The command name of the process holding the lock.
72
73 PID::
74 The process ID of the process which holds the lock or -1 for OFDLCK.
75
76 TYPE::
77 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)).
78
79 SIZE::
80 Size of the locked file.
81
82 MODE::
83 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).
84
85 M::
86 Whether the lock is mandatory; 0 means no (meaning the lock is only advisory), 1 means yes. (See *fcntl*(2).)
87
88 START::
89 Relative byte offset of the lock.
90
91 END::
92 Ending offset of the lock.
93
94 PATH::
95 Full path of the lock. If none is found, or there are no permissions to read the path, it will fall back to the device's mountpoint and "..." is appended to the path. The path might be truncated; use *--notruncate* to get the full path.
96
97 BLOCKER::
98 The PID of the process which blocks the lock.
99
100 == NOTES
101
102 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.
103
104 == AUTHORS
105
106 mailto:dave@gnu.org[Davidlohr Bueso]
107
108 == SEE ALSO
109
110 *flock*(1),
111 *fcntl*(2),
112 *lockf*(3)
113
114 include::man-common/bugreports.adoc[]
115
116 include::man-common/footer.adoc[]
117
118 ifdef::translation[]
119 include::man-common/translation.adoc[]
120 endif::[]