All of lore.kernel.org
 help / color / mirror / Atom feed
* Add phosphor-fan configuration for the fan which added by dbus-sensor
@ 2021-05-06  9:22 Thu Nguyen OS
  2021-05-06  9:40 ` Andrei Kartashev
  2021-05-06 13:08 ` Matthew Barth
  0 siblings, 2 replies; 15+ messages in thread
From: Thu Nguyen OS @ 2021-05-06  9:22 UTC (permalink / raw)
  To: openbmc

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

Hi,

I’m supporting the fan control algorithms using phosphor-fan. Phosphor-fan monitoring and controlling require interface xyz.openbmc_project.Control.FanPwm in the fan inventory object.
https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/inventory.md

But FanSensor daemon of dbus-sensor only adds /xyz/openbmc_project/sensors/fan_tach to inventory list, and this path don’t support xyz.openbmc_project.Control.FanPwm interface.

Do you have any solution to make phosphor-fan work with dbus-sensor?

I’m currently update FanSensor in dbus-sensor to add xyz.openbmc_project.Control.FanPwm to /xyz/openbmc_project/sensors/fan_tach.

Regards.
Thu Nguyen.

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

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

* Re: Add phosphor-fan configuration for the fan which added by dbus-sensor
  2021-05-06  9:22 Add phosphor-fan configuration for the fan which added by dbus-sensor Thu Nguyen OS
@ 2021-05-06  9:40 ` Andrei Kartashev
  2021-05-06 13:13   ` Matthew Barth
  2021-05-06 13:08 ` Matthew Barth
  1 sibling, 1 reply; 15+ messages in thread
From: Andrei Kartashev @ 2021-05-06  9:40 UTC (permalink / raw)
  To: Thu Nguyen OS, openbmc

Hello,

I guess, when using dbus-sensors, you supposed to use phosphor-pid-
control package to control fans.

On Thu, 2021-05-06 at 09:22 +0000, Thu Nguyen OS wrote:
> Hi,
>  
> I’m supporting the fan control algorithms using phosphor-fan.
> Phosphor-fan monitoring and controlling require interface
> xyz.openbmc_project.Control.FanPwm in the fan inventory object.
> https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/inventory.md
>  
> But FanSensor daemon of dbus-sensor only adds
> /xyz/openbmc_project/sensors/fan_tach to inventory list, and this
> path don’t support xyz.openbmc_project.Control.FanPwm interface.
>  
> Do you have any solution to make phosphor-fan work with dbus-sensor?
>  
> I’m currently update FanSensor in dbus-sensor to add
> xyz.openbmc_project.Control.FanPwm to
> /xyz/openbmc_project/sensors/fan_tach.
>  
> Regards.
> Thu Nguyen.

-- 
Best regards,
Andrei Kartashev



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

* Re: Add phosphor-fan configuration for the fan which added by dbus-sensor
  2021-05-06  9:22 Add phosphor-fan configuration for the fan which added by dbus-sensor Thu Nguyen OS
  2021-05-06  9:40 ` Andrei Kartashev
@ 2021-05-06 13:08 ` Matthew Barth
  2021-05-06 15:59   ` Thu Nguyen OS
  1 sibling, 1 reply; 15+ messages in thread
From: Matthew Barth @ 2021-05-06 13:08 UTC (permalink / raw)
  To: Thu Nguyen OS, openbmc


On 5/6/21 4:22 AM, Thu Nguyen OS wrote:
> Hi,
>
> I’m supporting the fan control algorithms using phosphor-fan. Phosphor-fan monitoring and controlling require interface xyz.openbmc_project.Control.FanPwm in the fan inventory object.
That is a sensor interface, not an interface that's added to inventory objects
> https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/inventory.md
What you linked to here refers to where the fan inventory object is located and nothing to do with with the fan sensors that fan monitor is to be monitoring.
>
> But FanSensor daemon of dbus-sensor only adds /xyz/openbmc_project/sensors/fan_tach to inventory list, and this path don’t support xyz.openbmc_project.Control.FanPwm interface.
I cant speak to the support of dbus-sensors and the use of the FanPwm interface, but phosphor-fan-monitor can support either the use of RPM or PWM fan sensors for monitoring and updating the corresponding OperationalStatus of a fan in inventory.
https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/sensors.md

Supplying the ` "target_interface": "xyz.openbmc_project.Control.FanPwm" ` directs fan monitor to monitor the fan sensor using the Target property from that interface. When the "target_interface" is not provided on a fan sensor, the default is to use the "xyz.openbmc_project.Control.FanSpeed" (RPM) interface.
>
> Do you have any solution to make phosphor-fan work with dbus-sensor?
>
> I’m currently update FanSensor in dbus-sensor to add xyz.openbmc_project.Control.FanPwm to /xyz/openbmc_project/sensors/fan_tach.
Refer to the doc link I provided above on how to utilize monitoring fans that use a PWM target on that interface. Then phosphor-fan-monitor will update the fan inventory object's (as configured with https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/inventory.md) xyz.openbmc_project.State.Decorator.OperationalStatus Functional property based on how you configure fan monitor to monitor the fan sensors.
>
> Regards.
> Thu Nguyen.

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

* Re: Add phosphor-fan configuration for the fan which added by dbus-sensor
  2021-05-06  9:40 ` Andrei Kartashev
@ 2021-05-06 13:13   ` Matthew Barth
  0 siblings, 0 replies; 15+ messages in thread
From: Matthew Barth @ 2021-05-06 13:13 UTC (permalink / raw)
  To: Andrei Kartashev, Thu Nguyen OS, openbmc


On 5/6/21 4:40 AM, Andrei Kartashev wrote:
> Hello,
>
> I guess, when using dbus-sensors, you supposed to use phosphor-pid-
> control package to control fans.
Could you explain this statement further? These apps should be using the same fan sensor dbus interfaces to control fans, so there should be no reason the use of these apps together are required to control fans.
>
> On Thu, 2021-05-06 at 09:22 +0000, Thu Nguyen OS wrote:
>> Hi,
>>  
>> I’m supporting the fan control algorithms using phosphor-fan.
>> Phosphor-fan monitoring and controlling require interface
>> xyz.openbmc_project.Control.FanPwm in the fan inventory object.
>> https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/inventory.md
>>  
>> But FanSensor daemon of dbus-sensor only adds
>> /xyz/openbmc_project/sensors/fan_tach to inventory list, and this
>> path don’t support xyz.openbmc_project.Control.FanPwm interface.
>>  
>> Do you have any solution to make phosphor-fan work with dbus-sensor?
>>  
>> I’m currently update FanSensor in dbus-sensor to add
>> xyz.openbmc_project.Control.FanPwm to
>> /xyz/openbmc_project/sensors/fan_tach.
>>  
>> Regards.
>> Thu Nguyen.

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

* Re: Add phosphor-fan configuration for the fan which added by dbus-sensor
  2021-05-06 13:08 ` Matthew Barth
@ 2021-05-06 15:59   ` Thu Nguyen OS
  2021-05-06 16:30     ` Matthew Barth
  0 siblings, 1 reply; 15+ messages in thread
From: Thu Nguyen OS @ 2021-05-06 15:59 UTC (permalink / raw)
  To: Matthew Barth, openbmc



On 06/05/2021, 20:09, "Matthew Barth" <msbarth@linux.ibm.com> wrote:


    On 5/6/21 4:22 AM, Thu Nguyen OS wrote:
    > Hi,
    >
    > I’m supporting the fan control algorithms using phosphor-fan. Phosphor-fan monitoring and controlling require interface xyz.openbmc_project.Control.FanPwm in the fan inventory object.
    That is a sensor interface, not an interface that's added to inventory objects
    > https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/inventory.md
    What you linked to here refers to where the fan inventory object is located and nothing to do with with the fan sensors that fan monitor is to be monitoring.

[Thu Nguyen] The link detail about the inventory configuration in monitor.yaml for fan monitor  and fan.yaml for fan control feature. It should be " The relative path under inventory where the fan's inventory object exists ".

Look at the example of the fan control configuration  file named fan.yaml below you can see the yaml file includes "inventory" setting. And xyz.openbmc_project.Control.FanPwm interface is required interface for that inventory path.
https://github.com/openbmc/phosphor-fan-presence/blob/master/control/example/fans.yaml

    >
    > But FanSensor daemon of dbus-sensor only adds /xyz/openbmc_project/sensors/fan_tach to inventory list, and this path don’t support xyz.openbmc_project.Control.FanPwm interface.
    I cant speak to the support of dbus-sensors and the use of the FanPwm interface, but phosphor-fan-monitor can support either the use of RPM or PWM fan sensors for monitoring and updating the corresponding OperationalStatus of a fan in inventory.
    https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/sensors.md

    Supplying the ` "target_interface": "xyz.openbmc_project.Control.FanPwm" ` directs fan monitor to monitor the fan sensor using the Target property from that interface. When the "target_interface" is not provided on a fan sensor, the default is to use the "xyz.openbmc_project.Control.FanSpeed" (RPM) interface.
[Thu Nguyen]
The point here is the phosphor-fan-monitor/control expect xyz.openbmc_project.Control.FanPwm or xyz.openbmc_project.Control.FanSpeed is included in /xyz/openbmc_project/sensors/fan_tach.
But dbus-sensor don't support that. In dbus sensor xyz.openbmc_project.Control.FanPwm is only available in /xyz/openbmc_project/control/fanpwm.
    >
    > Do you have any solution to make phosphor-fan work with dbus-sensor?
    >
    > I’m currently update FanSensor in dbus-sensor to add xyz.openbmc_project.Control.FanPwm to /xyz/openbmc_project/sensors/fan_tach.
    Refer to the doc link I provided above on how to utilize monitoring fans that use a PWM target on that interface. Then phosphor-fan-monitor will update the fan inventory object's (as configured with https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/inventory.md) xyz.openbmc_project.State.Decorator.OperationalStatus Functional property based on how you configure fan monitor to monitor the fan sensors.
    >
    > Regards.
    > Thu Nguyen.


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

* Re: Add phosphor-fan configuration for the fan which added by dbus-sensor
  2021-05-06 15:59   ` Thu Nguyen OS
@ 2021-05-06 16:30     ` Matthew Barth
  2021-05-06 22:34       ` Thu Nguyen OS
  0 siblings, 1 reply; 15+ messages in thread
From: Matthew Barth @ 2021-05-06 16:30 UTC (permalink / raw)
  To: Thu Nguyen OS, openbmc


On 5/6/21 10:59 AM, Thu Nguyen OS wrote:
>
> On 06/05/2021, 20:09, "Matthew Barth" <msbarth@linux.ibm.com> wrote:
>
>
>     On 5/6/21 4:22 AM, Thu Nguyen OS wrote:
>     > Hi,
>     >
>     > I’m supporting the fan control algorithms using phosphor-fan. Phosphor-fan monitoring and controlling require interface xyz.openbmc_project.Control.FanPwm in the fan inventory object.
>     That is a sensor interface, not an interface that's added to inventory objects
>     > https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/inventory.md
>     What you linked to here refers to where the fan inventory object is located and nothing to do with with the fan sensors that fan monitor is to be monitoring.
>
> [Thu Nguyen] The link detail about the inventory configuration in monitor.yaml for fan monitor  and fan.yaml for fan control feature. It should be " The relative path under inventory where the fan's inventory object exists ".

The README links refer to the use of JSON config files in place of YAML. YAML based configs for the fan presence and fan monitor applications has been deprecated, so please use JSON based configs instead. Fan control is in the process of getting converted to JSON based configs so that it too can have its YAML based config support deprecated. To enable the use of JSON, supply "json" to the PACKAGECONFIG and to continue using YAML based fan control, also provide "--disable-json-control" until fan control's support of JSON is completed. i.e.) https://github.com/openbmc/openbmc/blob/master/meta-ibm/recipes-phosphor/fans/phosphor-fan_%25.bbappend#L59-L60

> Look at the example of the fan control configuration  file named fan.yaml below you can see the yaml file includes "inventory" setting. And xyz.openbmc_project.Control.FanPwm interface is required interface for that inventory path.
> https://github.com/openbmc/phosphor-fan-presence/blob/master/control/example/fans.yaml
Now to address what you're seeing, the "inventory" entry for fans.yaml is just used to name a fan object created within fan control and not related to anything actually in dbus inventory. This will become "name" in the JSON based (fans.json) for fan control.
>     >
>     > But FanSensor daemon of dbus-sensor only adds /xyz/openbmc_project/sensors/fan_tach to inventory list, and this path don’t support xyz.openbmc_project.Control.FanPwm interface.
>     I cant speak to the support of dbus-sensors and the use of the FanPwm interface, but phosphor-fan-monitor can support either the use of RPM or PWM fan sensors for monitoring and updating the corresponding OperationalStatus of a fan in inventory.
>     https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/sensors.md
>
>     Supplying the ` "target_interface": "xyz.openbmc_project.Control.FanPwm" ` directs fan monitor to monitor the fan sensor using the Target property from that interface. When the "target_interface" is not provided on a fan sensor, the default is to use the "xyz.openbmc_project.Control.FanSpeed" (RPM) interface.
> [Thu Nguyen]
> The point here is the phosphor-fan-monitor/control expect xyz.openbmc_project.Control.FanPwm or xyz.openbmc_project.Control.FanSpeed is included in /xyz/openbmc_project/sensors/fan_tach.
> But dbus-sensor don't support that. In dbus sensor xyz.openbmc_project.Control.FanPwm is only available in /xyz/openbmc_project/control/fanpwm.
Ok, that clarifies things...and I welcome a proposed change to support the different dbus object paths in which the xyz.openbmc_project.Control.* interfaces that the fan sensors can be be at. Before dbus-sensors existed in openbmc, the fan sensors were provided by phosphor-hwmon on the dbus object path of /xyz/openbmc_project/sensors/fan_tach regardless of being PWM or RPM so that's why they are looking at that path.
>     >
>     > Do you have any solution to make phosphor-fan work with dbus-sensor?
>     >
>     > I’m currently update FanSensor in dbus-sensor to add xyz.openbmc_project.Control.FanPwm to /xyz/openbmc_project/sensors/fan_tach.
>     Refer to the doc link I provided above on how to utilize monitoring fans that use a PWM target on that interface. Then phosphor-fan-monitor will update the fan inventory object's (as configured with https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/inventory.md) xyz.openbmc_project.State.Decorator.OperationalStatus Functional property based on how you configure fan monitor to monitor the fan sensors.
>     >
>     > Regards.
>     > Thu Nguyen.
>

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

* Re: Add phosphor-fan configuration for the fan which added by dbus-sensor
  2021-05-06 16:30     ` Matthew Barth
@ 2021-05-06 22:34       ` Thu Nguyen OS
  2021-05-07 16:22         ` Matthew Barth
  0 siblings, 1 reply; 15+ messages in thread
From: Thu Nguyen OS @ 2021-05-06 22:34 UTC (permalink / raw)
  To: Matthew Barth, openbmc



On 06/05/2021, 23:30, "Matthew Barth" <msbarth@linux.ibm.com> wrote:


    On 5/6/21 10:59 AM, Thu Nguyen OS wrote:
    >
    > On 06/05/2021, 20:09, "Matthew Barth" <msbarth@linux.ibm.com> wrote:
    >
    >
    >     On 5/6/21 4:22 AM, Thu Nguyen OS wrote:
    >     > Hi,
    >     >
    >     > I’m supporting the fan control algorithms using phosphor-fan. Phosphor-fan monitoring and controlling require interface xyz.openbmc_project.Control.FanPwm in the fan inventory object.
    >     That is a sensor interface, not an interface that's added to inventory objects
    >     > https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/inventory.md
    >     What you linked to here refers to where the fan inventory object is located and nothing to do with with the fan sensors that fan monitor is to be monitoring.
    >
    > [Thu Nguyen] The link detail about the inventory configuration in monitor.yaml for fan monitor  and fan.yaml for fan control feature. It should be " The relative path under inventory where the fan's inventory object exists ".

    The README links refer to the use of JSON config files in place of YAML. YAML based configs for the fan presence and fan monitor applications has been deprecated, so please use JSON based configs instead. Fan control is in the process of getting converted to JSON based configs so that it too can have its YAML based config support deprecated. To enable the use of JSON, supply "json" to the PACKAGECONFIG and to continue using YAML based fan control, also provide "--disable-json-control" until fan control's support of JSON is completed. i.e.) https://github.com/openbmc/openbmc/blob/master/meta-ibm/recipes-phosphor/fans/phosphor-fan_%25.bbappend#L59-L60

    > Look at the example of the fan control configuration  file named fan.yaml below you can see the yaml file includes "inventory" setting. And xyz.openbmc_project.Control.FanPwm interface is required interface for that inventory path.
    > https://github.com/openbmc/phosphor-fan-presence/blob/master/control/example/fans.yaml
    Now to address what you're seeing, the "inventory" entry for fans.yaml is just used to name a fan object created within fan control and not related to anything actually in dbus inventory. This will become "name" in the JSON based (fans.json) for fan control.
    >     >
    >     > But FanSensor daemon of dbus-sensor only adds /xyz/openbmc_project/sensors/fan_tach to inventory list, and this path don’t support xyz.openbmc_project.Control.FanPwm interface.
    >     I cant speak to the support of dbus-sensors and the use of the FanPwm interface, but phosphor-fan-monitor can support either the use of RPM or PWM fan sensors for monitoring and updating the corresponding OperationalStatus of a fan in inventory.
    >     https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/sensors.md
    >
    >     Supplying the ` "target_interface": "xyz.openbmc_project.Control.FanPwm" ` directs fan monitor to monitor the fan sensor using the Target property from that interface. When the "target_interface" is not provided on a fan sensor, the default is to use the "xyz.openbmc_project.Control.FanSpeed" (RPM) interface.
    > [Thu Nguyen]
    > The point here is the phosphor-fan-monitor/control expect xyz.openbmc_project.Control.FanPwm or xyz.openbmc_project.Control.FanSpeed is included in /xyz/openbmc_project/sensors/fan_tach.
    > But dbus-sensor don't support that. In dbus sensor xyz.openbmc_project.Control.FanPwm is only available in /xyz/openbmc_project/control/fanpwm.
    Ok, that clarifies things...and I welcome a proposed change to support the different dbus object paths in which the xyz.openbmc_project.Control.* interfaces that the fan sensors can be be at. Before dbus-sensors existed in openbmc, the fan sensors were provided by phosphor-hwmon on the dbus object path of /xyz/openbmc_project/sensors/fan_tach regardless of being PWM or RPM so that's why they are looking at that path.

[Thu Nguyen]
How about add target_path option in fan.yaml and monitor.yaml to set the dbus object path?
Example:
target_path: /xyz/openbmc_project/control/fanpwm.
The setting of target_path will override value of "FAN_SENSOR_PATH" in fan.cpp and tach_sensor.hpp.

    >     >
    >     > Do you have any solution to make phosphor-fan work with dbus-sensor?
    >     >
    >     > I’m currently update FanSensor in dbus-sensor to add xyz.openbmc_project.Control.FanPwm to /xyz/openbmc_project/sensors/fan_tach.
    >     Refer to the doc link I provided above on how to utilize monitoring fans that use a PWM target on that interface. Then phosphor-fan-monitor will update the fan inventory object's (as configured with https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/inventory.md) xyz.openbmc_project.State.Decorator.OperationalStatus Functional property based on how you configure fan monitor to monitor the fan sensors.
    >     >
    >     > Regards.
    >     > Thu Nguyen.
    >


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

* Re: Add phosphor-fan configuration for the fan which added by dbus-sensor
  2021-05-06 22:34       ` Thu Nguyen OS
@ 2021-05-07 16:22         ` Matthew Barth
  2021-05-08 16:41           ` Thu Nguyen
  0 siblings, 1 reply; 15+ messages in thread
From: Matthew Barth @ 2021-05-07 16:22 UTC (permalink / raw)
  To: Thu Nguyen OS, openbmc


On 5/6/21 5:34 PM, Thu Nguyen OS wrote:
>
> On 06/05/2021, 23:30, "Matthew Barth" <msbarth@linux.ibm.com> wrote:
>
>
>     On 5/6/21 10:59 AM, Thu Nguyen OS wrote:
>     >
>     > On 06/05/2021, 20:09, "Matthew Barth" <msbarth@linux.ibm.com> wrote:
>     >
>     >
>     >     On 5/6/21 4:22 AM, Thu Nguyen OS wrote:
>     >     > Hi,
>     >     >
>     >     > I’m supporting the fan control algorithms using phosphor-fan. Phosphor-fan monitoring and controlling require interface xyz.openbmc_project.Control.FanPwm in the fan inventory object.
>     >     That is a sensor interface, not an interface that's added to inventory objects
>     >     > https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/inventory.md
>     >     What you linked to here refers to where the fan inventory object is located and nothing to do with with the fan sensors that fan monitor is to be monitoring.
>     >
>     > [Thu Nguyen] The link detail about the inventory configuration in monitor.yaml for fan monitor  and fan.yaml for fan control feature. It should be " The relative path under inventory where the fan's inventory object exists ".
>
>     The README links refer to the use of JSON config files in place of YAML. YAML based configs for the fan presence and fan monitor applications has been deprecated, so please use JSON based configs instead. Fan control is in the process of getting converted to JSON based configs so that it too can have its YAML based config support deprecated. To enable the use of JSON, supply "json" to the PACKAGECONFIG and to continue using YAML based fan control, also provide "--disable-json-control" until fan control's support of JSON is completed. i.e.) https://github.com/openbmc/openbmc/blob/master/meta-ibm/recipes-phosphor/fans/phosphor-fan_%25.bbappend#L59-L60
>
>     > Look at the example of the fan control configuration  file named fan.yaml below you can see the yaml file includes "inventory" setting. And xyz.openbmc_project.Control.FanPwm interface is required interface for that inventory path.
>     > https://github.com/openbmc/phosphor-fan-presence/blob/master/control/example/fans.yaml
>     Now to address what you're seeing, the "inventory" entry for fans.yaml is just used to name a fan object created within fan control and not related to anything actually in dbus inventory. This will become "name" in the JSON based (fans.json) for fan control.
>     >     >
>     >     > But FanSensor daemon of dbus-sensor only adds /xyz/openbmc_project/sensors/fan_tach to inventory list, and this path don’t support xyz.openbmc_project.Control.FanPwm interface.
>     >     I cant speak to the support of dbus-sensors and the use of the FanPwm interface, but phosphor-fan-monitor can support either the use of RPM or PWM fan sensors for monitoring and updating the corresponding OperationalStatus of a fan in inventory.
>     >     https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/sensors.md
>     >
>     >     Supplying the ` "target_interface": "xyz.openbmc_project.Control.FanPwm" ` directs fan monitor to monitor the fan sensor using the Target property from that interface. When the "target_interface" is not provided on a fan sensor, the default is to use the "xyz.openbmc_project.Control.FanSpeed" (RPM) interface.
>     > [Thu Nguyen]
>     > The point here is the phosphor-fan-monitor/control expect xyz.openbmc_project.Control.FanPwm or xyz.openbmc_project.Control.FanSpeed is included in /xyz/openbmc_project/sensors/fan_tach.
>     > But dbus-sensor don't support that. In dbus sensor xyz.openbmc_project.Control.FanPwm is only available in /xyz/openbmc_project/control/fanpwm.
>     Ok, that clarifies things...and I welcome a proposed change to support the different dbus object paths in which the xyz.openbmc_project.Control.* interfaces that the fan sensors can be be at. Before dbus-sensors existed in openbmc, the fan sensors were provided by phosphor-hwmon on the dbus object path of /xyz/openbmc_project/sensors/fan_tach regardless of being PWM or RPM so that's why they are looking at that path.
>
> [Thu Nguyen]
> How about add target_path option in fan.yaml and monitor.yaml to set the dbus object path?
> Example:
> target_path: /xyz/openbmc_project/control/fanpwm.
> The setting of target_path will override value of "FAN_SENSOR_PATH" in fan.cpp and tach_sensor.hpp.
Does dbus-sensors place the sensor value of the fan on the same dbus object path as the target? Fan monitor looks for the interfaces of both the target and the sensor value(feedback) on the same dbus object path.
>
>     >     >
>     >     > Do you have any solution to make phosphor-fan work with dbus-sensor?
>     >     >
>     >     > I’m currently update FanSensor in dbus-sensor to add xyz.openbmc_project.Control.FanPwm to /xyz/openbmc_project/sensors/fan_tach.
>     >     Refer to the doc link I provided above on how to utilize monitoring fans that use a PWM target on that interface. Then phosphor-fan-monitor will update the fan inventory object's (as configured with https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/inventory.md) xyz.openbmc_project.State.Decorator.OperationalStatus Functional property based on how you configure fan monitor to monitor the fan sensors.
>     >     >
>     >     > Regards.
>     >     > Thu Nguyen.
>     >
>

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

* Re: Add phosphor-fan configuration for the fan which added by dbus-sensor
  2021-05-07 16:22         ` Matthew Barth
@ 2021-05-08 16:41           ` Thu Nguyen
  2021-05-10 18:14             ` Matthew Barth
  0 siblings, 1 reply; 15+ messages in thread
From: Thu Nguyen @ 2021-05-08 16:41 UTC (permalink / raw)
  To: Matthew Barth, Thu Nguyen OS, openbmc


On 07/05/2021 23:22, Matthew Barth wrote:
> On 5/6/21 5:34 PM, Thu Nguyen OS wrote:
>> On 06/05/2021, 23:30, "Matthew Barth" <msbarth@linux.ibm.com> wrote:
>>
>>
>>      On 5/6/21 10:59 AM, Thu Nguyen OS wrote:
>>      >
>>      > On 06/05/2021, 20:09, "Matthew Barth" <msbarth@linux.ibm.com> wrote:
>>      >
>>      >
>>      >     On 5/6/21 4:22 AM, Thu Nguyen OS wrote:
>>      >     > Hi,
>>      >     >
>>      >     > I’m supporting the fan control algorithms using phosphor-fan. Phosphor-fan monitoring and controlling require interface xyz.openbmc_project.Control.FanPwm in the fan inventory object.
>>      >     That is a sensor interface, not an interface that's added to inventory objects
>>      >     > https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/inventory.md
>>      >     What you linked to here refers to where the fan inventory object is located and nothing to do with with the fan sensors that fan monitor is to be monitoring.
>>      >
>>      > [Thu Nguyen] The link detail about the inventory configuration in monitor.yaml for fan monitor  and fan.yaml for fan control feature. It should be " The relative path under inventory where the fan's inventory object exists ".
>>
>>      The README links refer to the use of JSON config files in place of YAML. YAML based configs for the fan presence and fan monitor applications has been deprecated, so please use JSON based configs instead. Fan control is in the process of getting converted to JSON based configs so that it too can have its YAML based config support deprecated. To enable the use of JSON, supply "json" to the PACKAGECONFIG and to continue using YAML based fan control, also provide "--disable-json-control" until fan control's support of JSON is completed. i.e.) https://github.com/openbmc/openbmc/blob/master/meta-ibm/recipes-phosphor/fans/phosphor-fan_%25.bbappend#L59-L60
>>
>>      > Look at the example of the fan control configuration  file named fan.yaml below you can see the yaml file includes "inventory" setting. And xyz.openbmc_project.Control.FanPwm interface is required interface for that inventory path.
>>      > https://github.com/openbmc/phosphor-fan-presence/blob/master/control/example/fans.yaml
>>      Now to address what you're seeing, the "inventory" entry for fans.yaml is just used to name a fan object created within fan control and not related to anything actually in dbus inventory. This will become "name" in the JSON based (fans.json) for fan control.
>>      >     >
>>      >     > But FanSensor daemon of dbus-sensor only adds /xyz/openbmc_project/sensors/fan_tach to inventory list, and this path don’t support xyz.openbmc_project.Control.FanPwm interface.
>>      >     I cant speak to the support of dbus-sensors and the use of the FanPwm interface, but phosphor-fan-monitor can support either the use of RPM or PWM fan sensors for monitoring and updating the corresponding OperationalStatus of a fan in inventory.
>>      >     https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/sensors.md
>>      >
>>      >     Supplying the ` "target_interface": "xyz.openbmc_project.Control.FanPwm" ` directs fan monitor to monitor the fan sensor using the Target property from that interface. When the "target_interface" is not provided on a fan sensor, the default is to use the "xyz.openbmc_project.Control.FanSpeed" (RPM) interface.
>>      > [Thu Nguyen]
>>      > The point here is the phosphor-fan-monitor/control expect xyz.openbmc_project.Control.FanPwm or xyz.openbmc_project.Control.FanSpeed is included in /xyz/openbmc_project/sensors/fan_tach.
>>      > But dbus-sensor don't support that. In dbus sensor xyz.openbmc_project.Control.FanPwm is only available in /xyz/openbmc_project/control/fanpwm.
>>      Ok, that clarifies things...and I welcome a proposed change to support the different dbus object paths in which the xyz.openbmc_project.Control.* interfaces that the fan sensors can be be at. Before dbus-sensors existed in openbmc, the fan sensors were provided by phosphor-hwmon on the dbus object path of /xyz/openbmc_project/sensors/fan_tach regardless of being PWM or RPM so that's why they are looking at that path.
>>
>> [Thu Nguyen]
>> How about add target_path option in fan.yaml and monitor.yaml to set the dbus object path?
>> Example:
>> target_path: /xyz/openbmc_project/control/fanpwm.
>> The setting of target_path will override value of "FAN_SENSOR_PATH" in fan.cpp and tach_sensor.hpp.
> Does dbus-sensors place the sensor value of the fan on the same dbus object path as the target? Fan monitor looks for the interfaces of both the target and the sensor value(feedback) on the same dbus object path.

[Thu]

1. No. Dbus-sensor provided three difference path for one fan:

/xyz/openbmc_project/control/fanpwm/<Name> have 
xyz.openbmc_project.Control.FanPwm.Target to control fan.

/xyz/openbmc_project/sensors/fan_tach/<Name> have fan tach value in 
xyz.openbmc_project.Sensor.Value.Value.

/xyz/openbmc_project/sensors/fan_pwm<Name> have fan Pwm value in 
xyz.openbmc_project.Sensor.Value.Value.


2. I tried to update fan control to support "target_path" option, but 
still have issue with fan monitor.


3. I wonder when I set has_target=false in monitor.yaml, the fan 
functional in inventory is set as false.

If don't have the fanpwm value, fan monitor should bypass checking fan 
failure in programming speed.

Is this right?

>>      >     >
>>      >     > Do you have any solution to make phosphor-fan work with dbus-sensor?
>>      >     >
>>      >     > I’m currently update FanSensor in dbus-sensor to add xyz.openbmc_project.Control.FanPwm to /xyz/openbmc_project/sensors/fan_tach.
>>      >     Refer to the doc link I provided above on how to utilize monitoring fans that use a PWM target on that interface. Then phosphor-fan-monitor will update the fan inventory object's (as configured with https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/inventory.md) xyz.openbmc_project.State.Decorator.OperationalStatus Functional property based on how you configure fan monitor to monitor the fan sensors.
>>      >     >
>>      >     > Regards.
>>      >     > Thu Nguyen.
>>      >
>>

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

* Re: Add phosphor-fan configuration for the fan which added by dbus-sensor
  2021-05-08 16:41           ` Thu Nguyen
@ 2021-05-10 18:14             ` Matthew Barth
  2021-05-11 14:11               ` Thu Nguyen
  0 siblings, 1 reply; 15+ messages in thread
From: Matthew Barth @ 2021-05-10 18:14 UTC (permalink / raw)
  To: Thu Nguyen, Thu Nguyen OS, openbmc


On 5/8/21 11:41 AM, Thu Nguyen wrote:
>
> On 07/05/2021 23:22, Matthew Barth wrote:
>> On 5/6/21 5:34 PM, Thu Nguyen OS wrote:
>>> On 06/05/2021, 23:30, "Matthew Barth" <msbarth@linux.ibm.com> wrote:
>>>
>>>
>>>      On 5/6/21 10:59 AM, Thu Nguyen OS wrote:
>>>      >
>>>      > On 06/05/2021, 20:09, "Matthew Barth" <msbarth@linux.ibm.com> wrote:
>>>      >
>>>      >
>>>      >     On 5/6/21 4:22 AM, Thu Nguyen OS wrote:
>>>      >     > Hi,
>>>      >     >
>>>      >     > I’m supporting the fan control algorithms using phosphor-fan. Phosphor-fan monitoring and controlling require interface xyz.openbmc_project.Control.FanPwm in the fan inventory object.
>>>      >     That is a sensor interface, not an interface that's added to inventory objects
>>>      >     > https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/inventory.md
>>>      >     What you linked to here refers to where the fan inventory object is located and nothing to do with with the fan sensors that fan monitor is to be monitoring.
>>>      >
>>>      > [Thu Nguyen] The link detail about the inventory configuration in monitor.yaml for fan monitor  and fan.yaml for fan control feature. It should be " The relative path under inventory where the fan's inventory object exists ".
>>>
>>>      The README links refer to the use of JSON config files in place of YAML. YAML based configs for the fan presence and fan monitor applications has been deprecated, so please use JSON based configs instead. Fan control is in the process of getting converted to JSON based configs so that it too can have its YAML based config support deprecated. To enable the use of JSON, supply "json" to the PACKAGECONFIG and to continue using YAML based fan control, also provide "--disable-json-control" until fan control's support of JSON is completed. i.e.) https://github.com/openbmc/openbmc/blob/master/meta-ibm/recipes-phosphor/fans/phosphor-fan_%25.bbappend#L59-L60
>>>
>>>      > Look at the example of the fan control configuration  file named fan.yaml below you can see the yaml file includes "inventory" setting. And xyz.openbmc_project.Control.FanPwm interface is required interface for that inventory path.
>>>      > https://github.com/openbmc/phosphor-fan-presence/blob/master/control/example/fans.yaml
>>>      Now to address what you're seeing, the "inventory" entry for fans.yaml is just used to name a fan object created within fan control and not related to anything actually in dbus inventory. This will become "name" in the JSON based (fans.json) for fan control.
>>>      >     >
>>>      >     > But FanSensor daemon of dbus-sensor only adds /xyz/openbmc_project/sensors/fan_tach to inventory list, and this path don’t support xyz.openbmc_project.Control.FanPwm interface.
>>>      >     I cant speak to the support of dbus-sensors and the use of the FanPwm interface, but phosphor-fan-monitor can support either the use of RPM or PWM fan sensors for monitoring and updating the corresponding OperationalStatus of a fan in inventory.
>>>      >     https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/sensors.md
>>>      >
>>>      >     Supplying the ` "target_interface": "xyz.openbmc_project.Control.FanPwm" ` directs fan monitor to monitor the fan sensor using the Target property from that interface. When the "target_interface" is not provided on a fan sensor, the default is to use the "xyz.openbmc_project.Control.FanSpeed" (RPM) interface.
>>>      > [Thu Nguyen]
>>>      > The point here is the phosphor-fan-monitor/control expect xyz.openbmc_project.Control.FanPwm or xyz.openbmc_project.Control.FanSpeed is included in /xyz/openbmc_project/sensors/fan_tach.
>>>      > But dbus-sensor don't support that. In dbus sensor xyz.openbmc_project.Control.FanPwm is only available in /xyz/openbmc_project/control/fanpwm.
>>>      Ok, that clarifies things...and I welcome a proposed change to support the different dbus object paths in which the xyz.openbmc_project.Control.* interfaces that the fan sensors can be be at. Before dbus-sensors existed in openbmc, the fan sensors were provided by phosphor-hwmon on the dbus object path of /xyz/openbmc_project/sensors/fan_tach regardless of being PWM or RPM so that's why they are looking at that path.
>>>
>>> [Thu Nguyen]
>>> How about add target_path option in fan.yaml and monitor.yaml to set the dbus object path?
>>> Example:
>>> target_path: /xyz/openbmc_project/control/fanpwm.
>>> The setting of target_path will override value of "FAN_SENSOR_PATH" in fan.cpp and tach_sensor.hpp.
>> Does dbus-sensors place the sensor value of the fan on the same dbus object path as the target? Fan monitor looks for the interfaces of both the target and the sensor value(feedback) on the same dbus object path.
>
> [Thu]
>
> 1. No. Dbus-sensor provided three difference path for one fan:
>
> /xyz/openbmc_project/control/fanpwm/<Name> have xyz.openbmc_project.Control.FanPwm.Target to control fan.
>
> /xyz/openbmc_project/sensors/fan_tach/<Name> have fan tach value in xyz.openbmc_project.Sensor.Value.Value.
>
> /xyz/openbmc_project/sensors/fan_pwm<Name> have fan Pwm value in xyz.openbmc_project.Sensor.Value.Value.
>
Ok, so then fan monitor would need to have the path given for the target and a separate path given for the sensor(feedback). My preference would be to have an optional `target_path` and optional `sensor_path` configuration options for the list of sensors on a fan to be monitored. These should be optional in the YAML based configs so we dont have to update all the configs of the systems upstream that were using YAML based fan monitoring.

>
> 2. I tried to update fan control to support "target_path" option, but still have issue with fan monitor.
>
This is fine as an optional argument in the fans.yaml file for fan control since it only deals with fan targets.
>
> 3. I wonder when I set has_target=false in monitor.yaml, the fan functional in inventory is set as false.
>
> If don't have the fanpwm value, fan monitor should bypass checking fan failure in programming speed.
>
> Is this right?
No it should not bypass it. If there is no target for the tach sensor(s) being monitored to compare their feedbacks against, then what is the point of monitoring that fan?
>
>>>      >     >
>>>      >     > Do you have any solution to make phosphor-fan work with dbus-sensor?
>>>      >     >
>>>      >     > I’m currently update FanSensor in dbus-sensor to add xyz.openbmc_project.Control.FanPwm to /xyz/openbmc_project/sensors/fan_tach.
>>>      >     Refer to the doc link I provided above on how to utilize monitoring fans that use a PWM target on that interface. Then phosphor-fan-monitor will update the fan inventory object's (as configured with https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/inventory.md) xyz.openbmc_project.State.Decorator.OperationalStatus Functional property based on how you configure fan monitor to monitor the fan sensors.
>>>      >     >
>>>      >     > Regards.
>>>      >     > Thu Nguyen.
>>>      >
>>>

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

* Re: Add phosphor-fan configuration for the fan which added by dbus-sensor
  2021-05-10 18:14             ` Matthew Barth
@ 2021-05-11 14:11               ` Thu Nguyen
  2021-05-11 18:25                 ` Matthew Barth
  0 siblings, 1 reply; 15+ messages in thread
From: Thu Nguyen @ 2021-05-11 14:11 UTC (permalink / raw)
  To: Matthew Barth, Thu Nguyen OS, openbmc


On 11/05/2021 01:14, Matthew Barth wrote:
> On 5/8/21 11:41 AM, Thu Nguyen wrote:
>> On 07/05/2021 23:22, Matthew Barth wrote:
>>> On 5/6/21 5:34 PM, Thu Nguyen OS wrote:
>>>> On 06/05/2021, 23:30, "Matthew Barth" <msbarth@linux.ibm.com> wrote:
>>>>
>>>>
>>>>       On 5/6/21 10:59 AM, Thu Nguyen OS wrote:
>>>>       >
>>>>       > On 06/05/2021, 20:09, "Matthew Barth" <msbarth@linux.ibm.com> wrote:
>>>>       >
>>>>       >
>>>>       >     On 5/6/21 4:22 AM, Thu Nguyen OS wrote:
>>>>       >     > Hi,
>>>>       >     >
>>>>       >     > I’m supporting the fan control algorithms using phosphor-fan. Phosphor-fan monitoring and controlling require interface xyz.openbmc_project.Control.FanPwm in the fan inventory object.
>>>>       >     That is a sensor interface, not an interface that's added to inventory objects
>>>>       >     > https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/inventory.md
>>>>       >     What you linked to here refers to where the fan inventory object is located and nothing to do with with the fan sensors that fan monitor is to be monitoring.
>>>>       >
>>>>       > [Thu Nguyen] The link detail about the inventory configuration in monitor.yaml for fan monitor  and fan.yaml for fan control feature. It should be " The relative path under inventory where the fan's inventory object exists ".
>>>>
>>>>       The README links refer to the use of JSON config files in place of YAML. YAML based configs for the fan presence and fan monitor applications has been deprecated, so please use JSON based configs instead. Fan control is in the process of getting converted to JSON based configs so that it too can have its YAML based config support deprecated. To enable the use of JSON, supply "json" to the PACKAGECONFIG and to continue using YAML based fan control, also provide "--disable-json-control" until fan control's support of JSON is completed. i.e.) https://github.com/openbmc/openbmc/blob/master/meta-ibm/recipes-phosphor/fans/phosphor-fan_%25.bbappend#L59-L60
>>>>
>>>>       > Look at the example of the fan control configuration  file named fan.yaml below you can see the yaml file includes "inventory" setting. And xyz.openbmc_project.Control.FanPwm interface is required interface for that inventory path.
>>>>       > https://github.com/openbmc/phosphor-fan-presence/blob/master/control/example/fans.yaml
>>>>       Now to address what you're seeing, the "inventory" entry for fans.yaml is just used to name a fan object created within fan control and not related to anything actually in dbus inventory. This will become "name" in the JSON based (fans.json) for fan control.
>>>>       >     >
>>>>       >     > But FanSensor daemon of dbus-sensor only adds /xyz/openbmc_project/sensors/fan_tach to inventory list, and this path don’t support xyz.openbmc_project.Control.FanPwm interface.
>>>>       >     I cant speak to the support of dbus-sensors and the use of the FanPwm interface, but phosphor-fan-monitor can support either the use of RPM or PWM fan sensors for monitoring and updating the corresponding OperationalStatus of a fan in inventory.
>>>>       >     https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/sensors.md
>>>>       >
>>>>       >     Supplying the ` "target_interface": "xyz.openbmc_project.Control.FanPwm" ` directs fan monitor to monitor the fan sensor using the Target property from that interface. When the "target_interface" is not provided on a fan sensor, the default is to use the "xyz.openbmc_project.Control.FanSpeed" (RPM) interface.
>>>>       > [Thu Nguyen]
>>>>       > The point here is the phosphor-fan-monitor/control expect xyz.openbmc_project.Control.FanPwm or xyz.openbmc_project.Control.FanSpeed is included in /xyz/openbmc_project/sensors/fan_tach.
>>>>       > But dbus-sensor don't support that. In dbus sensor xyz.openbmc_project.Control.FanPwm is only available in /xyz/openbmc_project/control/fanpwm.
>>>>       Ok, that clarifies things...and I welcome a proposed change to support the different dbus object paths in which the xyz.openbmc_project.Control.* interfaces that the fan sensors can be be at. Before dbus-sensors existed in openbmc, the fan sensors were provided by phosphor-hwmon on the dbus object path of /xyz/openbmc_project/sensors/fan_tach regardless of being PWM or RPM so that's why they are looking at that path.
>>>>
>>>> [Thu Nguyen]
>>>> How about add target_path option in fan.yaml and monitor.yaml to set the dbus object path?
>>>> Example:
>>>> target_path: /xyz/openbmc_project/control/fanpwm.
>>>> The setting of target_path will override value of "FAN_SENSOR_PATH" in fan.cpp and tach_sensor.hpp.
>>> Does dbus-sensors place the sensor value of the fan on the same dbus object path as the target? Fan monitor looks for the interfaces of both the target and the sensor value(feedback) on the same dbus object path.
>> [Thu]
>>
>> 1. No. Dbus-sensor provided three difference path for one fan:
>>
>> /xyz/openbmc_project/control/fanpwm/<Name> have xyz.openbmc_project.Control.FanPwm.Target to control fan.
>>
>> /xyz/openbmc_project/sensors/fan_tach/<Name> have fan tach value in xyz.openbmc_project.Sensor.Value.Value.
>>
>> /xyz/openbmc_project/sensors/fan_pwm<Name> have fan Pwm value in xyz.openbmc_project.Sensor.Value.Value.
>>
> Ok, so then fan monitor would need to have the path given for the target and a separate path given for the sensor(feedback). My preference would be to have an optional `target_path` and optional `sensor_path` configuration options for the list of sensors on a fan to be monitored. These should be optional in the YAML based configs so we dont have to update all the configs of the systems upstream that were using YAML based fan monitoring.
Yes, In that case we have to support two more option in 
phosphor-fan-monitor.
>
>> 2. I tried to update fan control to support "target_path" option, but still have issue with fan monitor.
>>
> This is fine as an optional argument in the fans.yaml file for fan control since it only deals with fan targets.
>> 3. I wonder when I set has_target=false in monitor.yaml, the fan functional in inventory is set as false.
>>
>> If don't have the fanpwm value, fan monitor should bypass checking fan failure in programming speed.
>>
>> Is this right?
> No it should not bypass it. If there is no target for the tach sensor(s) being monitored to compare their feedbacks against, then what is the point of monitoring that fan?
If has_target should always is true, then do we really need it?
>>>>       >     >
>>>>       >     > Do you have any solution to make phosphor-fan work with dbus-sensor?
>>>>       >     >
>>>>       >     > I’m currently update FanSensor in dbus-sensor to add xyz.openbmc_project.Control.FanPwm to /xyz/openbmc_project/sensors/fan_tach.
>>>>       >     Refer to the doc link I provided above on how to utilize monitoring fans that use a PWM target on that interface. Then phosphor-fan-monitor will update the fan inventory object's (as configured with https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/inventory.md) xyz.openbmc_project.State.Decorator.OperationalStatus Functional property based on how you configure fan monitor to monitor the fan sensors.
>>>>       >     >
>>>>       >     > Regards.
>>>>       >     > Thu Nguyen.
>>>>       >
>>>>

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

* Re: Add phosphor-fan configuration for the fan which added by dbus-sensor
  2021-05-11 14:11               ` Thu Nguyen
@ 2021-05-11 18:25                 ` Matthew Barth
  0 siblings, 0 replies; 15+ messages in thread
From: Matthew Barth @ 2021-05-11 18:25 UTC (permalink / raw)
  To: Thu Nguyen, Thu Nguyen OS, openbmc


On 5/11/21 9:11 AM, Thu Nguyen wrote:
>
> On 11/05/2021 01:14, Matthew Barth wrote:
>> On 5/8/21 11:41 AM, Thu Nguyen wrote:
>>> On 07/05/2021 23:22, Matthew Barth wrote:
>>>> On 5/6/21 5:34 PM, Thu Nguyen OS wrote:
>>>>> On 06/05/2021, 23:30, "Matthew Barth" <msbarth@linux.ibm.com> wrote:
>>>>>
>>>>>
>>>>>       On 5/6/21 10:59 AM, Thu Nguyen OS wrote:
>>>>>       >
>>>>>       > On 06/05/2021, 20:09, "Matthew Barth" <msbarth@linux.ibm.com> wrote:
>>>>>       >
>>>>>       >
>>>>>       >     On 5/6/21 4:22 AM, Thu Nguyen OS wrote:
>>>>>       >     > Hi,
>>>>>       >     >
>>>>>       >     > I’m supporting the fan control algorithms using phosphor-fan. Phosphor-fan monitoring and controlling require interface xyz.openbmc_project.Control.FanPwm in the fan inventory object.
>>>>>       >     That is a sensor interface, not an interface that's added to inventory objects
>>>>>       >     > https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/inventory.md
>>>>>       >     What you linked to here refers to where the fan inventory object is located and nothing to do with with the fan sensors that fan monitor is to be monitoring.
>>>>>       >
>>>>>       > [Thu Nguyen] The link detail about the inventory configuration in monitor.yaml for fan monitor  and fan.yaml for fan control feature. It should be " The relative path under inventory where the fan's inventory object exists ".
>>>>>
>>>>>       The README links refer to the use of JSON config files in place of YAML. YAML based configs for the fan presence and fan monitor applications has been deprecated, so please use JSON based configs instead. Fan control is in the process of getting converted to JSON based configs so that it too can have its YAML based config support deprecated. To enable the use of JSON, supply "json" to the PACKAGECONFIG and to continue using YAML based fan control, also provide "--disable-json-control" until fan control's support of JSON is completed. i.e.) https://github.com/openbmc/openbmc/blob/master/meta-ibm/recipes-phosphor/fans/phosphor-fan_%25.bbappend#L59-L60
>>>>>
>>>>>       > Look at the example of the fan control configuration  file named fan.yaml below you can see the yaml file includes "inventory" setting. And xyz.openbmc_project.Control.FanPwm interface is required interface for that inventory path.
>>>>>       > https://github.com/openbmc/phosphor-fan-presence/blob/master/control/example/fans.yaml
>>>>>       Now to address what you're seeing, the "inventory" entry for fans.yaml is just used to name a fan object created within fan control and not related to anything actually in dbus inventory. This will become "name" in the JSON based (fans.json) for fan control.
>>>>>       >     >
>>>>>       >     > But FanSensor daemon of dbus-sensor only adds /xyz/openbmc_project/sensors/fan_tach to inventory list, and this path don’t support xyz.openbmc_project.Control.FanPwm interface.
>>>>>       >     I cant speak to the support of dbus-sensors and the use of the FanPwm interface, but phosphor-fan-monitor can support either the use of RPM or PWM fan sensors for monitoring and updating the corresponding OperationalStatus of a fan in inventory.
>>>>>       >     https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/sensors.md
>>>>>       >
>>>>>       >     Supplying the ` "target_interface": "xyz.openbmc_project.Control.FanPwm" ` directs fan monitor to monitor the fan sensor using the Target property from that interface. When the "target_interface" is not provided on a fan sensor, the default is to use the "xyz.openbmc_project.Control.FanSpeed" (RPM) interface.
>>>>>       > [Thu Nguyen]
>>>>>       > The point here is the phosphor-fan-monitor/control expect xyz.openbmc_project.Control.FanPwm or xyz.openbmc_project.Control.FanSpeed is included in /xyz/openbmc_project/sensors/fan_tach.
>>>>>       > But dbus-sensor don't support that. In dbus sensor xyz.openbmc_project.Control.FanPwm is only available in /xyz/openbmc_project/control/fanpwm.
>>>>>       Ok, that clarifies things...and I welcome a proposed change to support the different dbus object paths in which the xyz.openbmc_project.Control.* interfaces that the fan sensors can be be at. Before dbus-sensors existed in openbmc, the fan sensors were provided by phosphor-hwmon on the dbus object path of /xyz/openbmc_project/sensors/fan_tach regardless of being PWM or RPM so that's why they are looking at that path.
>>>>>
>>>>> [Thu Nguyen]
>>>>> How about add target_path option in fan.yaml and monitor.yaml to set the dbus object path?
>>>>> Example:
>>>>> target_path: /xyz/openbmc_project/control/fanpwm.
>>>>> The setting of target_path will override value of "FAN_SENSOR_PATH" in fan.cpp and tach_sensor.hpp.
>>>> Does dbus-sensors place the sensor value of the fan on the same dbus object path as the target? Fan monitor looks for the interfaces of both the target and the sensor value(feedback) on the same dbus object path.
>>> [Thu]
>>>
>>> 1. No. Dbus-sensor provided three difference path for one fan:
>>>
>>> /xyz/openbmc_project/control/fanpwm/<Name> have xyz.openbmc_project.Control.FanPwm.Target to control fan.
>>>
>>> /xyz/openbmc_project/sensors/fan_tach/<Name> have fan tach value in xyz.openbmc_project.Sensor.Value.Value.
>>>
>>> /xyz/openbmc_project/sensors/fan_pwm<Name> have fan Pwm value in xyz.openbmc_project.Sensor.Value.Value.
>>>
>> Ok, so then fan monitor would need to have the path given for the target and a separate path given for the sensor(feedback). My preference would be to have an optional `target_path` and optional `sensor_path` configuration options for the list of sensors on a fan to be monitored. These should be optional in the YAML based configs so we dont have to update all the configs of the systems upstream that were using YAML based fan monitoring.
> Yes, In that case we have to support two more option in phosphor-fan-monitor.
>>
>>> 2. I tried to update fan control to support "target_path" option, but still have issue with fan monitor.
>>>
>> This is fine as an optional argument in the fans.yaml file for fan control since it only deals with fan targets.
>>> 3. I wonder when I set has_target=false in monitor.yaml, the fan functional in inventory is set as false.
>>>
>>> If don't have the fanpwm value, fan monitor should bypass checking fan failure in programming speed.
>>>
>>> Is this right?
>> No it should not bypass it. If there is no target for the tach sensor(s) being monitored to compare their feedbacks against, then what is the point of monitoring that fan?
> If has_target should always is true, then do we really need it?

The `has_target` attribute is specific to the original use of phosphor-hwmon which provided the target and sensor value on the same dbus object path so that fan monitor knew which fan sensor also contained the target property.

In what you're looking to add in supporting separate dbus object paths between where the target property is to where the sensor value property is, then `has_target` is not necessary...but as I said, what you're adding needs to be optional to the config as to not cause issues to how the current configs are written for those machines using phosphor-hwmon w/ fan monitor. The use of the `target_path` that you're adding can ignore (not require) a `has_target` attribute.

>>>>>       >     >
>>>>>       >     > Do you have any solution to make phosphor-fan work with dbus-sensor?
>>>>>       >     >
>>>>>       >     > I’m currently update FanSensor in dbus-sensor to add xyz.openbmc_project.Control.FanPwm to /xyz/openbmc_project/sensors/fan_tach.
>>>>>       >     Refer to the doc link I provided above on how to utilize monitoring fans that use a PWM target on that interface. Then phosphor-fan-monitor will update the fan inventory object's (as configured with https://github.com/openbmc/phosphor-fan-presence/blob/master/docs/monitor/inventory.md) xyz.openbmc_project.State.Decorator.OperationalStatus Functional property based on how you configure fan monitor to monitor the fan sensors.
>>>>>       >     >
>>>>>       >     > Regards.
>>>>>       >     > Thu Nguyen.
>>>>>       >
>>>>>

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

* RE: Add phosphor-fan configuration for the fan which added by dbus-sensor
  2022-07-08 20:27 ` Matt Spinler
@ 2022-07-08 20:33   ` Maheswara Kurapati
  0 siblings, 0 replies; 15+ messages in thread
From: Maheswara Kurapati @ 2022-07-08 20:33 UTC (permalink / raw)
  To: Matt Spinler, Maheswara Kurapati (QUIC), openbmc

Thank you Matt.

Mahesh

-----Original Message-----
From: Matt Spinler <mspinler@linux.ibm.com> 
Sent: Friday, July 8, 2022 3:28 PM
To: Maheswara Kurapati (QUIC) <quic_mkurapat@quicinc.com>; openbmc@lists.ozlabs.org
Subject: Re: Add phosphor-fan configuration for the fan which added by dbus-sensor

WARNING: This email originated from outside of Qualcomm. Please be wary of any links or attachments, and do not enable macros.

On 7/5/2022 6:16 PM, Maheswara Kurapati (QUIC) wrote:
> Hi, I want to monitor a fan based on its tach which is controlled by 
> the pwm. Came across the below earlier discussion on this topic which 
> suggested to add two more configuration parameters “target_path”, and 
> an optional “sensor_path”.
> ZjQcmQRYFpfptBannerStart
> This Message Is From an External Sender This message came from outside 
> your organization.
> ZjQcmQRYFpfptBannerEnd
>
> Hi,
>
> I want to monitor a fan based on its tach which is controlled by the 
> pwm.  Came across the below earlier discussion on this topic which 
> suggested to add two more configuration parameters “target_path”, and 
> an optional “sensor_path”.  I did not find this code in the latest 
> phosphor-fan-presence.  Not sure if different tag names are used for 
> this purpose.  Can someone please let me know?
>
> https://lists.ozlabs.org/pipermail/openbmc/2021-May/026253.html
>

No, I never saw anything come through related to this.

> Thank you
>
> Mahesh
>


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

* Re: Add phosphor-fan configuration for the fan which added by dbus-sensor
  2022-07-05 23:16 Maheswara Kurapati (QUIC)
@ 2022-07-08 20:27 ` Matt Spinler
  2022-07-08 20:33   ` Maheswara Kurapati
  0 siblings, 1 reply; 15+ messages in thread
From: Matt Spinler @ 2022-07-08 20:27 UTC (permalink / raw)
  To: Maheswara Kurapati (QUIC), openbmc



On 7/5/2022 6:16 PM, Maheswara Kurapati (QUIC) wrote:
> Hi, I want to monitor a fan based on its tach which is controlled by 
> the pwm. Came across the below earlier discussion on this topic which 
> suggested to add two more configuration parameters “target_path”, and 
> an optional “sensor_path”.
> ZjQcmQRYFpfptBannerStart
> This Message Is From an External Sender
> This message came from outside your organization.
> ZjQcmQRYFpfptBannerEnd
>
> Hi,
>
> I want to monitor a fan based on its tach which is controlled by the 
> pwm.  Came across the below earlier discussion on this topic which 
> suggested to add two more configuration parameters “target_path”, and 
> an optional “sensor_path”.  I did not find this code in the latest 
> phosphor-fan-presence.  Not sure if different tag names are used for 
> this purpose.  Can someone please let me know?
>
> https://lists.ozlabs.org/pipermail/openbmc/2021-May/026253.html
>

No, I never saw anything come through related to this.

> Thank you
>
> Mahesh
>


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

* Add phosphor-fan configuration for the fan which added by dbus-sensor
@ 2022-07-05 23:16 Maheswara Kurapati (QUIC)
  2022-07-08 20:27 ` Matt Spinler
  0 siblings, 1 reply; 15+ messages in thread
From: Maheswara Kurapati (QUIC) @ 2022-07-05 23:16 UTC (permalink / raw)
  To: openbmc

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

Hi,

I want to monitor a fan based on its tach which is controlled by the pwm.  Came across the below earlier discussion on this topic which suggested to add two more configuration parameters "target_path", and an optional "sensor_path".  I did not find this code in the latest phosphor-fan-presence.  Not sure if different tag names are used for this purpose.  Can someone please let me know?
https://lists.ozlabs.org/pipermail/openbmc/2021-May/026253.html

Thank you
Mahesh

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

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

end of thread, other threads:[~2022-07-18  9:09 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-06  9:22 Add phosphor-fan configuration for the fan which added by dbus-sensor Thu Nguyen OS
2021-05-06  9:40 ` Andrei Kartashev
2021-05-06 13:13   ` Matthew Barth
2021-05-06 13:08 ` Matthew Barth
2021-05-06 15:59   ` Thu Nguyen OS
2021-05-06 16:30     ` Matthew Barth
2021-05-06 22:34       ` Thu Nguyen OS
2021-05-07 16:22         ` Matthew Barth
2021-05-08 16:41           ` Thu Nguyen
2021-05-10 18:14             ` Matthew Barth
2021-05-11 14:11               ` Thu Nguyen
2021-05-11 18:25                 ` Matthew Barth
2022-07-05 23:16 Maheswara Kurapati (QUIC)
2022-07-08 20:27 ` Matt Spinler
2022-07-08 20:33   ` Maheswara Kurapati

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.