man-pages/man8/lslocks.8.html
2021-03-31 01:06:50 +01:00

175 lines
5.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of LSLOCKS</TITLE>
</HEAD><BODY>
<H1>LSLOCKS</H1>
Section: System Administration (8)<BR>Updated: December 2014<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
lslocks - list local system locks
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>lslocks</B>
[options]
<P>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B>lslocks</B>
lists information about all the currently held file locks in a Linux system.
<P>
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 <B><A HREF="/cgi-bin/man/man2html?2+fcntl">fcntl</A></B>(2) for more details.
<P>
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT id="1"><B>-b</B>,<B> --bytes</B>
<DD>
Print the SIZE column in bytes rather than in a human-readable format.
<DT id="2"><B>-i</B>,<B> --noinaccessible</B>
<DD>
Ignore lock files which are inaccessible for the current user.
<DT id="3"><B>-J</B>,<B> --json</B>
<DD>
Use JSON output format.
<DT id="4"><B>-n</B>,<B> --noheadings</B>
<DD>
Do not print a header line.
<DT id="5"><B>-o</B>,<B> --output </B><I>list</I>
<DD>
Specify which output columns to print. Use
<B>--help</B>
to get a list of all supported columns.
<P>
The default list of columns may be extended if <I>list</I> is
specified in the format <I>+list</I> (e.g. <B>lslocks -o +BLOCKER</B>).
<DT id="6"><B>--output-all</B>
<DD>
Output all available columns.
<DT id="7"><B>-p</B>,<B> --pid </B><I>pid</I>
<DD>
Display only the locks held by the process with this <I>pid</I>.
<DT id="8"><B>-r</B>,<B> --raw</B>
<DD>
Use the raw output format.
<DT id="9"><B>-u</B>,<B> --notruncate</B>
<DD>
Do not truncate text in columns.
<DT id="10"><B>-V</B>,<B> --version</B>
<DD>
Display version information and exit.
<DT id="11"><B>-h</B>,<B> --help</B>
<DD>
Display help text and exit.
<P>
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>OUTPUT</H2>
<DL COMPACT>
<DT id="12">COMMAND<DD>
The command name of the process holding the lock.
<DT id="13">PID<DD>
The process ID of the process which holds the lock or -1 for OFDLCK.
<DT id="14">TYPE<DD>
The type of lock; can be FLOCK (created with <B><A HREF="/cgi-bin/man/man2html?2+flock">flock</A></B>(2)), POSIX
(created with <B><A HREF="/cgi-bin/man/man2html?2+fcntl">fcntl</A></B>(2) and <B><A HREF="/cgi-bin/man/man2html?3+lockf">lockf</A></B>(3)) or OFDLCK (created with <A HREF="/cgi-bin/man/man2html?2+fcntl">fcntl</A>(2).
<DT id="15">SIZE<DD>
Size of the locked file.
<DT id="16">MODE<DD>
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).
<DT id="17">M<DD>
Whether the lock is mandatory; 0 means no (meaning the lock is only advisory), 1 means yes.
(See <B><A HREF="/cgi-bin/man/man2html?2+fcntl">fcntl</A></B>(2).)
<DT id="18">START<DD>
Relative byte offset of the lock.
<DT id="19">END<DD>
Ending offset of the lock.
<DT id="20">PATH<DD>
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 &quot;...&quot; is appended to
the path. The path might be truncated; use
<B>--notruncate</B> to get the full path.
<DT id="21">BLOCKER<DD>
The PID of the process which blocks the lock.
<P>
</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>NOTES</H2>
<PRE>
The <B>lslocks</B> command is meant to replace the <B><A HREF="/cgi-bin/man/man2html?8+lslk">lslk</A></B>(8) command,
originally written by Victor A. Abell &lt;<A HREF="mailto:abe@purdue.edu">abe@purdue.edu</A>&gt; and unmaintained
since 2001.
</PRE>
<P>
<A NAME="lbAH">&nbsp;</A>
<H2>AUTHORS</H2>
<PRE>
Davidlohr Bueso &lt;<A HREF="mailto:dave@gnu.org">dave@gnu.org</A>&gt;
</PRE>
<P>
<A NAME="lbAI">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?1+flock">flock</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?2+fcntl">fcntl</A></B>(2),
<B><A HREF="/cgi-bin/man/man2html?3+lockf">lockf</A></B>(3)
<P>
<A NAME="lbAJ">&nbsp;</A>
<H2>AVAILABILITY</H2>
The lslocks command is part of the util-linux package and is available from
<A HREF="https://www.kernel.org/pub/linux/utils/util-linux/.">https://www.kernel.org/pub/linux/utils/util-linux/.</A>
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="22"><A HREF="#lbAB">NAME</A><DD>
<DT id="23"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="24"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="25"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="26"><A HREF="#lbAF">OUTPUT</A><DD>
<DT id="27"><A HREF="#lbAG">NOTES</A><DD>
<DT id="28"><A HREF="#lbAH">AUTHORS</A><DD>
<DT id="29"><A HREF="#lbAI">SEE ALSO</A><DD>
<DT id="30"><A HREF="#lbAJ">AVAILABILITY</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:06:13 GMT, March 31, 2021
</BODY>
</HTML>