开发者

How to find out the number of CPUs using SNMP

开发者 https://www.devze.com 2023-02-24 09:34 出处:网络
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)?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消