Content-type: text/html Man page of snmp_request

snmp_request

Section: Maintenance Commands (8)
Index Return to Main Contents
 

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: The host name or IP address of system to receive the request in dot notation. The community name to use in the SNMP message header. The request_type can be one of the following: Issue a GetRequest message Issues a GetNextRequest message Issues a SetRequest message The object identifier of a MIB variable in dot notation. 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 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

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 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 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) delim off


 

Index

NAME
SYNOPSIS
DESCRIPTION
EXAMPLES
RELATED INFORMATION

This document was created by man2html, using the manual pages.
Time: 02:40:38 GMT, October 02, 2010