我正在尝试监控服务器上的温度传感器,并使用 Cacti 绘制它们。我已安装 lm-sensors 并且运行正常。例如,以下是 的输出sensors
:
% sensors
acpitz-virtual-0
Adapter: Virtual device
temp1: +26.8 C (crit = +100.0 C)
temp2: +32.0 C (crit = +60.0 C)
coretemp-isa-0000
Adapter: ISA adapter
Core 0: +36.0 C (high = +105.0 C, crit = +105.0 C)
coretemp-isa-0001
Adapter: ISA adapter
Core 1: +42.0 C (high = +105.0 C, crit = +105.0 C)
但是,当我尝试通过 SNMP 获取此数据时,只能正确获取一个传感器的温度,而另一个传感器始终返回 100.000 C:
% snmpwalk -Os -c public -v 1 10.8.0.18 -m ALL lmTempSensors
lmTempSensorsIndex.1 = INTEGER: 0
lmTempSensorsIndex.2 = INTEGER: 1
lmTempSensorsDevice.1 = STRING: temp1
lmTempSensorsDevice.2 = STRING: temp1
lmTempSensorsValue.1 = Gauge32: 26800
lmTempSensorsValue.2 = Gauge32: 100000
所以,我的问题有两个:
- 为什么 SNMP 返回的第二个传感器的值为 100 C(而它应该是 32 C)
- 为什么我的 CPU 核心传感器没有被 SNMP 返回?
更新:我注意到似乎其他传感器也存在lmMiscSensors
,所以我可以看到其他数据:
% snmpwalk -Os -c public -v 1 10.8.0.18 -m ALL sensor
lmTempSensorsIndex.1 = INTEGER: 0
lmTempSensorsIndex.2 = INTEGER: 1
lmTempSensorsDevice.1 = STRING: temp1
lmTempSensorsDevice.2 = STRING: temp1
lmTempSensorsValue.1 = Gauge32: 26800
lmTempSensorsValue.2 = Gauge32: 100000
lmMiscSensorsIndex.1 = INTEGER: 0
lmMiscSensorsIndex.2 = INTEGER: 1
lmMiscSensorsIndex.3 = INTEGER: 2
lmMiscSensorsIndex.4 = INTEGER: 3
lmMiscSensorsIndex.5 = INTEGER: 4
lmMiscSensorsIndex.6 = INTEGER: 5
lmMiscSensorsIndex.7 = INTEGER: 6
lmMiscSensorsIndex.8 = INTEGER: 7
lmMiscSensorsDevice.1 = STRING: Core 0
lmMiscSensorsDevice.2 = STRING: Core 0
lmMiscSensorsDevice.3 = STRING: Core 0
lmMiscSensorsDevice.4 = STRING: Core 0
lmMiscSensorsDevice.5 = STRING: Core 1
lmMiscSensorsDevice.6 = STRING: Core 1
lmMiscSensorsDevice.7 = STRING: Core 1
lmMiscSensorsDevice.8 = STRING: Core 1
lmMiscSensorsValue.1 = Gauge32: 34000
lmMiscSensorsValue.2 = Gauge32: 105000
lmMiscSensorsValue.3 = Gauge32: 105000
lmMiscSensorsValue.4 = Gauge32: 0
lmMiscSensorsValue.5 = Gauge32: 39000
lmMiscSensorsValue.6 = Gauge32: 105000
lmMiscSensorsValue.7 = Gauge32: 105000
lmMiscSensorsValue.8 = Gauge32: 0
我仍然不知道该如何读取它。lmTempSensorsValue.2
只是给出 temp1 的临界温度点吗?如果是,temp2 读数在哪里?