summaryrefslogtreecommitdiffstats
path: root/usr.bin/sockstat
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2000-10-07 14:11:43 +0000
committerdes <des@FreeBSD.org>2000-10-07 14:11:43 +0000
commit80571cee9626546997e004ba50174e5df7522e00 (patch)
treecd420cd36a9485d13427ef4da641a9ec39813b94 /usr.bin/sockstat
parent35a375ea90f83fec3c572aa2bc8c481bef86a9db (diff)
downloadFreeBSD-src-80571cee9626546997e004ba50174e5df7522e00.zip
FreeBSD-src-80571cee9626546997e004ba50174e5df7522e00.tar.gz
Document the fact that sockstat now lists Unix domain sockets, and the new
command-line options for selecting what to display.
Diffstat (limited to 'usr.bin/sockstat')
-rw-r--r--usr.bin/sockstat/sockstat.130
1 files changed, 27 insertions, 3 deletions
diff --git a/usr.bin/sockstat/sockstat.1 b/usr.bin/sockstat/sockstat.1
index 3f7e21b..5a9fbd8 100644
--- a/usr.bin/sockstat/sockstat.1
+++ b/usr.bin/sockstat/sockstat.1
@@ -31,13 +31,29 @@
.Dt SOCKSTAT 1
.Sh NAME
.Nm sockstat
-.Nd list open Internet sockets
+.Nd list open sockets
.Sh SYNOPSIS
.Nm
+.Op Fl 46u
.Sh DESCRIPTION
The
.Nm
-command lists open Internet sockets.
+command lists open Internet or Unix domain sockets.
+.Pp
+The following options are available:
+.Bl -tag -width Fl
+.It Fl 4
+Show AF_INET (IPv4) sockets.
+.It Fl 6
+Show AF_INET6 (IPv6) sockets.
+.It Fl u
+Show AF_LOCAL (Unix) sockets.
+.El
+.Pp
+If no option is specified,
+.Nm
+will list sockets of all three types.
+.Pp
The information listed for each
socket is:
.Bl -tag -width "FOREIGN ADDRESS"
@@ -50,11 +66,19 @@ The process ID of the command which holds the socket.
.It Li FD
The file descriptor number of the socket.
.It Li PROTO
-The transport protocol associated with the socket.
+The transport protocol associated with the socket for Internet
+sockets, or the type of socket (stream or datagram) for Unix sockets.
+.It Li ADDRESS
+(Unix sockets only)
+For listening sockets, this is the filename of the socket.
+For other sockets, it is the name, PID and file descriptor number of
+the peer, or "(none)" if the socket is neither bound nor connected.
.It Li LOCAL ADDRESS
+(Internet sockets only)
The address the local end of the socket is bound to (see
.Xr getsockname 2 ).
.It Li FOREIGN ADDRESS
+(Internet sockets only)
The address the foreign end of the socket is bound to (see
.Xr getpeername 2 ).
.El
OpenPOWER on IntegriCloud