openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [entity-manager] Question about temperature sensor stops update
@ 2021-10-29  8:02 Chris Chen (TPI)
  2021-10-29  8:33 ` Andrei Kartashev
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Chen (TPI) @ 2021-10-29  8:02 UTC (permalink / raw)
  To: openbmc

[-- Attachment #1: Type: text/plain, Size: 4129 bytes --]

Hi everyone,

Actually, I have 2 questions as below:

  1.  I got understood from others on the mailing list, that I don't have to declare EEPROM or temp sensors on the I2C bus node in my dts, and it should be fine even I did it at the beginning. So I tried to remove this declaration in dts, then the sensor value I got is fixed, no update. Can someone help to take look at why it is?
             Here are some logs that appeared automatically after the system booted up.  It looks like that entity-manager works fine. And the commands I used to check value.
             =======================================
             [   23.713596] lm75 6-0049: hwmon1: sensor 'tmp75'
             [   23.718894] i2c i2c-6: new_device: Instantiated device tmp75 at 0x49
             [   23.728520] lm75 6-004c: hwmon2: sensor 'tmp75'
             [   23.733779] i2c i2c-6: new_device: Instantiated device tmp75 at 0x4c
             [   23.743707] lm75 6-004d: hwmon3: sensor 'tmp75'
             [   23.749042] i2c i2c-6: new_device: Instantiated device tmp75 at 0x4d

             # busctl introspect xyz.openbmc_project.HwmonTempSensor /xyz/openbmc_project/sensors/temperature/DIMM_P1_EFGH
             xyz.openbmc_project.Sensor.Value                      interface -         -                                        -
             .MaxValue                                             property  d         127                                      emits-change
             .MinValue                                             property  d         -128                                     emits-change
             .Unit                                                 property  s         "xyz.openbmc_project.Sensor.Value.Uni... emits-change
             .Value                                                property  d         40.187                                   emits-change writable

             # cat /sys/bus/i2c/devices/6-004d/hwmon/hwmon3/temp1_input
             40187
             =======================================

  1.  From my understanding, there is "detection daemon" which scans I2C bus looking for EEPROMs with IPMI FRU data. However, I found all devices on the I2C buses would be listed, not only Fru devices, when I used the command below. Is this correct?
             # busctl tree xyz.openbmc_project.FruDevice
             `-/xyz
               `-/xyz/openbmc_project
                 `-/xyz/openbmc_project/FruDevice
                   |-/xyz/openbmc_project/FruDevice/0_80
                   |-/xyz/openbmc_project/FruDevice/0_88
                   |-/xyz/openbmc_project/FruDevice/2_108
                   |-/xyz/openbmc_project/FruDevice/2_112
                   |-/xyz/openbmc_project/FruDevice/2_68
                   |-/xyz/openbmc_project/FruDevice/2_72
                   |-/xyz/openbmc_project/FruDevice/3_22
                   |-/xyz/openbmc_project/FruDevice/3_50
                   |-/xyz/openbmc_project/FruDevice/4_56
                   |-/xyz/openbmc_project/FruDevice/5_48
                   |-/xyz/openbmc_project/FruDevice/5_81
                   |-/xyz/openbmc_project/FruDevice/6_73
                   |-/xyz/openbmc_project/FruDevice/6_76
                   |-/xyz/openbmc_project/FruDevice/6_77
                   |-/xyz/openbmc_project/FruDevice/7_80
                   |-/xyz/openbmc_project/FruDevice/7_88
                   |-/xyz/openbmc_project/FruDevice/8_101
                   `-/xyz/openbmc_project/FruDevice/hudsonbay     <-- this is the probe name we define in JSON configuration

Thanks.

Regards,
Chris Chen

Legal Disclaimer :
The information contained in this message may be privileged and confidential. 
It is intended to be read only by the individual or entity to whom it is addressed 
or by their designee. If the reader of this message is not the intended recipient, 
you are on notice that any distribution of this message, in any form, 
is strictly prohibited. If you have received this message in error, 
please immediately notify the sender and delete or destroy any copy of this message!

[-- Attachment #2: Type: text/html, Size: 17598 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [entity-manager] Question about temperature sensor stops update
  2021-10-29  8:02 [entity-manager] Question about temperature sensor stops update Chris Chen (TPI)
@ 2021-10-29  8:33 ` Andrei Kartashev
  2021-10-29  8:50   ` 回覆: " Chris Chen (TPI)
  0 siblings, 1 reply; 4+ messages in thread
From: Andrei Kartashev @ 2021-10-29  8:33 UTC (permalink / raw)
  To: Chris Chen (TPI), openbmc

Hello,

I didn't catch, what is your problem. As I see from the logs,
everything is fine: temp sensors instantiated, dbus objects created,
readings present. What's wrong?

As for FruDevice: yes, it's kind of weird behaviour: it exposes not
only actual FRU devices but also other I2C devices. You can introspect
that objects and see that they exposes
xyz.openbmc_project.Inventory.Item.I2CDevice interface instead of
xyz.openbmc_project.FruDevice

On Fri, 2021-10-29 at 08:02 +0000, Chris Chen (TPI) wrote:FruDevice
> Hi everyone,
>  
> Actually, I have 2 questions as below:
>    1. I got understood from others on the mailing list, that I don't
> have to declare EEPROM or temp sensors on the I2C bus node in my dts,
> and it should be fine even I did it at the beginning. So I tried to
> remove this declaration in dts, then the sensor value I got is fixed,
> no update. Can someone help to take look at why it is?
>              Here are some logs that appeared automatically after the
> system booted up.  It looks like that entity-manager works fine. And
> the commands I used to check value.
>              =======================================
>              [   23.713596] lm75 6-0049: hwmon1: sensor 'tmp75'
>              [   23.718894] i2c i2c-6: new_device: Instantiated
> device tmp75 at 0x49
>              [   23.728520] lm75 6-004c: hwmon2: sensor 'tmp75'
>              [   23.733779] i2c i2c-6: new_device: Instantiated
> device tmp75 at 0x4c
>             [   23.743707] lm75 6-004d: hwmon3: sensor 'tmp75'
>             [   23.749042] i2c i2c-6: new_device: Instantiated device
> tmp75 at 0x4d
>  
>              # busctl introspect xyz.openbmc_project.HwmonTempSensor
> /xyz/openbmc_project/sensors/temperature/DIMM_P1_EFGH
>              xyz.openbmc_project.Sensor.Value                    
>  interface -         -                                        -
>              .MaxValue                                            
> property  d         127                                      emits-
> change
>              .MinValue                                            
> property  d         -128                                     emits-
> change
>              .Unit                                                
> property  s         "xyz.openbmc_project.Sensor.Value.Uni... emits-
> change
>              .Value                                              
>  property  d        40.187                                   emits-
> change writable
>  
>              # cat /sys/bus/i2c/devices/6-
> 004d/hwmon/hwmon3/temp1_input
>             40187
>             =======================================
>    1. From my understanding, there is "detection daemon" which scans
> I2C bus looking for EEPROMs with IPMI FRU data. However, I found all
> devices on the I2C buses would be listed, not only Fru devices, when
> I used the command below. Is this correct?
>             # busctl tree xyz.openbmc_project.FruDevice
>             `-/xyz
>               `-/xyz/openbmc_project
>                 `-/xyz/openbmc_project/FruDevice
>                   |-/xyz/openbmc_project/FruDevice/0_80
>                   |-/xyz/openbmc_project/FruDevice/0_88
>                   |-/xyz/openbmc_project/FruDevice/2_108
>                   |-/xyz/openbmc_project/FruDevice/2_112
>                   |-/xyz/openbmc_project/FruDevice/2_68
>                   |-/xyz/openbmc_project/FruDevice/2_72
>                   |-/xyz/openbmc_project/FruDevice/3_22
>                   |-/xyz/openbmc_project/FruDevice/3_50
>                   |-/xyz/openbmc_project/FruDevice/4_56
>                   |-/xyz/openbmc_project/FruDevice/5_48
>                   |-/xyz/openbmc_project/FruDevice/5_81
>                   |-/xyz/openbmc_project/FruDevice/6_73
>                   |-/xyz/openbmc_project/FruDevice/6_76
>                   |-/xyz/openbmc_project/FruDevice/6_77
>                   |-/xyz/openbmc_project/FruDevice/7_80
>                   |-/xyz/openbmc_project/FruDevice/7_88
>                   |-/xyz/openbmc_project/FruDevice/8_101
>                    `-/xyz/openbmc_project/FruDevice/hudsonbay    ß
> this is the probe name we define in JSON configuration
>  
> Thanks.
>  
> Regards,
> Chris Chen
> Legal Disclaimer :
> The information contained in this message may be privileged and
> confidential. 
> It is intended to be read only by the individual or entity to whom it
> is addressed 
> or by their designee. If the reader of this message is not the
> intended recipient, 
> is strictly prohibited. If you have received this message in error, 
> please immediately notify the sender and delete or destroy any copy
> of this message!

-- 
Best regards,
Andrei Kartashev



^ permalink raw reply	[flat|nested] 4+ messages in thread

* 回覆: [entity-manager] Question about temperature sensor stops update
  2021-10-29  8:33 ` Andrei Kartashev
@ 2021-10-29  8:50   ` Chris Chen (TPI)
       [not found]     ` <a49158e3ebbc40465c73dae77a037643cdc2b7c3.camel@yadro.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Chen (TPI) @ 2021-10-29  8:50 UTC (permalink / raw)
  To: Andrei Kartashev, openbmc

[-- Attachment #1: Type: text/plain, Size: 5331 bytes --]

Hi Andrei,

Thanks for your prompt reply and the explanation of #2, I understood now.

For question #1, let me rephrase it, please. I mean the temperature value I read is always the same. The value always shows 40.187, it wouldn't be changed even I read it again after a while. But if I declare the temp sensors on the I2C bus node in my dts, the value will change all the time. Do you have any idea about this?


Regards,
Chris Chen

________________________________
寄件者: Andrei Kartashev <a.kartashev@yadro.com>
寄件日期: 2021年10月29日 下午 04:33
收件者: Chris Chen (TPI) <Chris.Chen3@flex.com>; openbmc@lists.ozlabs.org <openbmc@lists.ozlabs.org>
主旨: Re: [entity-manager] Question about temperature sensor stops update

Hello,

I didn't catch, what is your problem. As I see from the logs,
everything is fine: temp sensors instantiated, dbus objects created,
readings present. What's wrong?

As for FruDevice: yes, it's kind of weird behaviour: it exposes not
only actual FRU devices but also other I2C devices. You can introspect
that objects and see that they exposes
xyz.openbmc_project.Inventory.Item.I2CDevice interface instead of
xyz.openbmc_project.FruDevice

On Fri, 2021-10-29 at 08:02 +0000, Chris Chen (TPI) wrote:FruDevice
> Hi everyone,
>
> Actually, I have 2 questions as below:
>    1. I got understood from others on the mailing list, that I don't
> have to declare EEPROM or temp sensors on the I2C bus node in my dts,
> and it should be fine even I did it at the beginning. So I tried to
> remove this declaration in dts, then the sensor value I got is fixed,
> no update. Can someone help to take look at why it is?
>              Here are some logs that appeared automatically after the
> system booted up.  It looks like that entity-manager works fine. And
> the commands I used to check value.
>              =======================================
>              [   23.713596] lm75 6-0049: hwmon1: sensor 'tmp75'
>              [   23.718894] i2c i2c-6: new_device: Instantiated
> device tmp75 at 0x49
>              [   23.728520] lm75 6-004c: hwmon2: sensor 'tmp75'
>              [   23.733779] i2c i2c-6: new_device: Instantiated
> device tmp75 at 0x4c
>             [   23.743707] lm75 6-004d: hwmon3: sensor 'tmp75'
>             [   23.749042] i2c i2c-6: new_device: Instantiated device
> tmp75 at 0x4d
>
>              # busctl introspect xyz.openbmc_project.HwmonTempSensor
> /xyz/openbmc_project/sensors/temperature/DIMM_P1_EFGH
>              xyz.openbmc_project.Sensor.Value
>  interface -         -                                        -
>              .MaxValue
> property  d         127                                      emits-
> change
>              .MinValue
> property  d         -128                                     emits-
> change
>              .Unit
> property  s         "xyz.openbmc_project.Sensor.Value.Uni... emits-
> change
>              .Value
>  property  d        40.187                                   emits-
> change writable
>
>              # cat /sys/bus/i2c/devices/6-
> 004d/hwmon/hwmon3/temp1_input
>             40187
>             =======================================
>    1. From my understanding, there is "detection daemon" which scans
> I2C bus looking for EEPROMs with IPMI FRU data. However, I found all
> devices on the I2C buses would be listed, not only Fru devices, when
> I used the command below. Is this correct?
>             # busctl tree xyz.openbmc_project.FruDevice
>             `-/xyz
>               `-/xyz/openbmc_project
>                 `-/xyz/openbmc_project/FruDevice
>                   |-/xyz/openbmc_project/FruDevice/0_80
>                   |-/xyz/openbmc_project/FruDevice/0_88
>                   |-/xyz/openbmc_project/FruDevice/2_108
>                   |-/xyz/openbmc_project/FruDevice/2_112
>                   |-/xyz/openbmc_project/FruDevice/2_68
>                   |-/xyz/openbmc_project/FruDevice/2_72
>                   |-/xyz/openbmc_project/FruDevice/3_22
>                   |-/xyz/openbmc_project/FruDevice/3_50
>                   |-/xyz/openbmc_project/FruDevice/4_56
>                   |-/xyz/openbmc_project/FruDevice/5_48
>                   |-/xyz/openbmc_project/FruDevice/5_81
>                   |-/xyz/openbmc_project/FruDevice/6_73
>                   |-/xyz/openbmc_project/FruDevice/6_76
>                   |-/xyz/openbmc_project/FruDevice/6_77
>                   |-/xyz/openbmc_project/FruDevice/7_80
>                   |-/xyz/openbmc_project/FruDevice/7_88
>                   |-/xyz/openbmc_project/FruDevice/8_101
>                    `-/xyz/openbmc_project/FruDevice/hudsonbay    ß
> this is the probe name we define in JSON configuration
>
> Thanks.
>
> Regards,
> Chris Chen
> Legal Disclaimer :
> The information contained in this message may be privileged and
> confidential.
> It is intended to be read only by the individual or entity to whom it
> is addressed
> or by their designee. If the reader of this message is not the
> intended recipient,
> is strictly prohibited. If you have received this message in error,
> please immediately notify the sender and delete or destroy any copy
> of this message!

--
Best regards,
Andrei Kartashev



[-- Attachment #2: Type: text/html, Size: 11045 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* 回覆: 回覆: [entity-manager] Question about temperature sensor stops update
       [not found]     ` <a49158e3ebbc40465c73dae77a037643cdc2b7c3.camel@yadro.com>
@ 2021-11-01  9:29       ` Chris Chen (TPI)
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Chen (TPI) @ 2021-11-01  9:29 UTC (permalink / raw)
  To: Andrei Kartashev; +Cc: openbmc

[-- Attachment #1: Type: text/plain, Size: 6891 bytes --]

Hi Andrei,

I figured out the root cause is the sensor type I am using is ADT75 rather than TMP75. So it works after I changed the "Type": "ADT75" in the JSON configuration file and added ADT75 in the devices.hpp.

================
[   33.154935] lm75 6-0049: hwmon1: sensor 'adt75'
[   33.160287] i2c i2c-6: new_device: Instantiated device adt75 at 0x49
[   33.169894] lm75 6-004c: hwmon2: sensor 'adt75'
[   33.175201] i2c i2c-6: new_device: Instantiated device adt75 at 0x4c
[   33.184658] lm75 6-004d: hwmon3: sensor 'adt75'
[   33.190007] i2c i2c-6: new_device: Instantiated device adt75 at 0x4d

root@hudsonbay-obmc:~# cat /sys/bus/i2c/devices/6-004d/hwmon/hwmon3/temp1_input
41312
root@hudsonbay-obmc:~# cat /sys/bus/i2c/devices/6-004d/hwmon/hwmon3/temp1_input
41375
================

Thank you for your support.

Regards,
Chris Chen

________________________________
寄件者: Andrei Kartashev <a.kartashev@yadro.com>
寄件日期: 2021年10月29日 下午 05:45
收件者: Chris Chen (TPI) <Chris.Chen3@flex.com>
主旨: Re: 回覆: [entity-manager] Question about temperature sensor stops update

Oh, that sounds really strange. Are you sure?
When you read it raw (cat /sys/bus/i2c/devices/6-
004d/hwmon/hwmon3/temp1_input) is it also always same? If yes, then, it
is something in kernel - try to experiment with new_device sysfs
interface.

On Fri, 2021-10-29 at 08:50 +0000, Chris Chen (TPI) wrote:
> Hi Andrei,
>
> Thanks for your prompt reply and the explanation of #2, I understood
> now.
>
> For question #1, let me rephrase it, please. I mean the temperature
> value I read is always the same. The value always shows 40.187, it
> wouldn't be changed even I read it again after a while. But if I
> declare the temp sensors on the I2C bus node in my dts, the value will
> change all the time. Do you have any idea about this?
>
>
> Regards,
> Chris Chen
>
> 寄件者: Andrei Kartashev <a.kartashev@yadro.com>
> 寄件日期: 2021年10月29日 下午 04:33
> 收件者: Chris Chen (TPI) <Chris.Chen3@flex.com>; openbmc@lists.ozlabs.org
> <openbmc@lists.ozlabs.org>
> 主旨: Re: [entity-manager] Question about temperature sensor stops
> update
> Hello,
>
> I didn't catch, what is your problem. As I see from the logs,
> everything is fine: temp sensors instantiated, dbus objects created,
> readings present. What's wrong?
>
> As for FruDevice: yes, it's kind of weird behaviour: it exposes not
> only actual FRU devices but also other I2C devices. You can introspect
> that objects and see that they exposes
> xyz.openbmc_project.Inventory.Item.I2CDevice interface instead of
> xyz.openbmc_project.FruDevice
>
> On Fri, 2021-10-29 at 08:02 +0000, Chris Chen (TPI) wrote:FruDevice
> > Hi everyone,
> >
> > Actually, I have 2 questions as below:
> >    1. I got understood from others on the mailing list, that I don't
> > have to declare EEPROM or temp sensors on the I2C bus node in my dts,
> > and it should be fine even I did it at the beginning. So I tried to
> > remove this declaration in dts, then the sensor value I got is fixed,
> > no update. Can someone help to take look at why it is?
> >              Here are some logs that appeared automatically after the
> > system booted up.  It looks like that entity-manager works fine. And
> > the commands I used to check value.
> >              =======================================
> >              [   23.713596] lm75 6-0049: hwmon1: sensor 'tmp75'
> >              [   23.718894] i2c i2c-6: new_device: Instantiated
> > device tmp75 at 0x49
> >              [   23.728520] lm75 6-004c: hwmon2: sensor 'tmp75'
> >              [   23.733779] i2c i2c-6: new_device: Instantiated
> > device tmp75 at 0x4c
> >             [   23.743707] lm75 6-004d: hwmon3: sensor 'tmp75'
> >             [   23.749042] i2c i2c-6: new_device: Instantiated device
> > tmp75 at 0x4d
> >
> >              # busctl introspect xyz.openbmc_project.HwmonTempSensor
> > /xyz/openbmc_project/sensors/temperature/DIMM_P1_EFGH
> >              xyz.openbmc_project.Sensor.Value
> >  interface -         -                                        -
> >              .MaxValue
> > property  d         127                                      emits-
> > change
> >              .MinValue
> > property  d         -128                                     emits-
> > change
> >              .Unit
> > property  s         "xyz.openbmc_project.Sensor.Value.Uni... emits-
> > change
> >              .Value
> >  property  d        40.187                                   emits-
> > change writable
> >
> >              # cat /sys/bus/i2c/devices/6-
> > 004d/hwmon/hwmon3/temp1_input
> >             40187
> >             =======================================
> >    1. From my understanding, there is "detection daemon" which scans
> > I2C bus looking for EEPROMs with IPMI FRU data. However, I found all
> > devices on the I2C buses would be listed, not only Fru devices, when
> > I used the command below. Is this correct?
> >             # busctl tree xyz.openbmc_project.FruDevice
> >             `-/xyz
> >               `-/xyz/openbmc_project
> >                 `-/xyz/openbmc_project/FruDevice
> >                   |-/xyz/openbmc_project/FruDevice/0_80
> >                   |-/xyz/openbmc_project/FruDevice/0_88
> >                   |-/xyz/openbmc_project/FruDevice/2_108
> >                   |-/xyz/openbmc_project/FruDevice/2_112
> >                   |-/xyz/openbmc_project/FruDevice/2_68
> >                   |-/xyz/openbmc_project/FruDevice/2_72
> >                   |-/xyz/openbmc_project/FruDevice/3_22
> >                   |-/xyz/openbmc_project/FruDevice/3_50
> >                   |-/xyz/openbmc_project/FruDevice/4_56
> >                   |-/xyz/openbmc_project/FruDevice/5_48
> >                   |-/xyz/openbmc_project/FruDevice/5_81
> >                   |-/xyz/openbmc_project/FruDevice/6_73
> >                   |-/xyz/openbmc_project/FruDevice/6_76
> >                   |-/xyz/openbmc_project/FruDevice/6_77
> >                   |-/xyz/openbmc_project/FruDevice/7_80
> >                   |-/xyz/openbmc_project/FruDevice/7_88
> >                   |-/xyz/openbmc_project/FruDevice/8_101
> >                    `-/xyz/openbmc_project/FruDevice/hudsonbay    ß
> > this is the probe name we define in JSON configuration
> >
> > Thanks.
> >
> > Regards,
> > Chris Chen
> > Legal Disclaimer :
> > The information contained in this message may be privileged and
> > confidential.
> > It is intended to be read only by the individual or entity to whom it
> > is addressed
> > or by their designee. If the reader of this message is not the
> > intended recipient,
> > please immediately notify the sender and delete or destroy any copy
> > of this message!
>

--
Best regards,
Andrei Kartashev



[-- Attachment #2: Type: text/html, Size: 13758 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-11-01  9:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-29  8:02 [entity-manager] Question about temperature sensor stops update Chris Chen (TPI)
2021-10-29  8:33 ` Andrei Kartashev
2021-10-29  8:50   ` 回覆: " Chris Chen (TPI)
     [not found]     ` <a49158e3ebbc40465c73dae77a037643cdc2b7c3.camel@yadro.com>
2021-11-01  9:29       ` 回覆: " Chris Chen (TPI)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).