-.ds VN 4.88
+.ds VN 4.89
.TH LSOF 8 Revision-\*(VN
-.if !\n()P .nr )P 1v
+\" Register )P is used neither by this file nor any groff macro. However,
+\" some versions of nroff require it.
+.if !\n(.g \{\
+. if !\n()P .nr )P 1v
+.\}
.SH NAME
lsof \- list open files
.SH SYNOPSIS
Options may be grouped together following a single prefix -- e.g.,
the option set ``\fB\-a \-b \-C\fP'' may be stated as
.BR \-abC .
-However, since values are optional following
+However, since values are optional following
.BR +|\-f ,
.BR \-F ,
.BR \-g ,
.I c
begins and ends with a slash ('/'), the characters between the slashes
are interpreted as a regular expression.
-Shell meta\-characters in the regular expression must be quoted to prevent
+Shell meta\-characters in the regular expression must be quoted to prevent
their interpretation by the shell.
The closing slash may be followed by these modifiers:
.IP
The suffix,
.IR hostname ,
is the first component of the host's name returned by
-.IR gethostname (2) .
+.IR gethostname (2).
.IP
When available, the
.B b
.TP \w'names'u+4
.B +|-E
.B +E
-specifies that Linux files should be displayed with endpoint
-information and the files of the endpoints should also be
+specifies that Linux pipe and Linux UNIX socket files should be displayed with
+endpoint information and the files of the endpoints should also be
displayed.
+Note: UNIX socket file endpoint information is available only when the
+compile flags line of
+.B \-v
+output contains HASUXSOCKEPT.
.IP
-Endpoint information is displayed in the NAME column in the
-form ``\fIPID,cmd,FDmode\fP''.
+Pipe endpoint information is displayed in the NAME column in the
+form ``\fIPID,cmd,FDmode\fP'', where
.I PID
is the endpoint process ID;
.I cmd
is the endpoint file's descriptor; and
.I mode
is the endpoint file's access mode.
+.IP
+UNIX socket file endpoint information is displayed in the NAME column
+in the form
+.br
+``type=\fITYPE\fP\ ->INO=\fIINODE\fP\ \fIPID,cmd,FDmode\fP'', where
+.I TYPE
+is the socket type;
+.I INODE
+is the i-node number of the connected socket;
+and
+.I "PID, cmd, FD,"
+and
+.I mode
+are the same as with pipe endpoint information.
+Note: UNIX socket file endpoint information is available only when the
+compile flags line of
+.B \-v
+output contains HASUXSOCKEPT.
+.IP
Multiple occurrences of this information can appear in a file's
NAME column.
.IP
.B -E
-specfies that Linux pipe files should only be displayed with endpoint
-information.
+specfies that Linux pipe and Linux UNIX socket files should be displayed
+with endpoint information, but not the files of the endpoints.
.TP \w'names'u+4
.B +|\-f [cfgGn]
.B f
An Internet address is specified in the form (Items in square
brackets are optional.):
.IP
+.ie !\n(.g \{
[\fI46\fP][\fIprotocol\fP][@\fIhostname\fP\||\|\fIhostaddr\fP][:\fIservice\fP\||\|\fIport\fP]
+\}
+.el \{
+.RI [ 46 ][ protocol ][@ hostname \||\| hostaddr ][: service \||\| port ]
+\}
.IP
where:
.nf
options are available.
.TP \w'names'u+4
.B +|\-M
-Enables (\fB+\fP) or disables (\fB-\fP) the
+Enables (\fB+\fP) or disables (\fB\-\fP) the
reporting of portmapper registrations for local TCP, UDP and UDPLITE ports,
where port mapping is supported.
(See the last paragraph of this option description for information about
-where portmapper registration reporting is suported.)
+where portmapper registration reporting is supported.)
.IP
The default reporting mode is set by the
.I lsof
is distributed with the HASPMAPENABLED #define deactivated, so
portmapper reporting is disabled by default and must be requested
with
-.BR \+M .
+.BR +M .
Specifying
.I lsof's
.B \-h
option.
.TP \w'names'u+4
.B \-n
-inhibits the conversion of network numbers to
+inhibits the conversion of network numbers to
host names for network files.
Inhibiting conversion may make
.I lsof
available for the type of file.
.IP
Since some types of files don't have true sizes \- sockets, FIFOs,
-pipes, etc. \- lsof displays for their sizes the content amounts in
+pipes, etc.\& \- lsof displays for their sizes the content amounts in
their associated kernel buffers, if possible.
.TP \w'names'u+4
.BI \-S " [t]"
KEEPALIVE keep alive time (SO_KEEPALIVE)
LINGER linger time (SO_LINGER)
MSS maximum segment size (TCP_MAXSEG)
- PQLEN partial listen queue connections
+ PQLEN partial listen queue connections
QLEN established listen queue connections
QLIM established listen queue limit
RCVBUF receive buffer length (SO_RCVBUF)
.I lsof
FAQ (The \fBFAQ\fP section gives its location.)
.TP \w'names'u+4
-.B \-t
+.B \-t
specifies that
.I lsof
should produce terse output with process identifiers only and no header \-
.I Z
can be A:B:C or *:B:C or A:B:* or *:*:C to match against the A:B:C context.
.TP \w'names'u+4
-.B --
+.B \-\-
The double minus sign option is a marker that signals the end of
the keyed options.
It may be used, for example, when the first file name begins with
the ``--'' option.
.IP
If a
-.I name
+.I name
is the mounted\-on directory of a file system or the device of the
file system,
.I lsof
.IP
If a
.I name
-is the base name of a family of multiplexed files \- e. g, AIX's
+is the base name of a family of multiplexed files \- e.g, AIX's
.IR /dev/pt[cs] " \-"
.I lsof
will list all the associated multiplexed files on the device that
\fBx\fP for an SCO OpenServer Xenix lock on part
of the file;
.br
- \fBX\fP for an SCO OpenServer Xenix lock on the
- entire file;
+ \fBX\fP for an SCO OpenServer Xenix lock on the entire file;
.br
space if there is no lock.
.IP
.IP
or ``PLWX'' for a
.I /proc/xregs
-file'
+file;
.IP
or ``PMAP'' for a
.I /proc
.IP
or the inode number of an NFS file in the server host;
.IP
-or the Internet protocol type \- e. g, ``TCP'';
+or the Internet protocol type \- e.g, ``TCP'';
.IP
or ``STR'' for a stream;
.IP
c process command name (all characters from proc or
user structure)
C file structure share count
- d file's device character code
+ d file's device character code
D file's major/minor device number (0x<hexadecimal>)
f file descriptor (always selected)
F file structure address (0x<hexadecimal>)
FreeBSD 4.x, 4.1x, 5.x and [6789].x for x86-based systems
FreeBSD 5.x and [6789].x for Alpha, AMD64 and Sparc64-based
systems
- HP\-UX 11.00
+ HP\-UX 11.00
NetBSD 1.[456], 2.x and 3.x for Alpha, x86, and SPARC-based
systems
NEXTSTEP 3.[13] for NEXTSTEP architectures
The LSOFPERSDCPATH variable contents are inserted in the path at the
place marked by the local system administrator with the ``%p''
conversion in the HASPERSDC format specification of the dialect's
-.I machine.h
+.I machine.h
header file.
(It's placed right after the home directory in the default
.I lsof
and
.IR stat (2)
functions report for the directory on which CD-ROM files are mounted
-(typically
+(typically
.IR /cdrom )
are not the same as the ones that it reports for the device on which
CD-ROM files are mounted (typically
(The suffix,
.IR hostname ,
is the first component of the host's name returned by
-.IR gethostname (2) .)
+.IR gethostname (2).)
.SH AUTHORS
.I Lsof
-was written by Victor A. Abell <abe@purdue.edu> of Purdue University.
+was written by Victor A.\&Abell <abe@purdue.edu> of Purdue University.
Many others have contributed to
.IR lsof .
They're listed in the