You are not logged in.

#1 2025-01-06 14:53:24

jfk
Member
Registered: 2017-12-11
Posts: 118

[SOLVED] lm_sensors: custom label won't apply

I need to differentiate temp labels between my NVMEs.

$ sensors -u
spd5118-i2c-13-51
Adapter: SMBus PIIX4 adapter port 0 at 0b00
temp1:
  temp1_input: 45.250
  temp1_max: 55.000
  temp1_min: 0.000
  temp1_crit: 85.000
  temp1_lcrit: 0.000
  temp1_max_alarm: 0.000
  temp1_min_alarm: 0.000
  temp1_crit_alarm: 0.000
  temp1_lcrit_alarm: 0.000

amdgpu-pci-0b00
Adapter: PCI adapter
vddgfx:
  in0_input: 1.385
vddnb:
  in1_input: 0.770
edge:
  temp1_input: 41.000
PPT:
  power1_average: 7.151
  power1_input: 34.083

nvme-pci-0100
Adapter: PCI adapter
Composite:
  temp1_input: 52.850
  temp1_max: 81.850
  temp1_min: -273.150
  temp1_crit: 84.850
  temp1_alarm: 0.000
Sensor 1:
  temp2_input: 52.850
  temp2_max: 65261.850
  temp2_min: -273.150
Sensor 2:
  temp3_input: 55.850
  temp3_max: 65261.850
  temp3_min: -273.150

spd5118-i2c-13-53
Adapter: SMBus PIIX4 adapter port 0 at 0b00
temp1:
  temp1_input: 44.500
  temp1_max: 55.000
  temp1_min: 0.000
  temp1_crit: 85.000
  temp1_lcrit: 0.000
  temp1_max_alarm: 0.000
  temp1_min_alarm: 0.000
  temp1_crit_alarm: 0.000
  temp1_lcrit_alarm: 0.000

k10temp-pci-00c3
Adapter: PCI adapter
Tctl:
  temp1_input: 44.375

nvme-pci-0a00
Adapter: PCI adapter
Composite:
  temp1_input: 51.850
  temp1_max: 81.850
  temp1_min: -273.150
  temp1_crit: 84.850
  temp1_alarm: 0.000
Sensor 1:
  temp2_input: 51.850
  temp2_max: 65261.850
  temp2_min: -273.150
Sensor 2:
  temp3_input: 58.850
  temp3_max: 65261.850
  temp3_min: -273.150

Following the wiki, I wrote those lines in "/etc/sensors.d/custom_labels":

chip "nvme-pci-0a00"
  label Composite "NVME1"

Restarted lm_sensors.service. This doesn't override the default label.

Last edited by jfk (2025-01-07 15:03:23)

Offline

#2 2025-01-06 20:14:08

Bollan
Member
Registered: 2025-01-05
Posts: 3

Re: [SOLVED] lm_sensors: custom label won't apply

Hello.

In lm_sensors, the different listed sensors, such as Composite, have raw names and friendly names and lm_services isn't very clear which of the name types they use for each solution. Your nvme-pci-0a00 chip for example contains the sensor friendly name of "Composite" which is composed of "temp1" raw sensor name.
Thus, changing your custom_labels to the following

chip "nvme-pci-0a00"
  label temp1 "NVME1"

then restarting all

 sudo systemctl restart lm_sensors
sudo systemctl restart sensord

then running

 sensors | grep -A3 "nvme*" 

should confirm everything as working as intended. The composite label now says "NVME1" instead of "Composite"

Offline

#3 2025-01-07 15:04:58

jfk
Member
Registered: 2017-12-11
Posts: 118

Re: [SOLVED] lm_sensors: custom label won't apply

Thank you. I had tried "temp1_input" but hadn't thought to simply put "temp1".

Offline

Board footer

Powered by FluxBB