]> git.ipfire.org Git - thirdparty/util-linux.git/blob - misc-utils/lslocks.8.adoc
Merge branch 'PR/libmount-utab-event' of github.com:karelzak/util-linux-work
[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 == OPTIONS
33
34 *-b*, *--bytes*::
35 include::man-common/in-bytes.adoc[]
36
37 *-H*, *--list-columns*::
38 List the available columns, use with *--json* or *--raw* to get output in machine-readable format.
39
40 *-i*, *--noinaccessible*::
41 Ignore lock files which are inaccessible for the current user.
42
43 *-J*, *--json*::
44 Use JSON output format.
45
46 *-n*, *--noheadings*::
47 Do not print a header line.
48
49 *-o*, *--output* _list_::
50 Specify which output columns to print. Use *--help* to get a list of all supported columns.
51 +
52 The default list of columns may be extended if _list_ is specified in the format _{plus}list_ (e.g., *lslocks -o {plus}BLOCKER*).
53 //TRANSLATORS: Keep {plus} untranslated.
54
55 *--output-all*::
56 Output all available columns.
57
58 *-p*, *--pid* _pid_::
59 Display only the locks held by the process with this _pid_.
60
61 *-r*, *--raw*::
62 Use the raw output format.
63
64 *-u*, *--notruncate*::
65 Do not truncate text in columns.
66
67 include::man-common/help-version.adoc[]
68
69 == OUTPUT
70
71 COMMAND::
72 The command name of the process holding the lock.
73
74 PID::
75 The process ID of the process.
76
77 TYPE::
78 The type of lock; can be LEASE (created with *fcntl*(2)), FLOCK (created with *flock*(2)), POSIX (created with *fcntl*(2) and *lockf*(3)) or OFDLCK (created with *fcntl*(2)).
79
80 SIZE::
81 Size of the locked file.
82
83 INODE::
84 The inode number.
85
86 MAJ:MIN::
87 The major:minor device number.
88
89 MODE::
90 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).
91
92 M::
93 Whether the lock is mandatory; 0 means no (meaning the lock is only advisory), 1 means yes. (See *fcntl*(2).)
94
95 START::
96 Relative byte offset of the lock.
97
98 END::
99 Ending offset of the lock.
100
101 PATH::
102 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.
103
104 BLOCKER::
105 The PID of the process which blocks the lock.
106
107 HOLDERS::
108 The holder(s) of the lock. The format of the holder is _PID_,_COMMAND_,_FD_.
109 If a lock is an open file description-oriented lock, there can be more than one holder for the lock.
110 See the NOTES below.
111
112 == NOTES
113
114 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.
115
116 "The process holding the lock" for leases, FLOCK locks, and
117 OFD locks is a fake-concept. They are associated with the open file
118 description on which they are acquired. With *fork*(2) and/or
119 *cmsg*(3), multiple processes can share an open file description. So
120 the holder process of a lease (or a lock) is not uniquely determined.
121 *lslocks* shows the one of the holder processes in COMMAND and PID columns.
122
123 == AUTHORS
124
125 mailto:dave@gnu.org[Davidlohr Bueso]
126
127 == SEE ALSO
128
129 *flock*(1),
130 *fcntl*(2),
131 *lockf*(3)
132
133 include::man-common/bugreports.adoc[]
134
135 include::man-common/footer.adoc[]
136
137 ifdef::translation[]
138 include::man-common/translation.adoc[]
139 endif::[]