snmpstat(1Msnmp)


snmpstat -- show network status using SNMP

Synopsis

snmpstat [-a | -i | -r | -s | -S | -t] [-n] [-T timeout] [entity_addr] [community_string]

Description

The snmpstat command displays the contents of various network-related Simple Network Management Protocol (SNMP) data structures.

Each of the -airsSt options displays a different structure; these options cannot be used together. By default, snmpstat displays address information symbolically. Combine the -n option with another option to display address information numerically.

The entity_addr can be either an IP address or an entity name (if name-to-address resolution is enabled). If not supplied, this defaults to the symbolic name localhost, which refers to the machine on which the command is executed.

The community_string is a string used to gain access to the SNMP agent on the given entity_addr. If not supplied, this defaults to the community string public. On UnixWare, community strings are kept in /etc/netmgt/snmpd.comm.

If no options are specified on the command line, then the transport endpoint table is displayed (the -t option), but with no server endpoints in the displayed table.

Options

The options have the following meanings:

-a
show the address translation table

-i
show the status of active interfaces

-n
display addresses and port numbers numerically instead of symbolically

-r
show the routing table

-s
show the variables comprising the system group of the MIB

-S
show the SNMP status

-t
show the complete transport endpoint table

-T timeout
specify a different number of seconds for the command to wait for a response
By default, getid waits 20 seconds for a response from the entity specified by entity_addr. Use the -T timeout option to specify a different number of seconds for the command to wait for a response.

There are a number of display formats, depending on the information presented.

Address translation display (-a)

The address translation display indicates the current knowledge regarding address translations for remote hosts with which communication has recently occurred. Entries in the address translation table consist of a host address, its physical address (typically an Ethernet address), and the name of the interface for which this translation is valid.

Using this option to snmpstat displays the same information as

getmany entity_addr community_string atTable

though in a more understandable format.

Interface display (-i)

The interface display provides a table of cumulative statistics regarding packets transferred, errors, and queue lengths. The name address and mtu (maximum transmission unit) of the interface are also displayed.

Using this option to snmpstat displays the same information as

getmany entity_addr community_string ifTable

though in a more understandable format.

Routing table display (-r)

The routing table display indicates the available routes and their status. Each route consists of a destination host or network and a gateway to use in forwarding packets. The ``metric'' field shows the metric associated with the route. The ``type'' field displays what kind of route this is, whether for a directly connected network or a remote network, and so on. The ``proto'' field indicates the mechanism by which the route was learned. The ``interface'' field shows the name of the interface with which this route is associated. The ``type'' and ``proto'' fields are displayed symbolically.

Using this option to snmpstat displays the same information as

getmany entity_addr community_string ipRouteTable

though in a more understandable format.

System display (-s)

The system display contains the description of the entity being managed, the object identifier describing the management subsystem on the entity, and the duration of time since the management subsystem was re-initialized, and other system group statistics.

Using this option to snmpstat displays the same information as

getmany entity_addr community_string system

though in a more understandable format.

SNMP statistics (-S)

The SNMP display contains a number of statistics for packets received and sent by the SNMP agent. For incoming packets, this includes the number of packets, packet errors, commands received within packets, and traps received. For outgoing packets, this includes the number of packets sent, packet errors, commands sent within packets, traps sent, and whether or not sending SNMP traps is currently enabled.

Using this option to snmpstat displays the same information as

getmany entity_addr community_string snmp

though in a more understandable format.

Transport endpoint display (-t)

By default, active transport endpoints are displayed. The -t flag is used to display all transport endpoints including servers. Active transport endpoints are those whose local address portions have been set to a specific address. The protocol, local and remote address, and the internal state of the protocol (if applicable) are shown.

Address formats are of the form host.port or network.port if an endpoint's address specifies a network but no specific host address. If the -n flag is not used, the host and network addresses and port numbers are displayed symbolically according to the data bases /etc/hosts, /etc/networks, and /etc/services, respectively. If a symbolic name for an address is unknown or if the -n flag has been used, the address is printed in the Internet dot notation. Unspecified or ``wildcard'' addresses and ports appear as ``*''.

Using this option to snmpstat displays the same information as

getmany entity_addr community_string tcpConnTable
getmany entity_addr community_string udpTable

though in a more understandable format.

References

getid(1Msnmp), getroute(1Msnmp), hosts(4tcp), networks(4tcp), snmpd(1Msnmp)

RFC 1155, RFC 1157, RFC 1213


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004