How to find out the number of CPUs using SNMP
Is there a way to get the number of CPUs using SNMP in linux + net-snmp package (with the default net-snmp package mibs 开发者_运维问答installed)?
UC Davis SNMP mib provides a lot of CPU information, but I do not see an object for the number of CPUs.
Depends on the implementation, but the HOST-RESOURCES-MIB hrDevice.hrDeviceTable should contain entries for the number of CPUs.
OID: .1.3.6.1.2.1.25.3.2
Any devices in the table matching:
hrDeviceType: .1.3.6.1.2.1.25.3.1.3
indicates a CPU/Core/HyperThread
There is also the HOST-RESOURCES::hrDevice.hrProcessorTable table, which should indicate their firmware ID's, which should help you differentiate cores/hyperthreads from physical cpus.
精彩评论