Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Jul 2020 16:17:24 +0000 (UTC)
From:      =?UTF-8?Q?Fernando_Apestegu=c3=ada?= <fernape@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r363396 - head/usr.bin/netstat
Message-ID:  <202007211617.06LGHO5l081516@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: fernape (ports committer)
Date: Tue Jul 21 16:17:23 2020
New Revision: 363396
URL: https://svnweb.freebsd.org/changeset/base/363396

Log:
  netstat(1): Add EXAMPLES section
  
  * Add small EXAMPLES section
  * Fix warning reported by mandoc (./netstat.1:747:2: WARNING: skipping paragraph
    macro: Pp before Ss)
  
  Approved by:	manpages (gbe)
  Differential Revision: https://reviews.freebsd.org/D25212

Modified:
  head/usr.bin/netstat/netstat.1

Modified: head/usr.bin/netstat/netstat.1
==============================================================================
--- head/usr.bin/netstat/netstat.1	Tue Jul 21 15:03:36 2020	(r363395)
+++ head/usr.bin/netstat/netstat.1	Tue Jul 21 16:17:23 2020	(r363396)
@@ -28,7 +28,7 @@
 .\"	@(#)netstat.1	8.8 (Berkeley) 4/18/94
 .\" $FreeBSD$
 .\"
-.Dd March 22, 2018
+.Dd July 21, 2020
 .Dt NETSTAT 1
 .Os
 .Sh NAME
@@ -744,7 +744,6 @@ The flags field shows available ISR handlers:
 .It Li F Ta Dv NETISR_SNP_FLAGS_M2FLOW Ta "Able to map mbuf to flow id"
 .El
 .El
-.Pp
 .Ss GENERAL OPTIONS
 Some options have the general meaning:
 .Bl -tag -width flag
@@ -798,6 +797,28 @@ Normally
 attempts to resolve addresses and ports,
 and display them symbolically.
 .El
+.Sh EXAMPLES
+Show packet traffic information (packets, bytes, errors, packet drops, etc) for
+interface re0 updated every 2 seconds and exit after 5 outputs:
+.Bd -literal -offset indent
+$ netstat -w 2 -q 5 -I re0
+.Ed
+.Pp
+Show statistics for ICMP on any interface:
+.Bd -literal -offset indent
+$ netstat -s -p icmp
+.Ed
+.Pp
+Show routing tables:
+.Bd -literal -offset indent
+$ netstat -r
+.Ed
+.Pp
+Same as above, but without resolving numeric addresses and port numbers to
+names:
+.Bd -literal -offset indent
+$ netstat -rn
+.Ed
 .Sh SEE ALSO
 .Xr fstat 1 ,
 .Xr nfsstat 1 ,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007211617.06LGHO5l081516>