]> git.ipfire.org Git - thirdparty/util-linux.git/blob - misc-utils/lslocks.8
Merge branch 'patch-1' of https://github.com/dtrebbien/util-linux
[thirdparty/util-linux.git] / misc-utils / lslocks.8
1 .\" lslocks.8 --
2 .\" Copyright 2012 Davidlohr Bueso <dave@gnu.org>
3 .\" May be distributed under the GNU General Public License
4
5 .TH LSLOCKS 8 "February 2012" "util-linux" "System Administration"
6 .SH NAME
7 lslocks \-
8 list local system locks
9 .SH SYNOPSIS
10 .B lslocks
11 .RB [options]
12
13 .SH DESCRIPTION
14 .B lslocks
15 lists information about all the file held locks in a Linux system.
16
17 .SH OPTIONS
18 .IP "\fB\-p, \-\-pid\fP"
19 Specify the process id, if none is given, it will display all locks
20 .IP "\fB\-h, \-\-help\fP"
21 Print a help text and exit.
22 .IP "\fB\-o, \-\-output \fIlist\fP"
23 Specify which output columns to print. Use
24 .B "--help"
25 to get a list of all supported columns.
26
27 The default list of the columns maybe be extended if the \fIlist\fP is
28 specified in format +<list> (e.g. lslocks -o +BLOCKER).
29 .IP "\fB\-n, \-\-noheadings\fP"
30 Do not print a header line.
31 .IP "\fB\-u, \-\-notruncate\fP"
32 Do not truncate text in columns.
33 .IP "\fB\-r, \-\-raw\fP"
34 Use the raw output format.
35
36 .SH OUTPUT
37 .IP "COMMAND"
38 The command name of the process holding the lock.
39
40 .IP "PID"
41 Process ID which holds the lock.
42
43 .IP "TYPE"
44 Type of lock, can be FLOCK (created with flock(2)) or POSIX (created with fcntl(2) and lockf(2))
45
46 .IP "SIZE"
47 Size of the locked file.
48
49 .IP "MODE"
50 Lock access permissions (read, write). If the process is blocked and waiting for the lock
51 than the '*' (asterisk) postfix is used for the mode.
52 .IP "M"
53 Mandatory state of the lock: 0 if none; 1 if set. (See chmod(1)).
54
55 .IP "START"
56 Relative byte offset of the lock.
57
58 .IP "END"
59 Ending offset of the lock.
60
61 .IP "PATH"
62 Full path of the lock - if none is found or no permissions to read the path it
63 will fallback to the device's mountpoint. The path might be truncated, use
64 .B "--notruncate"
65 to get the full path.
66
67 .IP "BLOCKER"
68 Process ID which blocks the lock.
69
70 .SH NOTES
71 .nf
72 The lslocks command is meant to replace the lslk(8) command, originally written by
73 Victor A. Abell <abe@purdue.edu> and unmaintained since 2001.
74 .fi
75
76 .SH AUTHORS
77 .nf
78 Davidlohr Bueso <dave@gnu.org>
79 .fi
80
81 .SH "SEE ALSO"
82 .BR flock (1)
83 .BR fcntl (2)
84 .BR lockf (2)
85
86 .SH AVAILABILITY
87 The lslocks command is part of the util-linux package and is available from
88 ftp://ftp.kernel.org/pub/linux/utils/util-linux/.