added files
[bcm963xx.git] / userapps / opensource / net-snmp / man / snmpnetstat.1
1 .\" /***********************************************************
2 .\"     Copyright 1989 by Carnegie Mellon University
3 .\" 
4 .\"                       All Rights Reserved
5 .\" 
6 .\" Permission to use, copy, modify, and distribute this software and its 
7 .\" documentation for any purpose and without fee is hereby granted, 
8 .\" provided that the above copyright notice appear in all copies and that
9 .\" both that copyright notice and this permission notice appear in 
10 .\" supporting documentation, and that the name of CMU not be
11 .\" used in advertising or publicity pertaining to distribution of the
12 .\" software without specific, written prior permission.  
13 .\" 
14 .\" CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
15 .\" ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
16 .\" CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
17 .\" ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
18 .\" WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
19 .\" ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
20 .\" SOFTWARE.
21 .\" ******************************************************************/
22 .\" Copyright (c) 1983 The Regents of the University of California.
23 .\" All rights reserved.
24 .\"
25 .\" Redistribution and use in source and binary forms are permitted
26 .\" provided that the above copyright notice and this paragraph are
27 .\" duplicated in all such forms and that any documentation,
28 .\" advertising materials, and other materials related to such
29 .\" distribution and use acknowledge that the software was developed
30 .\" by the University of California, Berkeley.  The name of the
31 .\" University may not be used to endorse or promote products derived
32 .\" from this software without specific prior written permission.
33 .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
34 .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
35 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
36 .\"
37 .\"     @(#)netstat.1   6.8 (Berkeley) 9/20/88
38 .\"
39 .TH SNMPNETSTAT 1 "21 Aug 2000" "" "Net-SNMP"
40 .UC 5
41 .SH NAME
42 snmpnetstat \- show network status using SNMP
43 .SH SYNOPSIS
44 snmpnetstat [common arguments] [-a] [-n] host
45 .br
46 snmpnetstat [common arguments] [-iors] [-n] host
47 .br
48 snmpnetstat [common arguments] [-i] [-n] [-I interface] host [interval]
49 .br
50 snmpnetstat [common arguments] [-a] [-n] [-P protocol] host
51 .SH DESCRIPTION
52 The
53 .I snmpnetstat 
54 command symbolically displays the values of various network-related
55 information retrieved from a remote system using the SNMP protocol.
56 There are a number of output formats,
57 depending on the options for the information presented.
58 The first form of the command displays a list of active sockets.
59 The second form presents the values of other network-related
60 information according to the option selected.
61 Using the third form, with an 
62 .I interval
63 specified,
64 .I snmpnetstat
65 will continuously display the information regarding packet
66 traffic on the configured network interfaces.
67 The fourth form displays statistics about the named protocol.
68 .PP
69 The
70 .I hostname
71 specification may be either a host name or an internet address
72 specified in "dot notation".
73 .PP
74 The version 1 and version 2c
75 .I community
76 specifies the community name for the transaction with the remote system.
77 .PP
78 The options have the following meaning:
79 .TP
80 .B \-a
81 With the default display,
82 show the state of all sockets; normally sockets used by
83 server processes are not shown.
84 .TP
85 .B \-i
86 Show the state of all of the interfaces.
87 .TP
88 .B \-o
89 Show an abbreviated interface status, giving octets in place of packets.
90 This is useful when enquiring virtual interfaces (such as Frame-Relay circuits)
91 on a Cisco router.
92 .TP
93 .BI \-I " interface"
94 Show information only about this interface;
95 used with an
96 .I interval
97 as described below.
98 .TP
99 .B \-n
100 Show network addresses as numbers (normally 
101 .I snmpnetstat
102 interprets addresses and attempts to display them
103 symbolically).
104 This option may be used with any of the display formats.
105 .TP
106 .BI \-P " protocol"
107 Show statistics about 
108 .IR protocol ,
109 which is either a well-known name for a protocol or an alias for it.  Some
110 protocol names and aliases are listed in the file 
111 .IR /etc/protocols .
112 A null response typically means that there are no interesting numbers to 
113 report.
114 The program will complain if
115 .I protocol
116 is unknown or if there is no statistics routine for it.
117 .TP
118 .B \-s
119 Show per-protocol statistics.
120 .TP
121 .B \-r
122 Show the routing tables.
123 When
124 .B \-s
125 is also present, show routing statistics instead.
126 .PP
127 The default display, for active sockets, shows the local
128 and remote addresses, protocol,
129 and the internal state of the protocol.
130 Address formats are of the form ``host.port'' or ``network.port''
131 if a socket's address specifies a network but no specific host address.
132 When known the host and network addresses are displayed symbolically
133 according to the data bases
134 .I /etc/hosts
135 and
136 .IR /etc/networks ,
137 respectively.  If a symbolic name for an address is unknown, or if
138 the 
139 .B \-n
140 option is specified, the address is printed numerically, according
141 to the address family.
142 For more information regarding 
143 the Internet ``dot format,''
144 refer to 
145 .IR inet (3N).
146 Unspecified,
147 or ``wildcard'', addresses and ports appear as ``*''.  
148 .PP
149 The interface display provides a table of cumulative
150 statistics regarding packets transferred, errors, and collisions.
151 The network addresses of the interface
152 and the maximum transmission unit (``mtu'') are also displayed.
153 .PP
154 The routing table display indicates the available routes and
155 their status.  Each route consists of a destination host or network
156 and a gateway to use in forwarding packets.  The flags field shows
157 the state of the route (``U'' if ``up''), whether the route
158 is to a gateway (``G''), whether the route was created dynamically
159 by a redirect (``D''), and whether the route has been modified
160 by a redirect (``M'').  Direct routes are created for each
161 interface attached to the local host;
162 the gateway field for such entries shows the address of the outgoing interface.
163 The interface entry indicates the network
164 interface utilized for the route.
165 .PP
166 When 
167 .I snmpnetstat
168 is invoked with an
169 .I interval
170 argument, it displays a running count of statistics related to
171 network interfaces.  This display consists of a
172 column for the primary interface
173 and a column summarizing
174 information for all interfaces.
175 The primary interface may be replaced with another interface with the
176 .I \-I
177 option.
178 The first line of each screen of information contains a summary since the
179 system was last rebooted.  Subsequent lines of output show values
180 accumulated over the preceding interval.
181 .SH SEE ALSO
182 snmpcmd(1),
183 iostat(1),
184 vmstat(1),
185 hosts(5),
186 networks(5),
187 protocols(5),
188 services(5).
189 .SH BUGS
190 The notion of errors is ill-defined.