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