snmpSet command

snmpSet command writes information in agents using SNMP protocol.

In Tivoli® Netcool® Performance Manager, with multiple collectors on single host we can use the snmpSet with particular collector as follows:
  1. Source dataLoad.env -i <Instance Number>:
  2. snmpSet <OPTIONS>.
    OR
    snmpSet <OPTIONS> -n <COLLECTOR_ID>.

SYNOPSIS

snmpSet <target> <oid> <value> [-m <mibs>] [-w <writeCommunity>] [-t <timeout>] [-r <tries>] [-fp]
[-D <debugLevel>] {-all | -n <collNumber> | [-S <server> [-P <port>]] | [-dp <devicePort>]} [-?] [--version]  

Options

Table 1. Options for snmpGet command
Option Description
<target> This is the IP address or the name of the SNMP device to write on.
<oid> This is either the dotted form of the oid, or the name.instance of the oid to write.
<value> This is the value to write. .
-m <mibs> The compiled Mib file name that contains the definition for the required oid. This is a .oid file, without path. The file is expected to be found in the SNMP dataload's mibs/oid directory.
-w <writeCommunity> The write community to use to perform the action if different from the default write community configured in SNMP_CONF for that device.
-t <timeout> The SNMP timeout to use. Default value is defined in theSNMP_CONF for that device
-r <tries> The number of SNMP tries to use (1 or more). Default value is defined in the SNMP_CONF for that device
-fp This flag allow to overwrite permissions as described in the mib file. Default behavior for the SNMP dataload, is to reject Write queries on Read-Only type objetcs.
-D <debugLevel> <debugLevel> is a number between 0 and 6. 0 represents no debug, 6 is the most verbose.
-all All SNMP dataload currently running in the system will receive the request.
-n <collectoNumber> The request will only be sent to SNMP dataload process running collection set number <collectoNumber>.
-S <serverName> <serverName> is the name of the machine that hosts a specific SNMP dataload. If this switch is not defined, 'localhost' is assumed.
-P <portNumber> <portNumber> is the listening port number of the SNMP dataload.
  • If this switch is not defined, the value of the DL_ADMIN_TCP_PORT environment variable will be used.
  • If the environment variable is not defined, 3002 is assumed.
  • If none of the -all, -n, -S and -P switches are specified, then localhost:3002 will be assumed.
-dp <devicePort> <devicePort> is the SNMP device port to use. Default value is defined in the SNMP_CONF for that device.
-? Display this usage page.
--version Display copyright and version information.
Examples
Set sysLocation.0 on localhost:

snmpSet localhost sysLocation.0 "Network Room" -m rfc1213-MIB-II.oid -w private