converted man page
[unix-history] / usr / src / usr.bin / netstat / netstat.1
index 9c54639..d03c65b 100644 (file)
@@ -1,75 +1,40 @@
-.\" Copyright (c) 1983 The Regents of the University of California.
+.\" Copyright (c) 1983, 1990 The Regents of the University of California.
 .\" All rights reserved.
 .\"
 .\" All rights reserved.
 .\"
-.\" Redistribution and use in source and binary forms are permitted
-.\" provided that the above copyright notice and this paragraph are
-.\" duplicated in all such forms and that any documentation,
-.\" advertising materials, and other materials related to such
-.\" distribution and use acknowledge that the software was developed
-.\" by the University of California, Berkeley.  The name of the
-.\" University may not 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 MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+.\" %sccs.include.redist.man%
 .\"
 .\"
-.\"    @(#)netstat.1   6.8 (Berkeley) %G%
+.\"     @(#)netstat.1  6.10 (Berkeley) %G%
 .\"
 .\"
-.TH NETSTAT 1 ""
-.UC 5
-.SH NAME
-netstat \- show network status
-.SH SYNOPSIS
-.B netstat
-[ 
-.B \-Aan
-] [
-.B \-f
-.I address_family
-] [
-.I system
-] [
-.I core
-]
-.br
-.B netstat
-[ 
-.B \-himnrs
-] [
-.B \-f
-.I address_family
-] [
-.I system
-] [
-.I core
-]
-.br
-.B netstat
-[ 
-.B \-n
-] [
-.B \-I
-.I interface
-]
-.I interval
-[
-.I system
-] [
-.I core
-]
-.br
-.B netstat
-[ 
-.B \-p
-.I protocol
-] [
-.I system
-] [
-.I core
-]
-.SH DESCRIPTION
+.Dd 
+.Dt NETSTAT 1
+.Os BSD 4.2
+.Sh NAME
+.Nm netstat
+.Nd show network status
+.Sh SYNOPSIS
+.Nm netstat
+.Op Fl Aan
+.Op Fl f Ar address_family
+.Op Ar system
+.Op Ar core
+.Nm netstat
+.Op Fl himnrs
+.Op Fl f Ar address_family
+.Op Ar system
+.Op Ar core
+.Nm netstat
+.Op Fl n
+.Op Fl I Op Ar interface
+.Ar interval
+.Op Ar system
+.Op Ar core
+.Nm netstat
+.Op Fl p Ar protocol
+.Op Ar system
+.Op Ar core
+.Sh DESCRIPTION
 The
 The
-.I netstat 
+.Nm netstat
 command symbolically displays the contents of various network-related
 data structures.
 There are a number of output formats,
 command symbolically displays the contents of various network-related
 data structures.
 There are a number of output formats,
@@ -78,100 +43,103 @@ 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 
-.I interval
+Using the third form, with an
+.Ar interval
 specified,
 specified,
-.I netstat
+.Nm netstat
 will continuously display the information regarding packet
 traffic on the configured network interfaces.
 The fourth form displays statistics about the named protocol.
 will continuously display the information regarding packet
 traffic on the configured network interfaces.
 The fourth form displays statistics about the named protocol.
-.PP
+.Pp
 The options have the following meaning:
 The options have the following meaning:
-.T
-.B \-A
+.Tw Fl
+.Tp 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
-.B \-a
+.Tp 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.
-.B \-d
+.Fl d
 With either interface display (option
 With either interface display (option
-.B \-i
+.Fl i
 or an interval, as described below),
 show the number of dropped packets.
 or an interval, as described below),
 show the number of dropped packets.
-.TP
-.B \-h
+.Tp Fl h
 Show the state of the IMP host table.
 Show the state of the IMP host table.
-.TP
-.B \-i
+.Tp 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
-.BI \-I " interface"
+.Tp Cx Fl I
+.Ws
+.Ar interface
+.Cx
 Show information only about this interface;
 used with an
 Show information only about this interface;
 used with an
-.I interval
+.Ar interval
 as described below.
 as described below.
-.TP
-.B \-m
+.Tp 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
-.B \-n
-Show network addresses as numbers (normally 
-.I netstat
+.Tp 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.
 interprets addresses and attempts to display them
 symbolically).
 This option may be used with any of the display formats.
-.TP
-.BI \-p " protocol"
-Show statistics about 
-.IR protocol ,
+.Tp Cx Fl p
+.Ws
+.Ar protocol
+.Cx
+Show statistics about
+.Ar protocol  ,
 which is either a well-known name for a protocol or an alias for it.  Some
 which is either a well-known name for a protocol or an alias for it.  Some
-protocol names and aliases are listed in the file 
-.IR /etc/protocols .
-A null response typically means that there are no interesting numbers to 
+protocol names and aliases are listed in the file
+.Pa /etc/protocols .
+A null response typically means that there are no interesting numbers to
 report.
 The program will complain if
 report.
 The program will complain if
-.I protocol
+.Ar protocol
 is unknown or if there is no statistics routine for it.
 is unknown or if there is no statistics routine for it.
-.TP
-.B \-s
+.Tp Fl s
 Show per-protocol statistics.
 Show per-protocol statistics.
-.TP
-.B \-r
+.Tp Fl r
 Show the routing tables.
 When
 Show the routing tables.
 When
-.B \-s
+.Fl s
 is also present, show routing statistics instead.
 is also present, show routing statistics instead.
-.TP
-.BI \-f " address_family"
+.Tp Cx Fl f
+.Ws
+.Ar address_family
+.Cx
 Limit statistics or address control block reports to those
 of the specified
 Limit statistics or address control block reports to those
 of the specified
-.IR address\ family .
+.Ar address family  .
 The following address families
 are recognized:
 The following address families
 are recognized:
-.IR inet ,
+.Ar inet  ,
 for
 for
-.BR AF_INET ,
-.IR ns ,
+.Li AF _INET  ,
+.Ar ns ,
 for
 for
-.BR AF_NS ,
+.Li AF _NS  ,
 and
 and
-.IR unix ,
+.Ar unix  ,
 for
 for
-.BR AF_UNIX .
-.PP
-The arguments, 
-.I system
+.Li AF _UNIX  .
+.Tp
+.Pp
+The arguments,
+.Ar system
 and
 and
-.I core
-allow substitutes for the defaults ``/vmunix'' and ``/dev/kmem''.
-.PP
+.Ar core
+allow substitutes for the defaults
+.Dq Pa vmunix
+and
+.Dq Pa /dev/kmem .
+.Pp
 The default display, for active sockets, shows the local
 and remote addresses, send and receive queue sizes (in bytes), protocol,
 and the internal state of the protocol.
 The default display, for active sockets, shows the local
 and remote addresses, send and receive queue sizes (in bytes), protocol,
 and the internal state of the protocol.
@@ -179,26 +147,26 @@ Address formats are of the form ``host.port'' or ``network.port''
 if a socket's address specifies a network but no specific host address.
 When known the host and network addresses are displayed symbolically
 according to the data bases
 if a socket's address specifies a network but no specific host address.
 When known the host and network addresses are displayed symbolically
 according to the data bases
-.I /etc/hosts
+.Pa /etc/hosts
 and
 and
-.IR /etc/networks ,
+.Pa /etc/networks ,
 respectively.  If a symbolic name for an address is unknown, or if
 respectively.  If a symbolic name for an address is unknown, or if
-the 
-.B \-n
+the
+.Fl n
 option is specified, the address is printed numerically, according
 to the address family.
 option is specified, the address is printed numerically, according
 to the address family.
-For more information regarding 
+For more information regarding
 the Internet ``dot format,''
 the Internet ``dot format,''
-refer to 
-.IR inet (3N).
+refer to
+.Xr inet 3 ) .
 Unspecified,
 Unspecified,
-or ``wildcard'', addresses and ports appear as ``*''.  
-.PP
+or ``wildcard'', addresses and ports appear as ``*''.
+.Pp
 The interface display provides a table of cumulative
 statistics regarding packets transferred, errors, and collisions.
 The network addresses of the interface
 and the maximum transmission unit (``mtu'') are also displayed.
 The interface display provides a table of cumulative
 statistics regarding packets transferred, errors, and collisions.
 The network addresses of the interface
 and the maximum transmission unit (``mtu'') are also displayed.
-.PP
+.Pp
 The routing table display indicates the available routes and
 their status.  Each route consists of a destination host or network
 and a gateway to use in forwarding packets.  The flags field shows
 The routing table display indicates the available routes and
 their status.  Each route consists of a destination host or network
 and a gateway to use in forwarding packets.  The flags field shows
@@ -216,11 +184,11 @@ to the same destination.
 The use field provides a count of the number of packets
 sent using that route.  The interface entry indicates the network
 interface utilized for the route.
 The use field provides a count of the number of packets
 sent using that route.  The interface entry indicates the network
 interface utilized for the route.
-.PP
-When 
-.I netstat
+.Pp
+When
+.Nm netstat
 is invoked with an
 is invoked with an
-.I interval
+.Ar interval
 argument, it displays a running count of statistics related to
 network interfaces.  This display consists of a
 column for the primary interface
 argument, it displays a running count of statistics related to
 network interfaces.  This display consists of a
 column for the primary interface
@@ -228,19 +196,22 @@ column for the primary interface
 and a column summarizing
 information for all interfaces.
 The primary interface may be replaced with another interface with the
 and a column summarizing
 information for all interfaces.
 The primary interface may be replaced with another interface with the
-.I \-I
+.Fl I
 option.
 The first line of each screen of information contains a summary since the
 system was last rebooted.  Subsequent lines of output show values
 accumulated over the preceding interval.
 option.
 The first line of each screen of information contains a summary since the
 system was last rebooted.  Subsequent lines of output show values
 accumulated over the preceding interval.
-.SH SEE ALSO
-iostat(1),
-vmstat(1),
-hosts(5),
-networks(5),
-protocols(5),
-services(5),
-trpt(8)
-.SH BUGS
+.Sh SEE ALSO
+.Xr iostat 1 ,
+.Xr vmstat 1 ,
+.Xr hosts 5 ,
+.Xr networks 5 ,
+.Xr protocols 5 ,
+.Xr services 5 ,
+.Xr trpt 8
+.Sh HISTORY
+.Nm Netstat
+appeared in 4.2 BSD.
+.Sh BUGS
 The notion of errors is ill-defined.  Collisions mean
 something else for the IMP.
 The notion of errors is ill-defined.  Collisions mean
 something else for the IMP.