Index: usr.bin/sockstat/sockstat.1 =================================================================== --- usr.bin/sockstat/sockstat.1 +++ usr.bin/sockstat/sockstat.1 @@ -177,6 +177,23 @@ it is shown multiple times. If a socket is not associated with any file descriptor, the first four columns have no meaning. +.Sh EXAMPLES +Show information for IPv4 sockets listening on port 22 using protocol +TCP: +.Bd -literal -offset indent +$ sockstat -4 -l -P tcp -p 22 +.Ed +.Pp +Show information for sockets using either TCP or UDP, if neither, the local nor +the foreign addresses are in the loopback network: +.Bd -literal -offset indent +$ sockstat -L -P tcp,udp +.Ed +.Pp +Show TCP IPv6 sockets which are listening and connected (default): +.Bd -literal -offset indent +$ sockstat -6 -P tcp +.Ed .Sh SEE ALSO .Xr fstat 1 , .Xr netstat 1 ,