无法将传感器与sensors.conf芯片匹配

无法将传感器与sensors.conf芯片匹配

在我的系统上,有一个 pmbus 设备(dps1600)。

我想更改传感器输出的标签。

我的配置文件/etc/sensors.d/sensors.conf

bus "i2c-11" "i2c-3-mux (chan_id 0)"
bus "i2c-12" "i2c-3-mux (chan_id 0)"
bus "i2c-13" "i2c-3-mux (chan_id 0)"

chip "dps1600-i2c-11-58"
    label in1 "PSU Vin"
    label in2 "PSU Vout"
    label fan1 "PSU Fan"
    label temp1 "PSU temp1"
    label temp2 "PSU temp2"
    label temp3 "PSU temp3"
    label power1 "PSU Pin"
    label power2 "PSU Pout"
    label curr1 "PSU Iin"
    label curr2 "PSU Iout"

我的传感器结果保持不变。

root@sonic:/# sensors "dps1600-i2c-11-58"
dps1600-i2c-11-58
Adapter: i2c-3-mux (chan_id 0)
vin:         +216.75 V
vout1:       +12.06 V
fan1:        4576 RPM
temp1:        +28.0°C  (high = +110.0°C)
temp2:        +40.0°C  (high = +110.0°C)
temp3:        +34.0°C  (high = +110.0°C)
pin:         255.75 W  (max =   2.13 kW)
pout1:       236.50 W  (max =   1.92 kW)
iin:          +1.20 A  (max = +11.84 A)
iout1:       +19.47 A  (max = +140.00 A, crit max = +149.00 A)

我尝试稍微改变一下:

chip "dps1600-i2c-*-58"
    label in1 "PSU Vin"
    label in2 "PSU Vout"
    label fan1 "PSU Fan"
    label temp1 "PSU temp1"
    label temp2 "PSU temp2"
    label temp3 "PSU temp3"
    label power1 "PSU Pin"
    label power2 "PSU Pout"
    label curr1 "PSU Iin"
    label curr2 "PSU Iout"

有用:

root@sonic:/# sensors "dps1600-i2c-11-58"
dps1600-i2c-11-58
Adapter: i2c-3-mux (chan_id 0)
PSU Vin:     +216.50 V
PSU Vout:    +12.05 V
PSU Fan:     4576 RPM
PSU temp1:    +28.0°C  (high = +110.0°C)
PSU temp2:    +40.0°C  (high = +110.0°C)
PSU temp3:    +34.0°C  (high = +110.0°C)
PSU Pin:     255.75 W  (max =   2.13 kW)
PSU Pout:    234.75 W  (max =   1.92 kW)
PSU Iin:      +1.20 A  (max = +11.84 A)
PSU Iout:    +19.53 A  (max = +140.00 A, crit max = +149.00 A)

为什么第一个会失败?

====更新====

我发现三个适配器具有相同的名称,这可能是根本原因。

root@sonic:/# cat /sys/bus/i2c/devices/i2c-11/name
i2c-3-mux (chan_id 0)
root@sonic:/# cat /sys/bus/i2c/devices/i2c-12/name
i2c-3-mux (chan_id 0)
root@sonic:/# cat /sys/bus/i2c/devices/i2c-13/name
i2c-3-mux (chan_id 0)

我怎样才能避免这种情况?

相关内容