1NETSTAT(1) 386BSD Reference Manual NETSTAT(1) 2 3NNAAMMEE 4 nneettssttaatt - show network status 5 6SSYYNNOOPPSSIISS 7 nneettssttaatt [--AAaann] [--ff _a_d_d_r_e_s_s__f_a_m_i_l_y] [_s_y_s_t_e_m] [_c_o_r_e] 8 nneettssttaatt [--hhiimmnnrrss] [--ff _a_d_d_r_e_s_s__f_a_m_i_l_y] [--MM _c_o_r_e] [--NN _s_y_s_t_e_m] 9 nneettssttaatt [--nn] [--II [_i_n_t_e_r_f_a_c_e]] [--MM _c_o_r_e] [--NN _s_y_s_t_e_m] [--ww _w_a_i_t] 10 nneettssttaatt [--pp _p_r_o_t_o_c_o_l] [--MM _c_o_r_e] [--NN _s_y_s_t_e_m] 11 12DDEESSCCRRIIPPTTIIOONN 13 The nneettssttaatt command symbolically displays the contents of various 14 network-related data structures. There are a number of output formats, 15 depending on the options for the information presented. The first form 16 of the command displays a list of active sockets for each protocol. The 17 second form presents the contents of one of the other network data 18 structures according to the option selected. Using the third form, with 19 a _w_a_i_t interval specified, nneettssttaatt will continuously display the 20 information regarding packet traffic on the configured network 21 interfaces. The fourth form displays statistics about the named 22 protocol. 23 24 The options have the following meaning: 25 26 --AA With the default display, show the address of any protocol control 27 blocks associated with sockets; used for debugging. 28 29 --aa With the default display, show the state of all sockets; normally 30 sockets used by server processes are not shown. 31 32 --dd With either interface display (option --ii or an interval, as 33 described below), show the number of dropped packets. 34 35 --hh Show the state of the IMP host table. 36 37 --ii Show the state of interfaces which have been auto-configured 38 (interfaces statically configured into a system, but not located at 39 boot time are not shown). 40 41 --II _i_n_t_e_r_f_a_c_e 42 Show information only about this interface; used with an _w_a_i_t 43 interval as described below. 44 45 --MM Extract values associated with the name list from the specified 46 core instead of the default /_d_e_v/_k_m_e_m. 47 48 --mm Show statistics recorded by the memory management routines (the 49 network manages a private pool of memory buffers). 50 51 --NN Extract the name list from the specified system instead of the 52 default /_v_m_u_n_i_x. 53 54 --nn Show network addresses as numbers (normally nneettssttaatt interprets 55 addresses and attempts to display them symbolically). This option 56 may be used with any of the display formats. 57 58 --pp _p_r_o_t_o_c_o_l 59 Show statistics about _p_r_o_t_o_c_o_l, which is either a well-known name 60 for a protocol or an alias for it. Some protocol names and aliases 61 are listed in the file /_e_t_c/_p_r_o_t_o_c_o_l_s. A null response typically 62 means that there are no interesting numbers to report. The program 63 will complain if _p_r_o_t_o_c_o_l is unknown or if there is no statistics 64 65 66 routine for it. 67 68 --ss Show per-protocol statistics. 69 70 --rr Show the routing tables. When --ss is also present, show routing 71 statistics instead. 72 73 --ff _a_d_d_r_e_s_s__f_a_m_i_l_y 74 Limit statistics or address control block reports to those of the 75 specified _a_d_d_r_e_s_s _f_a_m_i_l_y. The following address families are 76 recognized: _i_n_e_t, for AF_INET, _n_s, for AF_NS, and _u_n_i_x, for 77 AF_UNIX. 78 79 The default display, for active sockets, shows the local and remote 80 addresses, send and receive queue sizes (in bytes), protocol, and the 81 internal state of the protocol. Address formats are of the form 82 ``host.port'' or ``network.port'' if a socket's address specifies a 83 network but no specific host address. When known the host and network 84 addresses are displayed symbolically according to the data bases 85 /_e_t_c/_h_o_s_t_s and /_e_t_c/_n_e_t_w_o_r_k_s, respectively. If a symbolic name for an 86 address is unknown, or if the --nn option is specified, the address is 87 printed numerically, according to the address family. For more 88 information regarding the Internet ``dot format,'' refer to inet(3)). 89 Unspecified, or ``wildcard'', addresses and ports appear as ``*''. 90 91 The interface display provides a table of cumulative statistics regarding 92 packets transferred, errors, and collisions. The network addresses of 93 the interface and the maximum transmission unit (``mtu'') are also 94 displayed. 95 96 The routing table display indicates the available routes and their 97 status. Each route consists of a destination host or network and a 98 gateway to use in forwarding packets. The flags field shows the state of 99 the route (``U'' if ``up''), whether the route is to a gateway (``G''), 100 whether the route was created dynamically by a redirect (``D''), and 101 whether the route has been modified by a redirect (``M''). Direct routes 102 are created for each interface attached to the local host; the gateway 103 field for such entries shows the address of the outgoing interface. The 104 refcnt field gives the current number of active uses of the route. 105 Connection oriented protocols normally hold on to a single route for the 106 duration of a connection while connectionless protocols obtain a route 107 while sending to the same destination. The use field provides a count of 108 the number of packets sent using that route. The interface entry 109 indicates the network interface utilized for the route. 110 111 When nneettssttaatt is invoked with a _w_a_i_t interval argument, it displays a 112 running count of statistics related to network interfaces. This display 113 consists of a column for the primary interface (the first interface found 114 during autoconfiguration) and a column summarizing information for all 115 interfaces. The primary interface may be replaced with another interface 116 with the --II option. The first line of each screen of information 117 contains a summary since the system was last rebooted. Subsequent lines 118 of output show values accumulated over the preceding interval. 119 120SSEEEE AALLSSOO 121 iostat(1), nfsstat(1), ps(1), vmstat(1), hosts(5), networks(5), 122 protocols(5), services(5), trpt(8), trsp(8) 123 124HHIISSTTOORRYY 125 The nneettssttaatt command appeared in 4.2BSD. 126 127BBUUGGSS 128 The notion of errors is ill-defined. 129 130 Collisions mean something else for the IMP. 131 1324.2 Berkeley Distribution July 27, 1991 2 133