1
2LSLOCKS(8)                   System Administration                  LSLOCKS(8)
3
4
5

NAME

7       lslocks - list local system locks
8

SYNOPSIS

10       lslocks [options]
11
12

DESCRIPTION

14       lslocks  lists information about all the currently held file locks in a
15       Linux system.
16
17

OPTIONS

19       -h, --help
20              Print a help text and exit.
21
22       -n, --noheadings
23              Do not print a header line.
24
25       -o, --output list
26              Specify which output columns to print.  Use --help to get a list
27              of all supported columns.
28
29              The default list of columns may be extended if list is specified
30              in the format +list (e.g. lslocks -o +BLOCKER).
31
32       -p, --pid pid
33              Display only the locks held by the process with this pid.
34
35       -r, --raw
36              Use the raw output format.
37
38       -u, --notruncate
39              Do not truncate text in columns.
40
41

OUTPUT

43       COMMAND
44              The command name of the process holding the lock.
45
46
47       PID    The process ID of the process which holds the lock.
48
49
50       TYPE   The type of lock; can be FLOCK (created with flock(2)) or  POSIX
51              (created with fcntl(2) and lockf(3)).
52
53
54       SIZE   Size of the locked file.
55
56
57       MODE   The  lock's access permissions (read, write).  If the process is
58              blocked and waiting for the lock, then  the  mode  is  postfixed
59              with an '*' (asterisk).
60
61
62       M      Whether  the  lock is mandatory; 0 means no (meaning the lock is
63              only advisory), 1 means yes.  (See fcntl(2)).
64
65
66       START  Relative byte offset of the lock.
67
68
69       END    Ending offset of the lock.
70
71
72       PATH   Full path of the lock.  If none is found, or there are  no  per‐
73              missions  to  read  the  path, it will fall back to the device's
74              mountpoint.  The path might be truncated;  use  --notruncate  to
75              get the full path.
76
77
78       BLOCKER
79              The PID of the process which blocks the lock.
80
81

NOTES

83       The lslocks command is meant to replace the lslk(8) command, originally written by
84       Victor A. Abell <abe@purdue.edu> and unmaintained since 2001.
85
86

AUTHORS

88       Davidlohr Bueso <dave@gnu.org>
89
90

SEE ALSO

92       flock(1), fcntl(2), lockf(2)
93
94

AVAILABILITY

96       The  lslocks command is part of the util-linux package and is available
97       from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
98
99
100
101util-linux                       February 2012                      LSLOCKS(8)
Impressum