2 .\" Copyright (c) 1999 Dag-Erling Coïdan Smørgrav
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer
10 .\" in this position and unchanged.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. The name of the author may not be used to endorse or promote products
15 .\" derived from this software without specific prior written permission.
17 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 .\" $FreeBSD: src/usr.bin/sockstat/sockstat.1,v 1.19 2004/08/25 16:36:17 roam Exp $
43 command lists open Internet or
47 The following options are available:
58 Show connected sockets.
60 Show listening sockets.
62 Only show Internet sockets if either the local or foreign port number
63 is on the specified list.
66 argument is a comma-separated list of port numbers and ranges
67 specified as first and last port separated by a dash.
81 will list sockets in all three domains.
89 will list both listening and connected sockets.
91 The information listed for each
93 .Bl -tag -width "FOREIGN ADDRESS"
95 The user who owns the socket.
97 The command which holds the socket.
99 The process ID of the command which holds the socket.
101 The file descriptor number of the socket.
103 The transport protocol associated with the socket for Internet
104 sockets, or the type of socket (stream or datagram) for
108 For Internet sockets, this is the address the local end of the socket
110 .Xr getsockname 2 ) .
113 sockets, it is the socket's filename.
116 sockets, it is a right arrow followed by the endpoint's filename, or
118 if the endpoint could not be determined.
119 .It Li FOREIGN ADDRESS
120 (Internet sockets only)
121 The address the foreign end of the socket is bound to (see
122 .Xr getpeername 2 ) .
125 Note that TCP sockets in the
129 domains that are not in one of the
134 states may not be shown by
138 to examine them instead.
152 command and this manual page were written by
153 .An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org .