Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sensor name longer than 16 bytes #4

Open
ztai-goog opened this issue Apr 27, 2021 · 0 comments
Open

sensor name longer than 16 bytes #4

ztai-goog opened this issue Apr 27, 2021 · 0 comments

Comments

@ztai-goog
Copy link

Hi,

We've seen the issue that some PSU sensors have long names which easily exceeds 16 bytes after the suffix appended. For example cpu0_pvccfafivra.

There's existing logic that tries to shorten the suffix (e.g "Output" -> "Out) but it doesn't address the problem with long sensor names.

I wonder if there's a better solution to this problem.
Can we make the suffixes a lot more abbreviated?
Should there be a limit to the length of the original name?

Thanks,
Zhenfei

geissonator pushed a commit to openbmc/phosphor-host-ipmid that referenced this issue Dec 7, 2021
psusensor in dbus-sensors will append some suffixs in objectpath
and make the name easily exceeds 16 bytes.

This patch remove the suffix according to the appending rule in
psusensor.

See openbmc/intel-ipmi-oem#4 for details.

Tested:

cpu0 pvccinfaon  | 17.224     | Amps       | ok    | na        | -5.176    | na        | na        | 51.048    | na
cpu1 pvccinfaon  | 16.552     | Amps       | ok    | na        | -5.176    | na        | na        | 51.048    | na
cpu0 pvccinfaon  | 23.884     | Watts      | ok    | na        | -9.864    | na        | na        | 57.060    | na
cpu1 pvccinfaon  | 23.026     | Watts      | ok    | na        | -9.864    | na        | na        | 57.060    | na
cpu0 pvccinfaon  | 45.000     | degrees C  | ok    | na        | 0.000     | 3.000     | 90.000    | 95.000    | na
cpu1 pvccinfaon  | 44.000     | degrees C  | ok    | na        | 0.000     | 3.000     | 90.000    | 95.000    | na
cpu0 pvccinfaon  | 1.014      | Volts      | ok    | na        | 0.858     | na        | na        | 1.131     | na
cpu1 pvccinfaon  | 1.014      | Volts      | ok    | na        | 0.858     | na        | na        | 1.131     | na
    │   ├─/xyz/openbmc_project/State/Decorator/cpu0_pvccinfaon_OperationalStatus
    │   ├─/xyz/openbmc_project/State/Decorator/cpu1_pvccinfaon_OperationalStatus
      │ ├─/xyz/openbmc_project/sensors/current/cpu0_pvccinfaon_Output_Current
      │ ├─/xyz/openbmc_project/sensors/current/cpu1_pvccinfaon_Output_Current
      │ ├─/xyz/openbmc_project/sensors/power/cpu0_pvccinfaon_Output_Power
      │ ├─/xyz/openbmc_project/sensors/power/cpu1_pvccinfaon_Output_Power
      │ ├─/xyz/openbmc_project/sensors/temperature/cpu0_pvccinfaon_Temperature
      │ ├─/xyz/openbmc_project/sensors/temperature/cpu1_pvccinfaon_Temperature
        ├─/xyz/openbmc_project/sensors/voltage/cpu0_pvccinfaon_Output_Voltage
        ├─/xyz/openbmc_project/sensors/voltage/cpu1_pvccinfaon_Output_Voltage

Signed-off-by: JeffLin <[email protected]>
Change-Id: I66620e6b6cd7088a848b79ea625c9cefa63f2053
geissonator pushed a commit to openbmc/phosphor-host-ipmid that referenced this issue Jan 19, 2023
With commit [1] the leaf of the D-Bus object path was stripped of
well known suffixes, in addition to that `_` was replaced by space.

Replacing `_` with space is not needed to solve the problem statement
[2]. For sensor names which are less than 16 characters, this creates
expectation differences on scripts which tried to validate the ipmitool
output.

[1] d950f41
[2] openbmc/intel-ipmi-oem#4

Change-Id: If7028e517385ebfc1fc3541a6c23d559ad0c8d69
Signed-off-by: Tom Joseph <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant