|
|
1.1 ! root 1: .\" Copyright (c) 1983 Regents of the University of California. ! 2: .\" All rights reserved. The Berkeley software License Agreement ! 3: .\" specifies the terms and conditions for redistribution. ! 4: .\" ! 5: .\" @(#)netstat.1 6.7 (Berkeley) 5/14/88 ! 6: .\" ! 7: .TH NETSTAT 1 "May 14, 1988" ! 8: .UC 5 ! 9: .SH NAME ! 10: netstat \- show network status ! 11: .SH SYNOPSIS ! 12: .B netstat ! 13: [ ! 14: .B \-Aan ! 15: ] [ ! 16: .B \-f ! 17: .I address_family ! 18: ] [ ! 19: .I system ! 20: ] [ ! 21: .I core ! 22: ] ! 23: .br ! 24: .B netstat ! 25: [ ! 26: .B \-himnrs ! 27: ] [ ! 28: .B \-f ! 29: .I address_family ! 30: ] [ ! 31: .I system ! 32: ] [ ! 33: .I core ! 34: ] ! 35: .br ! 36: .B netstat ! 37: [ ! 38: .B \-n ! 39: ] [ ! 40: .B \-I ! 41: .I interface ! 42: ] ! 43: .I interval ! 44: [ ! 45: .I system ! 46: ] [ ! 47: .I core ! 48: ] ! 49: .br ! 50: .B netstat ! 51: [ ! 52: .B \-p ! 53: .I protocol ! 54: ] [ ! 55: .I system ! 56: ] [ ! 57: .I core ! 58: ] ! 59: .SH DESCRIPTION ! 60: The ! 61: .I netstat ! 62: command symbolically displays the contents of various network-related ! 63: data structures. ! 64: There are a number of output formats, ! 65: depending on the options for the information presented. ! 66: The first form of the command displays a list of active sockets for ! 67: each protocol. ! 68: The second form presents the contents of one of the other network ! 69: data structures according to the option selected. ! 70: Using the third form, with an ! 71: .I interval ! 72: specified, ! 73: .I netstat ! 74: will continuously display the information regarding packet ! 75: traffic on the configured network interfaces. ! 76: The fourth form displays statistics about the named protocol. ! 77: .PP ! 78: The options have the following meaning: ! 79: .TP ! 80: .B \-A ! 81: With the default display, ! 82: show the address of any protocol control blocks associated with sockets; used ! 83: for debugging. ! 84: .TP ! 85: .B \-a ! 86: With the default display, ! 87: show the state of all sockets; normally sockets used by ! 88: server processes are not shown. ! 89: .B \-d ! 90: With either interface display (option ! 91: .B \-i ! 92: or an interval, as described below), ! 93: show the number of dropped packets. ! 94: .TP ! 95: .B \-h ! 96: Show the state of the IMP host table. ! 97: .TP ! 98: .B \-i ! 99: Show the state of interfaces which have been auto-configured ! 100: (interfaces statically configured into a system, but not ! 101: located at boot time are not shown). ! 102: .TP ! 103: .BI \-I " interface" ! 104: Show information only about this interface; ! 105: used with an ! 106: .I interval ! 107: as described below. ! 108: .TP ! 109: .B \-m ! 110: Show statistics recorded by the memory management routines ! 111: (the network manages a private pool of memory buffers). ! 112: .TP ! 113: .B \-n ! 114: Show network addresses as numbers (normally ! 115: .I netstat ! 116: interprets addresses and attempts to display them ! 117: symbolically). ! 118: This option may be used with any of the display formats. ! 119: .TP ! 120: .BI \-p " protocol" ! 121: Show statistics about ! 122: .IR protocol , ! 123: which is either a well-known name for a protocol or an alias for it. Some ! 124: protocol names and aliases are listed in the file ! 125: .IR /etc/protocols . ! 126: A null response typically means that there are no interesting numbers to ! 127: report. ! 128: The program will complain if ! 129: .I protocol ! 130: is unknown or if there is no statistics routine for it. ! 131: .TP ! 132: .B \-s ! 133: Show per-protocol statistics. ! 134: .TP ! 135: .B \-r ! 136: Show the routing tables. ! 137: When ! 138: .B \-s ! 139: is also present, show routing statistics instead. ! 140: .TP ! 141: .BI \-f " address_family" ! 142: Limit statistics or address control block reports to those ! 143: of the specified ! 144: .IR address\ family . ! 145: The following address families ! 146: are recognized: ! 147: .IR inet , ! 148: for ! 149: .BR AF_INET , ! 150: .IR ns , ! 151: for ! 152: .BR AF_NS , ! 153: and ! 154: .IR unix , ! 155: for ! 156: .BR AF_UNIX . ! 157: .PP ! 158: The arguments, ! 159: .I system ! 160: and ! 161: .I core ! 162: allow substitutes for the defaults ``/vmunix'' and ``/dev/kmem''. ! 163: .PP ! 164: The default display, for active sockets, shows the local ! 165: and remote addresses, send and receive queue sizes (in bytes), protocol, ! 166: and the internal state of the protocol. ! 167: Address formats are of the form ``host.port'' or ``network.port'' ! 168: if a socket's address specifies a network but no specific host address. ! 169: When known the host and network addresses are displayed symbolically ! 170: according to the data bases ! 171: .I /etc/hosts ! 172: and ! 173: .IR /etc/networks , ! 174: respectively. If a symbolic name for an address is unknown, or if ! 175: the ! 176: .B \-n ! 177: option is specified, the address is printed numerically, according ! 178: to the address family. ! 179: For more information regarding ! 180: the Internet ``dot format,'' ! 181: refer to ! 182: .IR inet (3N). ! 183: Unspecified, ! 184: or ``wildcard'', addresses and ports appear as ``*''. ! 185: .PP ! 186: The interface display provides a table of cumulative ! 187: statistics regarding packets transferred, errors, and collisions. ! 188: The network addresses of the interface ! 189: and the maximum transmission unit (``mtu'') are also displayed. ! 190: .PP ! 191: The routing table display indicates the available routes and ! 192: their status. Each route consists of a destination host or network ! 193: and a gateway to use in forwarding packets. The flags field shows ! 194: the state of the route (``U'' if ``up''), whether the route ! 195: is to a gateway (``G''), whether the route was created dynamically ! 196: by a redirect (``D''), and whether the route has been modified ! 197: by a redirect (``M''). Direct routes are created for each ! 198: interface attached to the local host; ! 199: the gateway field for such entries shows the address of the outgoing interface. ! 200: The refcnt field gives the ! 201: current number of active uses of the route. Connection oriented ! 202: protocols normally hold on to a single route for the duration of ! 203: a connection while connectionless protocols obtain a route while sending ! 204: to the same destination. ! 205: The use field provides a count of the number of packets ! 206: sent using that route. The interface entry indicates the network ! 207: interface utilized for the route. ! 208: .PP ! 209: When ! 210: .I netstat ! 211: is invoked with an ! 212: .I interval ! 213: argument, it displays a running count of statistics related to ! 214: network interfaces. This display consists of a ! 215: column for the primary interface ! 216: (the first interface found during autoconfiguration) ! 217: and a column summarizing ! 218: information for all interfaces. ! 219: The primary interface may be replaced with another interface with the ! 220: .I \-I ! 221: option. ! 222: The first line of each screen of information contains a summary since the ! 223: system was last rebooted. Subsequent lines of output show values ! 224: accumulated over the preceding interval. ! 225: .SH SEE ALSO ! 226: iostat(1), ! 227: vmstat(1), ! 228: hosts(5), ! 229: networks(5), ! 230: protocols(5), ! 231: services(5), ! 232: trpt(8C) ! 233: .SH BUGS ! 234: The notion of errors is ill-defined. Collisions mean ! 235: something else for the IMP.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.