5.4 How to Retrieve MIB Objects

When the SNMP service is running, you can use NET-SNMP applications to retrieve MIB objects directly from the command line on Oracle VM Server. You can also use other applications, such as Oracle Enterprise Manager, to retrieve MIB objects.

This section provides examples for demonstration purposes only. You should refer to the manpages for NET-SNMP applications or the appropriate documentation for your NMS to determine how you should retrieve MIB objects to suit your business needs.


The examples in this section:

  • Assume that you have configured the public community for read access.

  • Use a lower security level, SNMP v2c, for access. You should configure SNMP v3 to ensure that you restrict access control to authorized users. Refer to the appropriate documentation for information on access control and security levels as well as instructions on configuring SNMP v3.


If the last line of the output contains No more variables left in this MIB View (It is past the end of the MIB tree), then you might not have read access rights in snmpd.conf. To resolve this issue, you can temporarily add rocommunity public to the start of /etc/snmp/snmpd.conf to allow read access from all computers on the network.

The following example uses the snmpwalk application to return values for all objects in the MIB tree:

# snmpwalk -v2c -c public localhost
SNMPv2-MIB::sysDescr.0 = STRING: Linux FQDN 3.8.13-68.2.2.el6uek.x86_64
 #2 SMP time_stamp x86_64
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (2654) 0:00:26.54
SNMPv2-MIB::sysContact.0 = STRING: Root <root@localhost>
 (configure /etc/snmp/snmp.local.conf)
SNMPv2-MIB::sysName.0 = STRING: FQDN
SNMPv2-MIB::sysLocation.0 = STRING: Unknown (edit /etc/snmp/snmpd.conf)
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (18) 0:00:00.18
SNMPv2-MIB::sysORID.1 = OID: SNMP-MPD-MIB::snmpMPDMIBObjects.3.1.1
SNMPv2-MIB::sysORID.3 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.4 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.6 = OID: IP-MIB::ip
SNMPv2-MIB::sysORDescr.1 = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr.3 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.5 = STRING: The MIB module for managing TCP implementations
SNMPv2-MIB::sysORDescr.6 = STRING: The MIB module for managing IP and ICMP implementations
SNMPv2-MIB::sysORDescr.7 = STRING: The MIB module for managing UDP implementations
SNMPv2-MIB::sysORDescr.8 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (17) 0:00:00.17
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (17) 0:00:00.17
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (17) 0:00:00.17
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (17) 0:00:00.17
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (18) 0:00:00.18
SNMPv2-MIB::sysORUpTime.6 = Timeticks: (18) 0:00:00.18
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (18) 0:00:00.18
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (18) 0:00:00.18

The following example uses the snmpwalk application to load ORACLE-OVS-MIB and return values for objects in the Oracle VM Server MIB tree:

# snmpwalk -v2c -c public localhost -OQ -m +ORACLE-OVS-MIB .
ORACLE-OVS-MIB::ovsType.0 = Oracle VM Server
ORACLE-OVS-MIB::ovsVersion.0 = version
ORACLE-OVS-MIB::ovsClusterState.0 = DLM_Ready
ORACLE-OVS-MIB::ovsClusterType.0 = nfs
ORACLE-OVS-MIB::ovsClusterStorage.0 = hostname:/nfs/clusterfs/path
ORACLE-OVS-MIB::ovsManagerUUID.0 = 0004fb0000010000af78ad71a2719608
ORACLE-OVS-MIB::ovsServerpoolName.0 = my-pool
ORACLE-OVS-MIB::ovsAgentState.0 = Running
ORACLE-OVS-MIB::ovsFreeMemory.0 = 12766
ORACLE-OVS-MIB::vmIndex.0 = 0
ORACLE-OVS-MIB::vmIndex.1 = 1
ORACLE-OVS-MIB::vmIndex.2 = 2
ORACLE-OVS-MIB::vmType.0 = 0004fb00000600002eb4165c672efe28
ORACLE-OVS-MIB::vmType.1 = 0004fb0000060000959d078c46ec4268
ORACLE-OVS-MIB::vmType.2 = Domain-0

The following example uses the snmptable application to retrieve the running virtual machines on Oracle VM Server from the ORACLE-OVS-MIB::vmTable SNMP table:


The ORACLE-OVS-MIB::vmTable SNMP table contains a cached value that expires after 60 seconds.

# snmptable -v 2c -c public localhost ORACLE-OVS-MIB::vmTable
SNMP table: ORACLE-OVS-MIB::vmTable

 vmIndex                           vmType
       0 0004fb00000600002eb4165c672efe28
       1 0004fb0000060000959d078c46ec4268
       2                         Domain-0