* Testing Phosphor-pid-control
@ 2018-12-20 17:49 Vijay Khemka
2018-12-20 18:13 ` Tanous, Ed
0 siblings, 1 reply; 8+ messages in thread
From: Vijay Khemka @ 2018-12-20 17:49 UTC (permalink / raw)
To: OpenBMC Maillist
[-- Attachment #1: Type: text/plain, Size: 201 bytes --]
Team,
I am using phosphor-pid-control for controlling fan, how do I test this to verify if it is driving pwm correctly. Any ways to fake temperature and see if fan speeds changes.
Regards
-Vijay
[-- Attachment #2: Type: text/html, Size: 1930 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: Testing Phosphor-pid-control
2018-12-20 17:49 Testing Phosphor-pid-control Vijay Khemka
@ 2018-12-20 18:13 ` Tanous, Ed
2018-12-20 20:57 ` Vijay Khemka
0 siblings, 1 reply; 8+ messages in thread
From: Tanous, Ed @ 2018-12-20 18:13 UTC (permalink / raw)
To: Vijay Khemka, OpenBMC Maillist
Assuming you’re using dbus-sensors (which I’m pretty sure you are):
Support for overriding sensor values was recently landed in this commit:
https://gerrit.openbmc-project.xyz/#/c/openbmc/dbus-sensors/+/16177/
Overriding a sensor value with a "fake" sensor reading should be as easy as simply calling SetProperty on the dbus interface.
Example as tested on my system (your path names may vary)
dbus-send --system --print-reply --dest=xyz.openbmc_project.CPUSensor /xyz/openbmc_project/sensors/temperature/Core_1_CPU0 org.freedesktop.DBus.Properties.Set string:xyz.openbmc_project.Sensor.Value string:Value variant:double:1.0
and verify by reading it back out:
dbus-send --system --print-reply --dest=xyz.openbmc_project.CPUSensor /xyz/openbmc_project/sensors/temperature/Core_1_CPU0 org.freedesktop.DBus.Properties.GetAll string:xyz.openbmc_project.Sensor.Value
method return time=1543267812.458169 sender=:1.16 -> destination=:1.153 serial=6398 reply_serial=2
array [
dict entry(
string "MaxValue"
variant double 127
)
dict entry(
string "MinValue"
variant double -128
)
dict entry(
string "Value"
variant double 1
)
]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Testing Phosphor-pid-control
2018-12-20 18:13 ` Tanous, Ed
@ 2018-12-20 20:57 ` Vijay Khemka
2018-12-28 9:49 ` Patrick Venture
0 siblings, 1 reply; 8+ messages in thread
From: Vijay Khemka @ 2018-12-20 20:57 UTC (permalink / raw)
To: Tanous, Ed, OpenBMC Maillist
Hi Ed,
I am able to override and read it back but not seeing any change in pwm data as well as fan speed. I have swampd running.
Regards
-Vijay
On 12/20/18, 10:14 AM, "Tanous, Ed" <ed.tanous@intel.com> wrote:
Assuming you’re using dbus-sensors (which I’m pretty sure you are):
Support for overriding sensor values was recently landed in this commit:
https://urldefense.proofpoint.com/v2/url?u=https-3A__gerrit.openbmc-2Dproject.xyz_-23_c_openbmc_dbus-2Dsensors_-2B_16177_&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=v9MU0Ki9pWnTXCWwjHPVgpnCR80vXkkcrIaqU7USl5g&m=1J-5eJl4Drc2LKcQ2SdONc02uR5cih3P68m66QcMYog&s=c9798qmI_pA3hnzB97oaYFK8yFTmwrxdpAeRrui4qkY&e=
Overriding a sensor value with a "fake" sensor reading should be as easy as simply calling SetProperty on the dbus interface.
Example as tested on my system (your path names may vary)
dbus-send --system --print-reply --dest=xyz.openbmc_project.CPUSensor /xyz/openbmc_project/sensors/temperature/Core_1_CPU0 org.freedesktop.DBus.Properties.Set string:xyz.openbmc_project.Sensor.Value string:Value variant:double:1.0
and verify by reading it back out:
dbus-send --system --print-reply --dest=xyz.openbmc_project.CPUSensor /xyz/openbmc_project/sensors/temperature/Core_1_CPU0 org.freedesktop.DBus.Properties.GetAll string:xyz.openbmc_project.Sensor.Value
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Testing Phosphor-pid-control
2018-12-20 20:57 ` Vijay Khemka
@ 2018-12-28 9:49 ` Patrick Venture
2019-01-02 19:00 ` Vijay Khemka
0 siblings, 1 reply; 8+ messages in thread
From: Patrick Venture @ 2018-12-28 9:49 UTC (permalink / raw)
To: Vijay Khemka; +Cc: Tanous, Ed, OpenBMC Maillist
On Thu, Dec 20, 2018 at 12:57 PM Vijay Khemka <vijaykhemka@fb.com> wrote:
>
> Hi Ed,
> I am able to override and read it back but not seeing any change in pwm data as well as fan speed. I have swampd running.
You mean the dbus reads of the values aren't changing? I'm not as
familiar with the dbus-sensor integration beyond run-time
configuration, versus run-time state. Swampd itself doesn't expose
PID information or set-point information unless that's done in the
step controller (and I didn't see that aspect in that object).
Or are you saying that the fan speeds aren't changing when you read
the hwmon values?
>
> Regards
> -Vijay
>
> On 12/20/18, 10:14 AM, "Tanous, Ed" <ed.tanous@intel.com> wrote:
>
> Assuming you’re using dbus-sensors (which I’m pretty sure you are):
>
> Support for overriding sensor values was recently landed in this commit:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__gerrit.openbmc-2Dproject.xyz_-23_c_openbmc_dbus-2Dsensors_-2B_16177_&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=v9MU0Ki9pWnTXCWwjHPVgpnCR80vXkkcrIaqU7USl5g&m=1J-5eJl4Drc2LKcQ2SdONc02uR5cih3P68m66QcMYog&s=c9798qmI_pA3hnzB97oaYFK8yFTmwrxdpAeRrui4qkY&e=
>
> Overriding a sensor value with a "fake" sensor reading should be as easy as simply calling SetProperty on the dbus interface.
>
> Example as tested on my system (your path names may vary)
> dbus-send --system --print-reply --dest=xyz.openbmc_project.CPUSensor /xyz/openbmc_project/sensors/temperature/Core_1_CPU0 org.freedesktop.DBus.Properties.Set string:xyz.openbmc_project.Sensor.Value string:Value variant:double:1.0
>
> and verify by reading it back out:
>
> dbus-send --system --print-reply --dest=xyz.openbmc_project.CPUSensor /xyz/openbmc_project/sensors/temperature/Core_1_CPU0 org.freedesktop.DBus.Properties.GetAll string:xyz.openbmc_project.Sensor.Value
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Testing Phosphor-pid-control
2018-12-28 9:49 ` Patrick Venture
@ 2019-01-02 19:00 ` Vijay Khemka
2019-01-02 19:04 ` Patrick Venture
0 siblings, 1 reply; 8+ messages in thread
From: Vijay Khemka @ 2019-01-02 19:00 UTC (permalink / raw)
To: Patrick Venture; +Cc: Tanous, Ed, OpenBMC Maillist
Hi Patrick,
I am not seeing any change in fan speed when I read hwmon values. Can you please give me any formula how it is using data to change speed. Because I tried faking several temperatures and finally could make this change when I bring temperature below 10 but it doesn't change when I take temperature to more than max value.
Regards
-Vijay
On 12/28/18, 1:50 AM, "Patrick Venture" <venture@google.com> wrote:
On Thu, Dec 20, 2018 at 12:57 PM Vijay Khemka <vijaykhemka@fb.com> wrote:
>
> Hi Ed,
> I am able to override and read it back but not seeing any change in pwm data as well as fan speed. I have swampd running.
You mean the dbus reads of the values aren't changing? I'm not as
familiar with the dbus-sensor integration beyond run-time
configuration, versus run-time state. Swampd itself doesn't expose
PID information or set-point information unless that's done in the
step controller (and I didn't see that aspect in that object).
Or are you saying that the fan speeds aren't changing when you read
the hwmon values?
>
> Regards
> -Vijay
>
> On 12/20/18, 10:14 AM, "Tanous, Ed" <ed.tanous@intel.com> wrote:
>
> Assuming you’re using dbus-sensors (which I’m pretty sure you are):
>
> Support for overriding sensor values was recently landed in this commit:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__gerrit.openbmc-2Dproject.xyz_-23_c_openbmc_dbus-2Dsensors_-2B_16177_&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=v9MU0Ki9pWnTXCWwjHPVgpnCR80vXkkcrIaqU7USl5g&m=1J-5eJl4Drc2LKcQ2SdONc02uR5cih3P68m66QcMYog&s=c9798qmI_pA3hnzB97oaYFK8yFTmwrxdpAeRrui4qkY&e=
>
> Overriding a sensor value with a "fake" sensor reading should be as easy as simply calling SetProperty on the dbus interface.
>
> Example as tested on my system (your path names may vary)
> dbus-send --system --print-reply --dest=xyz.openbmc_project.CPUSensor /xyz/openbmc_project/sensors/temperature/Core_1_CPU0 org.freedesktop.DBus.Properties.Set string:xyz.openbmc_project.Sensor.Value string:Value variant:double:1.0
>
> and verify by reading it back out:
>
> dbus-send --system --print-reply --dest=xyz.openbmc_project.CPUSensor /xyz/openbmc_project/sensors/temperature/Core_1_CPU0 org.freedesktop.DBus.Properties.GetAll string:xyz.openbmc_project.Sensor.Value
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Testing Phosphor-pid-control
2019-01-02 19:00 ` Vijay Khemka
@ 2019-01-02 19:04 ` Patrick Venture
2019-01-02 20:41 ` Vijay Khemka
0 siblings, 1 reply; 8+ messages in thread
From: Patrick Venture @ 2019-01-02 19:04 UTC (permalink / raw)
To: Vijay Khemka; +Cc: Tanous, Ed, OpenBMC Maillist, James Feist
On Wed, Jan 2, 2019 at 11:00 AM Vijay Khemka <vijaykhemka@fb.com> wrote:
>
> Hi Patrick,
> I am not seeing any change in fan speed when I read hwmon values. Can you please give me any formula how it is using data to change speed. Because I tried faking several temperatures and finally could make this change when I bring temperature below 10 but it doesn't change when I take temperature to more than max value.
Which PID controller are you using? If you only have sensors
configured then there's nothing to push the changes, presumably you
have a PID added. Depending on which you chose, depends on what's
happening with it -- that's why I'm asking for more. The formula for
the "normal" pid controller is such that it tries to reduce the
"error" between the set-point and the real fan speeds.
https://github.com/openbmc/phosphor-pid-control/blob/master/pid/ec/pid.cpp#L43
There's also a step-wise controller option, which is why I'm asking.
>
> Regards
> -Vijay
>
> On 12/28/18, 1:50 AM, "Patrick Venture" <venture@google.com> wrote:
>
> On Thu, Dec 20, 2018 at 12:57 PM Vijay Khemka <vijaykhemka@fb.com> wrote:
> >
> > Hi Ed,
> > I am able to override and read it back but not seeing any change in pwm data as well as fan speed. I have swampd running.
>
> You mean the dbus reads of the values aren't changing? I'm not as
> familiar with the dbus-sensor integration beyond run-time
> configuration, versus run-time state. Swampd itself doesn't expose
> PID information or set-point information unless that's done in the
> step controller (and I didn't see that aspect in that object).
>
> Or are you saying that the fan speeds aren't changing when you read
> the hwmon values?
>
> >
> > Regards
> > -Vijay
> >
> > On 12/20/18, 10:14 AM, "Tanous, Ed" <ed.tanous@intel.com> wrote:
> >
> > Assuming you’re using dbus-sensors (which I’m pretty sure you are):
> >
> > Support for overriding sensor values was recently landed in this commit:
> > https://urldefense.proofpoint.com/v2/url?u=https-3A__gerrit.openbmc-2Dproject.xyz_-23_c_openbmc_dbus-2Dsensors_-2B_16177_&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=v9MU0Ki9pWnTXCWwjHPVgpnCR80vXkkcrIaqU7USl5g&m=1J-5eJl4Drc2LKcQ2SdONc02uR5cih3P68m66QcMYog&s=c9798qmI_pA3hnzB97oaYFK8yFTmwrxdpAeRrui4qkY&e=
> >
> > Overriding a sensor value with a "fake" sensor reading should be as easy as simply calling SetProperty on the dbus interface.
> >
> > Example as tested on my system (your path names may vary)
> > dbus-send --system --print-reply --dest=xyz.openbmc_project.CPUSensor /xyz/openbmc_project/sensors/temperature/Core_1_CPU0 org.freedesktop.DBus.Properties.Set string:xyz.openbmc_project.Sensor.Value string:Value variant:double:1.0
> >
> > and verify by reading it back out:
> >
> > dbus-send --system --print-reply --dest=xyz.openbmc_project.CPUSensor /xyz/openbmc_project/sensors/temperature/Core_1_CPU0 org.freedesktop.DBus.Properties.GetAll string:xyz.openbmc_project.Sensor.Value
> >
> >
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Testing Phosphor-pid-control
2019-01-02 19:04 ` Patrick Venture
@ 2019-01-02 20:41 ` Vijay Khemka
2019-01-02 22:22 ` James Feist
0 siblings, 1 reply; 8+ messages in thread
From: Vijay Khemka @ 2019-01-02 20:41 UTC (permalink / raw)
To: Patrick Venture; +Cc: Tanous, Ed, OpenBMC Maillist, James Feist
On 1/2/19, 11:05 AM, "Patrick Venture" <venture@google.com> wrote:
On Wed, Jan 2, 2019 at 11:00 AM Vijay Khemka <vijaykhemka@fb.com> wrote:
>
> Hi Patrick,
> I am not seeing any change in fan speed when I read hwmon values. Can you please give me any formula how it is using data to change speed. Because I tried faking several temperatures and finally could make this change when I bring temperature below 10 but it doesn't change when I take temperature to more than max value.
Which PID controller are you using? If you only have sensors
configured then there's nothing to push the changes, presumably you
have a PID added. Depending on which you chose, depends on what's
happening with it -- that's why I'm asking for more. The formula for
the "normal" pid controller is such that it tries to reduce the
"error" between the set-point and the real fan speeds.
I am using basic configuration for pid as below. I may have to revisit these data, please advise if I am missing anything here.
{
"Class": "fan",
"FFGainCoefficient": 0.01,
"FFOffCoefficient": 0.0,
"ICoefficient": 0.0,
"ILimitMax": 0.0,
"ILimitMin": 0.0,
"Inputs": [
"MB_FAN0_TACH"
],
"Name": "MB_FAN0_TACH",
"OutLimitMax": 100.0,
"OutLimitMin": 30.0,
"Outputs": [
"Pwm 1"
],
"PCoefficient": 0.0,
"SlewNeg": 0.0,
"SlewPos": 0.0,
"Type": "Pid",
"Zones": [
"Pid 1"
]
},
https://github.com/openbmc/phosphor-pid-control/blob/master/pid/ec/pid.cpp#L43
There's also a step-wise controller option, which is why I'm asking.
How to configure step-wise controller as we need for linear configuration as well.
>
> Regards
> -Vijay
>
> On 12/28/18, 1:50 AM, "Patrick Venture" <venture@google.com> wrote:
>
> On Thu, Dec 20, 2018 at 12:57 PM Vijay Khemka <vijaykhemka@fb.com> wrote:
> >
> > Hi Ed,
> > I am able to override and read it back but not seeing any change in pwm data as well as fan speed. I have swampd running.
>
> You mean the dbus reads of the values aren't changing? I'm not as
> familiar with the dbus-sensor integration beyond run-time
> configuration, versus run-time state. Swampd itself doesn't expose
> PID information or set-point information unless that's done in the
> step controller (and I didn't see that aspect in that object).
>
> Or are you saying that the fan speeds aren't changing when you read
> the hwmon values?
>
> >
> > Regards
> > -Vijay
> >
> > On 12/20/18, 10:14 AM, "Tanous, Ed" <ed.tanous@intel.com> wrote:
> >
> > Assuming you’re using dbus-sensors (which I’m pretty sure you are):
> >
> > Support for overriding sensor values was recently landed in this commit:
> > https://urldefense.proofpoint.com/v2/url?u=https-3A__gerrit.openbmc-2Dproject.xyz_-23_c_openbmc_dbus-2Dsensors_-2B_16177_&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=v9MU0Ki9pWnTXCWwjHPVgpnCR80vXkkcrIaqU7USl5g&m=1J-5eJl4Drc2LKcQ2SdONc02uR5cih3P68m66QcMYog&s=c9798qmI_pA3hnzB97oaYFK8yFTmwrxdpAeRrui4qkY&e=
> >
> > Overriding a sensor value with a "fake" sensor reading should be as easy as simply calling SetProperty on the dbus interface.
> >
> > Example as tested on my system (your path names may vary)
> > dbus-send --system --print-reply --dest=xyz.openbmc_project.CPUSensor /xyz/openbmc_project/sensors/temperature/Core_1_CPU0 org.freedesktop.DBus.Properties.Set string:xyz.openbmc_project.Sensor.Value string:Value variant:double:1.0
> >
> > and verify by reading it back out:
> >
> > dbus-send --system --print-reply --dest=xyz.openbmc_project.CPUSensor /xyz/openbmc_project/sensors/temperature/Core_1_CPU0 org.freedesktop.DBus.Properties.GetAll string:xyz.openbmc_project.Sensor.Value
> >
> >
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Testing Phosphor-pid-control
2019-01-02 20:41 ` Vijay Khemka
@ 2019-01-02 22:22 ` James Feist
0 siblings, 0 replies; 8+ messages in thread
From: James Feist @ 2019-01-02 22:22 UTC (permalink / raw)
To: Vijay Khemka, Patrick Venture; +Cc: Tanous, Ed, OpenBMC Maillist
> How to configure step-wise controller as we need for linear configuration as well.
There's an example here:
https://github.com/openbmc/entity-manager/blob/master/configurations/Intel%20Front%20Panel.json#L56
Thanks
-James
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-01-02 22:22 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-20 17:49 Testing Phosphor-pid-control Vijay Khemka
2018-12-20 18:13 ` Tanous, Ed
2018-12-20 20:57 ` Vijay Khemka
2018-12-28 9:49 ` Patrick Venture
2019-01-02 19:00 ` Vijay Khemka
2019-01-02 19:04 ` Patrick Venture
2019-01-02 20:41 ` Vijay Khemka
2019-01-02 22:22 ` James Feist
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.