Troubleshooting
Problem
Running snmpinfo command fails as shown below:
# snmpinfo -m dump -v xmdcpu
unknown variable "xmdcpu"
unknown variable "xmdcpu"
# snmpinfo -m dump -v system
unknown variable "system"
unknown variable "system"
Cause
This usually indicates that there is a problem with the mib.defs file.
The mib.defs file provides object descriptions of MIB variables for the snmpinfo command.
When there is a problem with the mib.defs file or if it is missing, snmpinfo will fail as shown above.
Diagnosing The Problem
Verify that snmpinfo works with the MIB OID but fails with MIB description.
For example, the following command to query system MIB by OID works:
# snmpinfo -m dump -v 1.3.6.1.2.1.1
But the command to query by system MIB description fails:
# snmpinfo -m dump -v system
unknown variable "system"
unknown variable "system"
Resolving The Problem
Check that the /etc/mib.defs file exists.
Check that a mib.defs file does not exist in the directory where snmpinfo is issued.
For example, if you run snmpinfo from /root and a /mib.defs file exists, then snmpinfo will read the /mib.defs file and ignore /etc/mib.defs.
If there is a problem with /mib.defs file, snmpinfo may fail as noted in this document.
Rename the local mib.defs file and try snmpinfo query again to see if it works.
If the /etc/mib.defs file is missing or corrupted, a clean default file can be found here:
/usr/lpp/bos.net/inst_root/etc/mib.defs
If there were customizations made to the mib.defs file, you will need to rebuild the file or use mib.defs file from a similar working system.
Document Location
Worldwide
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG10","label":"AIX"},"Component":"","Platform":[{"code":"PF002","label":"AIX"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]
Was this topic helpful?
Document Information
Modified date:
21 August 2019
UID
ibm11071540