简体   繁体   English

如何使用SNMP找出CPU数量

[英]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)? 有没有办法在linux + net-snmp软件包(安装了默认的net-snmp软件包mibs)中使用SNMP来获取CPU数量?

UC Davis SNMP mib provides a lot of CPU information, but I do not see an object for the number of CPUs. UC Davis SNMP mib提供了许多CPU信息,但是我看不到CPU数量的对象。

Depends on the implementation, but the HOST-RESOURCES-MIB hrDevice.hrDeviceTable should contain entries for the number of CPUs. 取决于实现,但是HOST-RESOURCES-MIB hrDevice.hrDeviceTable应该包含CPU数量的条目。

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 表示CPU /核心/超线程

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. 还有HOST-RESOURCES :: hrDevice.hrProcessorTable表,该表应指示其固件ID,这有助于您区分核心/超线程与物理CPU。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM