BSD 4_4 release
[unix-history] / usr / src / usr.bin / netstat / netstat.1
index 683a0ca..84590e5 100644 (file)
@@ -1,23 +1,37 @@
-.\" Copyright (c) 1983, 1990 The Regents of the University of California.
-.\" All rights reserved.
+.\" Copyright (c) 1983, 1990, 1992, 1993
+.\"    The Regents of the University of California.  All rights reserved.
 .\"
 .\"
-.\" Redistribution and use in source and binary forms are permitted provided
-.\" that: (1) source distributions retain this entire copyright notice and
-.\" comment, and (2) distributions including binaries display the following
-.\" acknowledgement:  ``This product includes software developed by the
-.\" University of California, Berkeley and its contributors'' in the
-.\" documentation or other materials provided with the distribution and in
-.\" all advertising materials mentioning features or use of this software.
-.\" Neither the name of the University nor the names of its contributors may
-.\" be used to endorse or promote products derived from this software without
-.\" specific prior written permission.
-.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
-.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"    This product includes software developed by the University of
+.\"    California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
 .\"
 .\"
-.\"     @(#)netstat.1  6.11 (Berkeley) 7/24/90
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
 .\"
 .\"
-.Dd July 24, 1990
+.\"    @(#)netstat.1   8.1 (Berkeley) 6/12/93
+.\"
+.Dd June 12, 1993
 .Dt NETSTAT 1
 .Os BSD 4.2
 .Sh NAME
 .Dt NETSTAT 1
 .Os BSD 4.2
 .Sh NAME
 .Nd show network status
 .Sh SYNOPSIS
 .Nm netstat
 .Nd show network status
 .Sh SYNOPSIS
 .Nm netstat
-.Op Fl Aan
+.Op Fl ABan
 .Op Fl f Ar address_family
 .Op Ar system
 .Op Ar core
 .Nm netstat
 .Op Fl f Ar address_family
 .Op Ar system
 .Op Ar core
 .Nm netstat
-.Op Fl himnrs
+.Op Fl Bimnrs
 .Op Fl f Ar address_family
 .Op Fl f Ar address_family
-.Op Ar system
-.Op Ar core
+.Op Fl M Ar core
+.Op Fl N Ar system
 .Nm netstat
 .Op Fl n
 .Op Fl I Op Ar interface
 .Nm netstat
 .Op Fl n
 .Op Fl I Op Ar interface
-.Ar interval
-.Op Ar system
-.Op Ar core
+.Op Fl M Ar core
+.Op Fl N Ar system
+.Op Fl w Ar wait
 .Nm netstat
 .Op Fl p Ar protocol
 .Nm netstat
 .Op Fl p Ar protocol
-.Op Ar system
-.Op Ar core
+.Op Fl M Ar core
+.Op Fl N Ar system
 .Sh DESCRIPTION
 The
 .Nm netstat
 .Sh DESCRIPTION
 The
 .Nm netstat
@@ -55,56 +69,61 @@ The first form of the command displays a list of active sockets for
 each protocol.
 The second form presents the contents of one of the other network
 data structures according to the option selected.
 each protocol.
 The second form presents the contents of one of the other network
 data structures according to the option selected.
-Using the third form, with an
-.Ar interval
-specified,
+Using the third form, with a
+.Ar wait
+interval specified,
 .Nm netstat
 will continuously display the information regarding packet
 traffic on the configured network interfaces.
 The fourth form displays statistics about the named protocol.
 .Pp
 The options have the following meaning:
 .Nm netstat
 will continuously display the information regarding packet
 traffic on the configured network interfaces.
 The fourth form displays statistics about the named protocol.
 .Pp
 The options have the following meaning:
-.Tw Fl
-.Tp Fl A
+.Bl -tag -width flag
+.It Fl A
 With the default display,
 show the address of any protocol control blocks associated with sockets; used
 for debugging.
 With the default display,
 show the address of any protocol control blocks associated with sockets; used
 for debugging.
-.Tp Fl a
+.It Fl B
+With the default display,
+show the multicast routing tables.
+When
+.Fl s
+is also present, show multicast routing statistics instead.
+.It Fl a
 With the default display,
 show the state of all sockets; normally sockets used by
 server processes are not shown.
 With the default display,
 show the state of all sockets; normally sockets used by
 server processes are not shown.
-.Tp Fl d
+.It Fl d
 With either interface display (option
 .Fl i
 or an interval, as described below),
 show the number of dropped packets.
 With either interface display (option
 .Fl i
 or an interval, as described below),
 show the number of dropped packets.
-.Tp Fl h
-Show the state of the IMP host table.
-.Tp Fl i
+.It Fl i
 Show the state of interfaces which have been auto-configured
 (interfaces statically configured into a system, but not
 located at boot time are not shown).
 Show the state of interfaces which have been auto-configured
 (interfaces statically configured into a system, but not
 located at boot time are not shown).
-.Tp Cx Fl I
-.Ws
-.Ar interface
-.Cx
+.It Fl I Ar interface
 Show information only about this interface;
 used with an
 Show information only about this interface;
 used with an
-.Ar interval
-as described below.
-.Tp Fl m
+.Ar wait
+interval as described below.
+.It Fl M
+Extract values associated with the name list from the specified core
+instead of the default
+.Pa /dev/kmem .
+.It Fl m
 Show statistics recorded by the memory management routines
 (the network manages a private pool of memory buffers).
 Show statistics recorded by the memory management routines
 (the network manages a private pool of memory buffers).
-.Tp Fl n
+.It Fl N
+Extract the name list from the specified system instead of the default
+.Pa /vmunix .
+.It Fl n
 Show network addresses as numbers (normally
 .Nm netstat
 interprets addresses and attempts to display them
 symbolically).
 This option may be used with any of the display formats.
 Show network addresses as numbers (normally
 .Nm netstat
 interprets addresses and attempts to display them
 symbolically).
 This option may be used with any of the display formats.
-.Tp Cx Fl p
-.Ws
-.Ar protocol
-.Cx
+.It Fl p Ar protocol
 Show statistics about
 .Ar protocol  ,
 which is either a well-known name for a protocol or an alias for it.  Some
 Show statistics about
 .Ar protocol  ,
 which is either a well-known name for a protocol or an alias for it.  Some
@@ -115,17 +134,14 @@ report.
 The program will complain if
 .Ar protocol
 is unknown or if there is no statistics routine for it.
 The program will complain if
 .Ar protocol
 is unknown or if there is no statistics routine for it.
-.Tp Fl s
+.It Fl s
 Show per-protocol statistics.
 Show per-protocol statistics.
-.Tp Fl r
+.It Fl r
 Show the routing tables.
 When
 .Fl s
 is also present, show routing statistics instead.
 Show the routing tables.
 When
 .Fl s
 is also present, show routing statistics instead.
-.Tp Cx Fl f
-.Ws
-.Ar address_family
-.Cx
+.It Fl f Ar address_family
 Limit statistics or address control block reports to those
 of the specified
 .Ar address family  .
 Limit statistics or address control block reports to those
 of the specified
 .Ar address family  .
@@ -133,24 +149,15 @@ The following address families
 are recognized:
 .Ar inet  ,
 for
 are recognized:
 .Ar inet  ,
 for
-.Li AF_INET  ,
+.Dv AF_INET  ,
 .Ar ns ,
 for
 .Ar ns ,
 for
-.Li AF_NS  ,
+.Dv AF_NS  ,
 and
 .Ar unix  ,
 for
 and
 .Ar unix  ,
 for
-.Li AF_UNIX  .
-.Tp
-.Pp
-The arguments,
-.Ar system
-and
-.Ar core
-allow substitutes for the defaults
-.Dq Pa vmunix
-and
-.Dq Pa /dev/kmem .
+.Dv AF_UNIX  .
+.El
 .Pp
 The default display, for active sockets, shows the local
 and remote addresses, send and receive queue sizes (in bytes), protocol,
 .Pp
 The default display, for active sockets, shows the local
 and remote addresses, send and receive queue sizes (in bytes), protocol,
@@ -199,13 +206,12 @@ interface utilized for the route.
 .Pp
 When
 .Nm netstat
 .Pp
 When
 .Nm netstat
-is invoked with an
-.Ar interval
-argument, it displays a running count of statistics related to
-network interfaces.  This display consists of a
-column for the primary interface
-(the first interface found during autoconfiguration)
-and a column summarizing
+is invoked with a
+.Ar wait
+interval argument, it displays a running count of statistics related to
+network interfaces.
+This display consists of a column for the primary interface (the first
+interface found during autoconfiguration) and a column summarizing
 information for all interfaces.
 The primary interface may be replaced with another interface with the
 .Fl I
 information for all interfaces.
 The primary interface may be replaced with another interface with the
 .Fl I
@@ -215,15 +221,29 @@ system was last rebooted.  Subsequent lines of output show values
 accumulated over the preceding interval.
 .Sh SEE ALSO
 .Xr iostat 1 ,
 accumulated over the preceding interval.
 .Sh SEE ALSO
 .Xr iostat 1 ,
+.Xr nfsstat 1 ,
+.Xr ps 1 ,
 .Xr vmstat 1 ,
 .Xr hosts 5 ,
 .Xr networks 5 ,
 .Xr protocols 5 ,
 .Xr services 5 ,
 .Xr vmstat 1 ,
 .Xr hosts 5 ,
 .Xr networks 5 ,
 .Xr protocols 5 ,
 .Xr services 5 ,
-.Xr trpt 8
+.Xr trpt 8 ,
+.Xr trsp 8
 .Sh HISTORY
 .Sh HISTORY
-.Nm Netstat
-appeared in 4.2 BSD.
+The
+.Nm netstat
+command appeared in
+.Bx 4.2 .
+.\" .Sh FILES
+.\" .Bl -tag -width /dev/kmem -compact
+.\" .It Pa /vmunix
+.\" default kernel namelist
+.\" .It Pa /dev/kmem
+.\" default memory file
+.\" .El
 .Sh BUGS
 .Sh BUGS
-The notion of errors is ill-defined.  Collisions mean
-something else for the IMP.
+The notion of errors is ill-defined.
+.Pp
+Collisions mean something else for the
+.Tn IMP .