X-Git-Url: https://git.saurik.com/apple/network_cmds.git/blobdiff_plain/9c85944734ab4cd947deae99764347f7e8378776..f1dee6ae4f09d06db1e14c8be5091eb1b0d7347b:/netstat.tproj/netstat.1 diff --git a/netstat.tproj/netstat.1 b/netstat.tproj/netstat.1 index 1b07b60..61ab843 100644 --- a/netstat.tproj/netstat.1 +++ b/netstat.tproj/netstat.1 @@ -1,3 +1,29 @@ +.\" Copyright (c) 2015 Apple Inc. All rights reserved. +.\" +.\" @APPLE_OSREFERENCE_LICENSE_HEADER_START@ +.\" +.\" This file contains Original Code and/or Modifications of Original Code +.\" as defined in and that are subject to the Apple Public Source License +.\" Version 2.0 (the 'License'). You may not use this file except in +.\" compliance with the License. The rights granted to you under the License +.\" may not be used to create, or enable the creation or redistribution of, +.\" unlawful or unlicensed copies of an Apple operating system, or to +.\" circumvent, violate, or enable the circumvention or violation of, any +.\" terms of an Apple operating system software license agreement. +.\" +.\" Please obtain a copy of the License at +.\" http://www.opensource.apple.com/apsl/ and read it before using this file. +.\" +.\" The Original Code and all software distributed under the License are +.\" distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER +.\" EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, +.\" INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, +.\" FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. +.\" Please see the License for the specific language governing rights and +.\" limitations under the License. +.\" +.\" @APPLE_OSREFERENCE_LICENSE_HEADER_END@ +.\" .\" Copyright (c) 1983, 1990, 1992, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -44,11 +70,14 @@ .Op Fl f Ar address_family | Fl p Ar protocol .Nm .Op Fl gilns +.Op Fl v .Op Fl f Ar address_family +.Op Fl I Ar interface .Nm .Fl i | I Ar interface .Op Fl w Ar wait -.Op Fl abdgt +.Op Fl c Ar queue +.Op Fl abdgqRtS .Nm .Fl s Op Fl s .Op Fl f Ar address_family | Fl p Ar protocol @@ -93,7 +122,7 @@ The options have the following meaning: .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. +sockets and the flow hash; used for debugging. .It Fl a With the default display, show the state of all sockets; normally sockets used by server processes are not shown. With the routing table display (option @@ -105,6 +134,11 @@ parent route); normally these routes are not shown. With the interface display (option .Fl i , as described below), show the number of bytes in and out. +.It Fl c Ar queue +With the queue statistics (option +.Fl q , +as described below), show only those for the specified +.Ar queue . .It Fl d With either interface display (option .Fl i @@ -124,10 +158,19 @@ and for .Dv AF_UNIX . .It Fl g -Show information related to multicast (group address) routing. By default, show the -IP Multicast virtual-interface and routing tables. If the +Show information related to multicast (group address) membership. If the .Fl s -option is also present, show multicast routing statistics. +option is also present, show extended interface group management statistics. If the +.Fl v +option is specified, show link-layer memberships; they are suppressed by default. +Source lists for each group will also be printed. Specifiying +.Fl v +twice will print the control plane timers for each interface and the source list counters +for each group. If the +.Fl i +is specified, only that interface will be shown. If the +.Fl f +is specified, only information for the address family will be displayed. .It Fl I Ar interface Show information about the specified interface; used with a .Ar wait @@ -185,6 +228,18 @@ is used to show bridging statistics. A null response typically means that there no interesting numbers to report. The program will complain if .Ar protocol is unknown or if there is no statistics routine for it. +.It Fl q +Show network interface send queue statistics. By default all queues are displayed, unless +specified with +.Fl c . +This option requires specifying an interface with +.Fl I +option. More detailed information about the queues, which includes their queueing algorithm related statistics, can be obtained by using +.Fl qq +or +.Fl q +.Fl q +option. .It Fl r Show the routing tables. Use with .Fl a @@ -194,12 +249,30 @@ is also present, show routing statistics instead. When .Fl l is also present, .Nm -assumes more columns are there and the maximum transmission unit +assumes more columns are there and the maximum transmission unit. +More detailed information about the route metrics are displayed with +.Fl ll +for TCP round trip times +.Fl lll +for all metrics. +Use the +.Fl z +flags to display only entries with non-zero RTT values. .Pq Dq mtu are also displayed. +.It Fl R +Show reachability information. Use with +.Fl i +to show link-layer reachability information for a given interface. .It Fl s Show per-protocol statistics. If this option is repeated, counters with a value of -zero are suppressed. +zero are suppressed. For security reasons, root privileges are required to read TCP statistics and in the absence of such privileges all TCP counters will be reported as zero. +.It Fl S +Show interface link status and interface state information about the specified interface. This option requires specifying an interface with +.Fl I +option. +.It Fl v +Increase verbosity level. .It Fl W In certain displays, avoid truncating addresses even if this causes some fields to overflow. @@ -207,6 +280,11 @@ overflow. Show network interface or protocol statistics at intervals of .Ar wait seconds. +.It Fl x +Show extended link-layer reachability information in addition to that shown by +the +.Fl R +flag. .El .Pp .\"------------------------------------------------------------------------------- @@ -306,14 +384,17 @@ D RTF_DYNAMIC Created dynamically (by redirect) G RTF_GATEWAY Destination requires forwarding by intermediary H RTF_HOST Host entry (net otherwise) I RTF_IFSCOPE Route is associated with an interface scope +i RTF_IFREF Route is holding a reference to the interface L RTF_LLINFO Valid protocol to link address translation M RTF_MODIFIED Modified dynamically (by redirect) m RTF_MULTICAST The route represents a multicast address R RTF_REJECT Host or net unreachable +r RTF_ROUTER Host is a default router S RTF_STATIC Manually added U RTF_UP Route usable W RTF_WASCLONED Route was generated as a result of cloning X RTF_XRESOLVE External daemon translates proto to link address +Y RTF_PROXY Proxying; cloned routes will not be scoped .El .Pp Direct routes are created for each interface attached to the local host; @@ -325,7 +406,9 @@ obtain a route while sending 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. A route which is marked with the RTF_IFSCOPE flag is instantiated for -the corresponding interface. +the corresponding interface. A cloning route which is marked with the +RTF_PROXY flag will not generate new routes that are associated +with its interface scope. .Pp When .Nm netstat @@ -341,10 +424,8 @@ interfaces. Information for a specific interface may be displayed with the .Fl I option. .Sh SEE ALSO -.Xr fstat 1 , .Xr nfsstat 1 , .Xr ps 1 , -.Xr sockstat 1 , .Xr inet 4 , .Xr unix 4 , .Xr hosts 5 , @@ -353,8 +434,6 @@ option. .Xr route 8 , .Xr services 5 , .Xr iostat 8 , -.Xr trpt 8 , -.Xr vmstat 8 .Sh HISTORY The .Nm netstat