Skip to contentSkip to conversation

Question about sensor number access

DISCUSSION Ivan Li11 2 participants 4 messages Aug 12, 2019 – Aug 15, 2019

lore
Share & tools
lore

Ivan Li11

author
#0 lore raw

Hi Team,

I have a question about sensor number.
As far as I know, "phosphor-host-ipmid" will parse "ipmi-sensors.yaml" and then store these sensors info(sensor number and sensor type, etc) in ipmid. May I know if another daemon(e.g. phosphor-sel-logger) needs sensor number info, is there any suggested method to get sensor number ?

Thanks,
Ivan

#1 lore raw
Quoted 7 lines · On 8/12/2019 9:08 AM, Ivan Li11 wrote:

Hi Team,

I have a question about sensor number.

As far as I know, “phosphor-host-ipmid” will parse “ipmi-sensors.yaml” and then store these sensors info(sensor number and sensor type, etc) in ipmid.

May I know if another daemon(e.g. phosphor-sel-logger) needs sensor number info, is there any suggested method to get sensor number ?

phosphor-sel-logger stores only the sensor path and depends on something to map sensor path to sensor number when the log is read.

Today, that mapping is only done for dynamic IPMI sensors in intel-ipmi-oem, here: https://github.com/openbmc/intel-ipmi-oem/blob/master/include/sdrutils.hpp#L207.

We were not able to get to a final solution for handling the mapping of dynamic and hardcoded sensor numbers. You can see the ideas and discussion in this review: https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-host-ipmid/+/12951 and this thread: https://lists.ozlabs.org/pipermail/openbmc/2019-January/014890.html.

This is specifically about getting the sensor number from the path for phosphor-sel-logger, so it may not apply to your situation, but hopefully helps.

Thanks,
-Jason

Quoted 5 lines

Thanks,

Ivan

author
#2 lore raw

Hi Jason,

Thanks your great support
.
I have an idea that create JSON file including threshold sensor number and sensor name mapping table for phosphor-sel-logger , and use sensor name to map the related sensor number with that JSON file when threshold sensor SEL log is generated. Please help to advise it.

Thanks,
Ivan
-----Original Message-----
From: openbmc <[email protected]> On Behalf Of Bills, Jason M
Sent: Tuesday, August 13, 2019 2:57 AM
To: [email protected]
Subject: [External] Re: Question about sensor number access

Quoted 10 lines · On 8/12/2019 9:08 AM, Ivan Li11 wrote:

Hi Team,

I have a question about sensor number.

As far as I know, "phosphor-host-ipmid" will parse "ipmi-sensors.yaml" and then store these sensors info(sensor number and sensor type, etc) in ipmid.

May I know if another daemon(e.g. phosphor-sel-logger) needs sensor number info, is there any suggested method to get sensor number ?

phosphor-sel-logger stores only the sensor path and depends on something to map sensor path to sensor number when the log is read.

Today, that mapping is only done for dynamic IPMI sensors in intel-ipmi-oem, here:
https://github.com/openbmc/intel-ipmi-oem/blob/master/include/sdrutils.hpp#L207.

We were not able to get to a final solution for handling the mapping of dynamic and hardcoded sensor numbers. You can see the ideas and discussion in this review:
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-host-ipmid/+/12951
and this thread:
https://lists.ozlabs.org/pipermail/openbmc/2019-January/014890.html.

This is specifically about getting the sensor number from the path for phosphor-sel-logger, so it may not apply to your situation, but hopefully helps.

Thanks,
-Jason

Quoted 5 lines

Thanks,

Ivan

#3 lore raw
Quoted 6 lines · On 8/15/2019 2:05 AM, Ivan Li11 wrote:

Hi Jason,

Thanks your great support
.
I have an idea that create JSON file including threshold sensor number and sensor name mapping table for phosphor-sel-logger , and use sensor name to map the related sensor number with that JSON file when threshold sensor SEL log is generated. Please help to advise it.

Hi Ivan,

We still need to support dynamic sensor numbers, so it couldn't be a fully hardcoded sensor map in JSON. One approach could be to use the JSON file to build up the hardcoded sensor number map, then fill in the dynamic sensors and numbers as they are detected.

phosphor-sel-logger and ipmid can then use the final map to log (by name/path) and display (by number) sensor events.

Thanks,
-Jason

Quoted 41 lines

Thanks,
Ivan
-----Original Message-----
From: openbmc <[email protected]> On Behalf Of Bills, Jason M
Sent: Tuesday, August 13, 2019 2:57 AM
To: [email protected]
Subject: [External] Re: Question about sensor number access

Quoted 10 lines · On 8/12/2019 9:08 AM, Ivan Li11 wrote:

Hi Team,

I have a question about sensor number.

As far as I know, "phosphor-host-ipmid" will parse "ipmi-sensors.yaml" and then store these sensors info(sensor number and sensor type, etc) in ipmid.

May I know if another daemon(e.g. phosphor-sel-logger) needs sensor number info, is there any suggested method to get sensor number ?

phosphor-sel-logger stores only the sensor path and depends on something to map sensor path to sensor number when the log is read.

Today, that mapping is only done for dynamic IPMI sensors in intel-ipmi-oem, here:
https://github.com/openbmc/intel-ipmi-oem/blob/master/include/sdrutils.hpp#L207.

We were not able to get to a final solution for handling the mapping of dynamic and hardcoded sensor numbers. You can see the ideas and discussion in this review:
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-host-ipmid/+/12951
and this thread:
https://lists.ozlabs.org/pipermail/openbmc/2019-January/014890.html.

This is specifically about getting the sensor number from the path for phosphor-sel-logger, so it may not apply to your situation, but hopefully helps.

Thanks,
-Jason

Quoted 5 lines

Thanks,

Ivan