Index Click this button to go to the index for this section.


snmp_request(8)

NAME

snmp_request - Sends SNMP requests to an agent and prints the agent's response

SYNOPSIS

/usr/sbin/snmp_request agent community request_type {variable [type value]} ...

DESCRIPTION

The snmp_request program sends an SNMP Get, GetNext, or Set request to a logically remote SNMP agent, and prints the agent's response if received within 6 seconds. The arguments to the snmp_request program are: agent The host name or IP address of system to receive the request in dot notation. community The community name to use in the SNMP message header. request_type The request_type can be one of the following: get Issue a GetRequest message getnext Issues a GetNextRequest message set Issues a SetRequest message variable The object identifier of a MIB variable in dot notation. type Specifies the data type for SetRequests. The "type" can be set to one of the following: · a - ip_addr · c - Counter · d - Object identifier · D - Display string · g - Gauge · i - Integer · o - Octet · N - Null · t - time_ticks · u - Unsigned integer 32 value Specifies the value to be set for SetRequests. For Get and Set operations, the MIB variable object identifier must be fully qualified; must specify an instance.

EXAMPLES

1. This example obtains the value of the MIB II sysDescr variable from host ZIGGY, using the default community name: snmp_request ZIGGY public get 1.3.6.1.2.1.1.1.0 2. This example obtains the value of the first ifDescr MIB variable in host ZIGGY's MIB II interface table: snmp_request ZIGGY public getnext 1.3.6.1.2.1.2.2.1.2 3. This example sets ZIGGY's sysContact variable to Katy Lied. Use a community name that has been configured on that system to allow sets. snmp_request ZIGGY special_comm_1 set 1.3.6.1.2.1.1.4.0 -D "Katy Lied"

RELATED INFORMATION

Commands: snmpd(8), snmp_traprcv(8)