Install net-snmp
# YumInstallNet-snmp *
By default, there are 65 built-in MIB under/usr/share/snmp/mibs.
By default, the path for searching the MIB library is$ Home/. snmp/mibs:/usr/share/snmp/mibs
Download the required MIB Library, under my is the H3C MIB library, address http://www.h3c.com/portal/Products___Solutions/Technology/MIB/
Decompress the zip package to a location, such as/tmp/comware, which contains three directories: H3C public MiB, H3C New Style Private MiB, and H3C compatible Style Private MIB, for ease of use, change the directory name to public, new, and compatible.
Decompress compatible/quick reference of H3C compatible style MIB objects description.rar to obtain quick reference of H3C compatible style MIB objects description.txt, and then search for the desired information, such as CPU, memory. Then run the snmpwalk command to test whether the data can be obtained. For example, h3centityextmemusage
# Snmpwalk-C public-V 2C192.168.1.1.1.3.6.1.4.1.2011.10.2.6.1.1.1.1.8
If data is available, this oid is valid on the current vswitch/vro. To use string search, you need to add the corresponding MIB library to net-snmp. In the quick reference of H3C compatible style MIB objects description.txt section of h3centityextmemusage just now-- From H3C-ENTITY-EXT-MIBDescription of which MIB it belongs to, and then search for the definition file starting with H3C-ENTITY-EXT-MIB In the MIB file under the compatible directory.
#Grep^ H3C-ENTITY-EXT-MIB/tmp/comware/compatible/*
Copy the found MIB file to the/usr/share/snmp/mibs/H3C/directory, and create the SNMP. conf file.
# Vim/etc/snmp/Conf
Enter the following content:
Mibdirs +/usr/share/snmp/mibs/H3cmibs+lswdevm-MiB: H3C-ENTITY-EXT-Mibmiballowunderline1
Save and exit. Run the snmpwalk command to test
# Snmpwalk-C public-V 2C192.168.1.1.1.3.6.1.4.1.2011.10.2.6.1.1.1.1.8
Copy the MIB library that is missing in the error message under/tmp/comware/compatible/to/usr/share/snmp/mibs/H3C/and run the command to test the library.
# Snmpwalk-C public-V 2C192.168.1.1-M-H3C-ENTITY-EXT-MIB h3centityextmemusage
If the output is similar to the following string, it is OK.
# Snmpwalk-C public-V 2C192.168.1.1-M-H3C-ENTITY-EXT-MIB h3centityextmemusage