diff options
author | Fernando ApesteguĂa <fernape@FreeBSD.org> | 2020-06-13 17:36:08 +0000 |
---|---|---|
committer | Fernando ApesteguĂa <fernape@FreeBSD.org> | 2020-06-13 17:36:08 +0000 |
commit | f893fe7a1d6af6b19e93a0ea39085ea4681ddf2d (patch) | |
tree | a8972fbf9ada3ad28a1ec205af56adafa3fb6f72 /usr.bin/sockstat | |
parent | 38f168e1a3b83f2dcf9ad354f4f4a7429c9edbba (diff) | |
download | src-test-f893fe7a1d6af6b19e93a0ea39085ea4681ddf2d.tar.gz src-test-f893fe7a1d6af6b19e93a0ea39085ea4681ddf2d.zip |
sockstat(1): Add EXAMPLES to man page
Add three examples showing the use of -4, -6, -l, -L, -p and -P
Reviewed by: gbe@
Approved by: bcr@
Notes
Notes:
svn path=/head/; revision=362149
Diffstat (limited to 'usr.bin/sockstat')
-rw-r--r-- | usr.bin/sockstat/sockstat.1 | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/usr.bin/sockstat/sockstat.1 b/usr.bin/sockstat/sockstat.1 index dff8c543cbe5f..2160f864738b3 100644 --- a/usr.bin/sockstat/sockstat.1 +++ b/usr.bin/sockstat/sockstat.1 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 3, 2018 +.Dd June 13, 2020 .Dt SOCKSTAT 1 .Os .Sh NAME @@ -177,6 +177,23 @@ If a socket is associated with more than one file descriptor, 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 , |