PECI sensor rename
Hi Team:
I have a question for how to rename PECI sensor in cpu-sensor.
Currently, I am using peci-dimmtemp & peci-cputemp drivers under Kernel to read DIMM and CPU temperatures. So, under /sys/class/hwmon directories, I can find the corresponding CPU & DIMM label names and temperatures.
Now, my question is how do I change the label names of each corresponding temperature in cpu-sensor component.
Here is the snapshot of my cpu-sensor using busctl. My goal is to show temperature name to be something else other than "Die_CPU1" or "DIMM_C1_CPU1".
root@abc/sys/class/hwmon/hwmon23# busctl tree --no-page xyz.openbmc_project.CPUSensor
...
/xyz/openbmc_project/sensors
mq/xyz/openbmc_project/sensors/temperature
tq/xyz/openbmc_project/sensors/temperature/Core_0_CPU1 tq/xyz/openbmc_project/sensors/temperature/Core_10_CPU1 tq/xyz/openbmc_project/sensors/temperature/Core_11_CPU1 tq/xyz/openbmc_project/sensors/temperature/Core_12_CPU1 tq/xyz/openbmc_project/sensors/temperature/Core_13_CPU1 tq/xyz/openbmc_project/sensors/temperature/Core_14_CPU1 tq/xyz/openbmc_project/sensors/temperature/Core_15_CPU1 tq/xyz/openbmc_project/sensors/temperature/Core_17_CPU1 tq/xyz/openbmc_project/sensors/temperature/Core_2_CPU1 tq/xyz/openbmc_project/sensors/temperature/Core_3_CPU1 tq/xyz/openbmc_project/sensors/temperature/Core_4_CPU1 tq/xyz/openbmc_project/sensors/temperature/Core_5_CPU1 tq/xyz/openbmc_project/sensors/temperature/Core_6_CPU1 tq/xyz/openbmc_project/sensors/temperature/Core_7_CPU1 tq/xyz/openbmc_project/sensors/temperature/Core_9_CPU1 tq/xyz/openbmc_project/sensors/temperature/DIMM_C1_CPU1 tq/xyz/openbmc_project/sensors/temperature/DIMM_C2_CPU1 mq/xyz/openbmc_project/sensors/temperature/Die_CPU1
...
I understand that "Die" comes from peci-cputemp driver and "DIMM_C1" comes from peci-dimmtemp driver. Besides rewriting the label names in the drivers, do I have other options?
Thank you,
Derek
Hi Derek,
Quoted 56 lines · On 9/19/2019 11:21 PM, Derek Lin23 wrote:
Hi Team:
I have a question for how to rename PECI sensor in cpu-sensor.
Currently, I am using peci-dimmtemp & peci-cputemp drivers
under Kernel to read DIMM and CPU temperatures.So, under
/sys/class/hwmondirectories, I can find the
corresponding CPU & DIMM label names and temperatures.Now, my question is how do I change the label names of each
corresponding temperature in cpu-sensor component.Here is the snapshot of my cpu-sensor using busctl. My goal
is to show temperature name to be something else other than “Die_CPU1” or “DIMM_C1_CPU1”.root@abc/sys/class/hwmon/hwmon23# busctl tree --no-page xyz.openbmc_project.CPUSensor …/xyz/openbmc_project/sensors
mq/xyz/openbmc_project/sensors/temperature
tq/xyz/openbmc_project/sensors/temperature/Core_0_CPU1
tq/xyz/openbmc_project/sensors/temperature/Core_10_CPU1
tq/xyz/openbmc_project/sensors/temperature/Core_11_CPU1
tq/xyz/openbmc_project/sensors/temperature/Core_12_CPU1
tq/xyz/openbmc_project/sensors/temperature/Core_13_CPU1
tq/xyz/openbmc_project/sensors/temperature/Core_14_CPU1
tq/xyz/openbmc_project/sensors/temperature/Core_15_CPU1
tq/xyz/openbmc_project/sensors/temperature/Core_17_CPU1
tq/xyz/openbmc_project/sensors/temperature/Core_2_CPU1
tq/xyz/openbmc_project/sensors/temperature/Core_3_CPU1
tq/xyz/openbmc_project/sensors/temperature/Core_4_CPU1
tq/xyz/openbmc_project/sensors/temperature/Core_5_CPU1
tq/xyz/openbmc_project/sensors/temperature/Core_6_CPU1
tq/xyz/openbmc_project/sensors/temperature/Core_7_CPU1
tq/xyz/openbmc_project/sensors/temperature/Core_9_CPU1
tq/xyz/openbmc_project/sensors/temperature/DIMM_C1_CPU1
Quoted 8 lines
tq/xyz/openbmc_project/sensors/temperature/DIMM_C2_CPU1
mq/xyz/openbmc_project/sensors/temperature/Die_CPU1
…
I understand that “Die” comes from peci-cputemp driver and
“DIMM_C1” comes from peci-dimmtemp driver. Besides rewriting the label names in the drivers, do I have other options?
DBus names of CPU and DIMM sensors will be named by this code in dbus-sensor repository.
You might need to change the logic if you are going to customize the sensor names.
Cheers,
Jae