~ubuntu-branches/ubuntu/gutsy/net-snmp/gutsy-security

« back to all changes in this revision

Viewing changes to man/snmpnetstat.1

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2004-09-13 12:06:21 UTC
  • Revision ID: james.westby@ubuntu.com-20040913120621-g952ntonlleihcvm
Tags: upstream-5.1.1
ImportĀ upstreamĀ versionĀ 5.1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.\" Portions of this file are subject to the following copyright.  See
 
2
.\" the Net-SNMP's COPYING file for more details and other copyrights
 
3
.\" that may apply:
 
4
.\" /***********************************************************
 
5
.\"     Copyright 1989 by Carnegie Mellon University
 
6
.\" 
 
7
.\"                       All Rights Reserved
 
8
.\" 
 
9
.\" Permission to use, copy, modify, and distribute this software and its 
 
10
.\" documentation for any purpose and without fee is hereby granted, 
 
11
.\" provided that the above copyright notice appear in all copies and that
 
12
.\" both that copyright notice and this permission notice appear in 
 
13
.\" supporting documentation, and that the name of CMU not be
 
14
.\" used in advertising or publicity pertaining to distribution of the
 
15
.\" software without specific, written prior permission.  
 
16
.\" 
 
17
.\" CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
 
18
.\" ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
 
19
.\" CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
 
20
.\" ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
 
21
.\" WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
 
22
.\" ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
 
23
.\" SOFTWARE.
 
24
.\" ******************************************************************/
 
25
.\" Copyright (c) 1983 The Regents of the University of California.
 
26
.\" All rights reserved.
 
27
.\"
 
28
.\" Redistribution and use in source and binary forms are permitted
 
29
.\" provided that the above copyright notice and this paragraph are
 
30
.\" duplicated in all such forms and that any documentation,
 
31
.\" advertising materials, and other materials related to such
 
32
.\" distribution and use acknowledge that the software was developed
 
33
.\" by the University of California, Berkeley.  The name of the
 
34
.\" University may not be used to endorse or promote products derived
 
35
.\" from this software without specific prior written permission.
 
36
.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
 
37
.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 
38
.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 
39
.\"
 
40
.\"     @(#)netstat.1   6.8 (Berkeley) 9/20/88
 
41
.\"
 
42
.\" /***********************************************************
 
43
.\" Portions of this file are copyrighted by:
 
44
.\" Copyright Copyright 2003 Sun Microsystems, Inc. All rights reserved.
 
45
.\" Use is subject to license terms specified in the COPYING file
 
46
.\" distributed with the Net-SNMP package.
 
47
.\" ******************************************************************/
 
48
.TH SNMPNETSTAT 1 "25 Oct 2003" "" "Net-SNMP"
 
49
.UC 5
 
50
.SH NAME
 
51
snmpnetstat \- show network status using SNMP
 
52
.SH SYNOPSIS
 
53
snmpnetstat [common options] [-a] [-n] AGENT
 
54
.br
 
55
snmpnetstat [common options] [-iorns] AGENT
 
56
.br
 
57
snmpnetstat [common options] [-in] [-I interface] AGENT [interval]
 
58
.br
 
59
snmpnetstat [common options] [-an] [-s] [-P protocol] AGENT
 
60
.SH DESCRIPTION
 
61
The
 
62
.I snmpnetstat 
 
63
command symbolically displays the values of various network-related
 
64
information retrieved from a remote system using the SNMP protocol.
 
65
There are a number of output formats,
 
66
depending on the options for the information presented.
 
67
The first form of the command displays a list of active sockets.
 
68
The second form presents the values of other network-related
 
69
information according to the option selected.
 
70
Using the third form, with an 
 
71
.I interval
 
72
specified,
 
73
.I snmpnetstat
 
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
AGENT identifies a target SNMP agent, which is
 
79
instrumented to monitor the given objects.
 
80
At its simplest, the AGENT specification will
 
81
consist of a hostname or an IPv4 address. In this
 
82
situation, the command will attempt communication
 
83
with the agent, using UDP/IPv4 to port 161 of the
 
84
given target host. See snmpcmd(1) for a full list of
 
85
the possible formats for AGENT.
 
86
.PP
 
87
.SH OPTIONS
 
88
The options have the following meaning:
 
89
.PP
 
90
.B common options
 
91
 Please see
 
92
.I snmpcmd(1)
 
93
for a list of possible values for common options
 
94
as well as their descriptions.
 
95
.PP
 
96
.B \-a
 
97
With the default display,
 
98
show the state of all sockets; normally sockets used by
 
99
server processes are not shown.
 
100
.PP
 
101
.B \-i
 
102
Show the state of all of the network interfaces.
 
103
The  interface  display  provides  a  table  of cumulative
 
104
statistics regarding packets transferred, errors, and collisions.
 
105
The  network addresses of the interface and the maximum transmission 
 
106
unit (``mtu'') are also displayed.
 
107
.PP
 
108
.B \-o
 
109
Show an abbreviated interface status, giving octets in place of packets.
 
110
This is useful when enquiring virtual interfaces (such as Frame-Relay circuits)
 
111
on a router.
 
112
.PP
 
113
.BI \-I " interface"
 
114
Show information only about this interface;
 
115
used with an
 
116
.I interval
 
117
as described below.
 
118
.PP
 
119
.B \-n
 
120
Show network addresses as numbers (normally 
 
121
.I snmpnetstat
 
122
interprets addresses and attempts to display them
 
123
symbolically).
 
124
This option may be used with any of the display formats.
 
125
.PP
 
126
.BI \-P " protocol"
 
127
Show statistics about 
 
128
.IR protocol,
 
129
which is either a well-known name for a protocol or an alias for it.  Some
 
130
protocol names and aliases are listed in the file 
 
131
.IR /etc/protocols .
 
132
A null response typically means that there are no interesting numbers to 
 
133
report.
 
134
The program will complain if
 
135
.I protocol
 
136
is unknown or if there is no statistics routine for it.
 
137
.PP
 
138
.B \-s
 
139
Show per-protocol statistics.  When used with the
 
140
.B \-r
 
141
option, show routing statistics instead.
 
142
.PP
 
143
.B \-r
 
144
Show the routing tables.
 
145
When
 
146
.B \-s
 
147
is also present, show per-protocol routing statistics instead of 
 
148
the routing tables.
 
149
.PP
 
150
When  snmpnetstat is invoked with an interval argument, it
 
151
displays a running count of statistics related to  network
 
152
interfaces.
 
153
.I interval
 
154
is the number of seconds between
 
155
reporting of statistics.
 
156
.PP
 
157
.I The Active Sockets Display (default)
 
158
.PP
 
159
The default display, for active sockets, shows the local
 
160
and remote addresses, protocol, and the internal state  of
 
161
the   protocol.    Address   formats   are   of  the  form
 
162
``host.port'' or ``network.port'' if  a  socket's  address
 
163
specifies  a  network  but no specific host address.  When
 
164
known, the host and network addresses are displayed symbolically
 
165
according   to  the  data  bases 
 
166
.I /etc/hosts  and
 
167
.IR /etc/networks,
 
168
respectively.  If a symbolic  name  for  an
 
169
address  is unknown, or if the
 
170
.B \-n
 
171
option is specified, the
 
172
address is printed numerically, according to  the  address
 
173
family.  For more information regarding the Internet ``dot
 
174
format,'' refer  to
 
175
.IR inet(3N).
 
176
Unspecified,  or  ``wildcard'', addresses and ports appear as ``*''.
 
177
.PP
 
178
.I The Interface Display
 
179
.PP
 
180
The  interface  display  provides  a  table  of cumulative
 
181
statistics regarding packets transferred, errors, and col-
 
182
lisions.   The  network addresses of the interface and the
 
183
maximum transmission unit (``mtu'') are also displayed.
 
184
.PP
 
185
.I The Routing Table Display
 
186
.PP
 
187
The routing table display indicates the  available  routes
 
188
and  their  status.   Each route consists of a destination
 
189
host or network and a gateway to use in  forwarding  pack-
 
190
ets.   The flags field shows the state of the route (``U''
 
191
if ``up''), whether the route is  to  a  gateway  (``G''),
 
192
whether  the  route  was created dynamically by a redirect
 
193
(``D''), and whether the route  has  been  modified  by  a
 
194
redirect  (``M'').   Direct  routes  are  created for each
 
195
interface attached to the local host;  the  gateway  field
 
196
for  such entries shows the address of the outgoing inter-
 
197
face.  The interface entry indicates the network interface
 
198
utilized for the route.
 
199
.PP
 
200
.I The Interface Display with an Interval
 
201
.PP
 
202
When
 
203
.I snmpnetstat
 
204
is invoked with an
 
205
.I interval
 
206
argument, it
 
207
displays a running count of statistics related to  network
 
208
interfaces.   This  display  consists  of a column for the
 
209
primary interface and a column summarizing information for
 
210
all  interfaces.   The  primary  interface may be replaced
 
211
with another interface with the
 
212
.B \-I
 
213
option.  The first line
 
214
of each screen of information contains a summary since the
 
215
system was last rebooted.  Subsequent lines of output show
 
216
values accumulated over the preceding interval.
 
217
.PP
 
218
.I The Active Sockets Display for a 
 
219
.I Single Protocol
 
220
.PP
 
221
When a protocol is specified with the
 
222
.B \-P
 
223
option, the
 
224
information displayed is similar to that in the
 
225
default display for active sockets, except the
 
226
display is limited to the given protocol.
 
227
.SH EXAMPLES
 
228
Example of using snmpnetstat to displaly active sockets (default):
 
229
.PP
 
230
% snmpnetstat -v 2c -c public -a testhost
 
231
.PP
 
232
.nf
 
233
Active Internet (tcp) Connections (including servers)
 
234
Proto Local Address                Foreign Address                 (state)
 
235
tcp   *.echo                        *.*                            LISTEN
 
236
tcp   *.discard                     *.*                            LISTEN
 
237
tcp   *.daytime                     *.*                            LISTEN
 
238
tcp   *.chargen                     *.*                            LISTEN
 
239
tcp   *.ftp                         *.*                            LISTEN
 
240
tcp   *.telnet                      *.*                            LISTEN
 
241
tcp   *.smtp                        *.*                            LISTEN
 
242
...
 
243
 
 
244
Active Internet (udp) Connections
 
245
Proto Local Address
 
246
udp    *.echo
 
247
udp    *.discard
 
248
udp    *.daytime
 
249
udp    *.chargen
 
250
udp    *.time
 
251
...
 
252
.fi
 
253
.PP
 
254
% snmpnetstat -v 2c -c public -i testhost
 
255
.PP
 
256
.nf
 
257
Name     Mtu Network    Address          Ipkts   Ierrs    Opkts Oerrs Queue
 
258
eri0    1500 10.6.9/24  testhost     170548881  245601   687976     0    0
 
259
lo0     8232 127        localhost      7530982       0  7530982     0    0
 
260
.fi
 
261
.PP
 
262
Example of using snmpnetstat to show statistics about a specific protocol:
 
263
.PP
 
264
.nf
 
265
% snmpnetstat -v 2c -c public -P tcp testhost
 
266
 
 
267
Active Internet (tcp) Connections
 
268
Proto Local Address                Foreign Address                 (state)
 
269
tcp   *.echo                        *.*                            LISTEN
 
270
tcp   *.discard                     *.*                            LISTEN
 
271
tcp   *.daytime                     *.*                            LISTEN
 
272
tcp   *.chargen                     *.*                            LISTEN
 
273
tcp   *.ftp                         *.*                            LISTEN
 
274
tcp   *.telnet                      *.*                            LISTEN
 
275
tcp   *.smtp                        *.*                            LISTEN
 
276
...
 
277
.fi
 
278
.SH SEE ALSO
 
279
snmpcmd(1),
 
280
iostat(1),
 
281
vmstat(1),
 
282
hosts(5),
 
283
networks(5),
 
284
protocols(5),
 
285
services(5).
 
286
.SH BUGS
 
287
The notion of errors is ill-defined.