Requests or modifies values of Management Information Base (MIB) variables managed by a Simple Network Management Protocol (SNMP) agent.
snmp_info [-mode get | next] [-verbose] [-com Community] [-debug Level] [-host HostName] [-file ObjectFile] [-retry Tries] [-wait WaitTime ] Variable.Instance
The following syntax is for the set option:
snmp_info -mode set [-verbose] [-com Community] [-debug Level] [-host HostName] [-file ObjectFile] [-retry Tries] [-wait WaitTime ] Variable.Instance=Value
The following syntax is for the dump option:
snmp_info -mode dump [-verbose] [-com Community] [-debug Level] [-host HostName] [-file ObjectFile] [-retry Tries] [-wait WaitTime ] [Variable.Instance]
The snmp_info command requests or modifies values for one or more Management Information Base (MIB) variables managed by a Simple Network Management Protocol (SNMP) agent. This command may only be issued by a user with root privileges or by a member of the system group.
If you specify the get option, the snmp_info command requests information about one or more MIB variables from an SNMP agent.
If you specify the next option, the snmp_info command requests information from an SNMP agent about the instances following the specified instances. The next option makes it possible to obtain MIB values without knowledge of the instance qualifiers.
If you specify the set option, the snmp_info command modifies values for one or more MIB variables for an SNMP agent. Only a few MIB variables are designated read-write. The agent that manages the MIB database may take various actions as a side effect of modifying MIB variables. For example, setting the ifAdminStatus MIB variable to 2 will normally shut down a network interface. The action taken is determined by the implementation of the SNMP agent that manages the database.
If you specify the dump option, the snmp_info command can be used to traverse the entire MIB tree of a given agent. If a group is passed in as the Variable parameter, the snmp_info command will traverse that specified path of the MIB tree.
The snmp_info command has a debug facility that dumps the debug information for transmitted and received packets. The facility is enabled with the -debug flag.
Flag name | Description |
---|---|
-com Community | Specifies the community name to be used to query. If you do not specify this flag, the default community name is public. |
-debug Level | Specifies the level of I/O debug information.
Use one of the following values:
|
-host HostName | Specifies the host name of the SNMP agent to be queried. If you do not specify this flag, the default host name is the host name of the system on which the user is currently logged. |
-file ObjectFile | Specifies the name of the objects definition file. If you do not specify this flag, the default objects definition file name is /etc/mib.defs. |
-mode Option | Specifies the mode by which to access the MIB
variables. The value can be one of the following options:
Note:
|
-retry Tries | Specifies the number of times the snmp_info command transmits the SNMP request to the SNMP agent before ending with the message no SNMP response. If you do not specify this flag, the default number of tries is 3. |
-verbose | Specifies that the output from the snmp_info command be displayed in verbose mode. If you do not specify this flag, the information will not be displayed in verbose mode. |
-wait | Specifies the wait time in seconds for the response from the snmpd agent. If you do not specify this flag, the default wait time is 15 seconds. |
Parameter | Description |
---|---|
Value | Specifies the value to which the MIB Variable parameter is to be set. A value must be specified for each variable. If a value is not specified, the request packet will be invalid. |
Variable | Specifies the name in text format or numeric format of a specific MIB variable as defined in the /etc/mib.defs file. If the option to the -mode flag is next or dump, the Variable parameter may be specified as a MIB group. |
Instance | Specifies the instance qualifier for the MIB
Variable parameter. The Instance parameter is required if the option
to the -mode flag is get or set. The Instance parameter is
optional if the option to the -mode flag is next or dump. Note:
|
For further information, consult RFC 1213, which defines the Management Information Base (MIB) for network management, and RFC 1157, which defines the SNMP protocol for creating requests for MIB information and formatting responses.
snmp_info -mode dump system