History log of /openbmc/phosphor-pid-control/ (Results 51 – 75 of 373)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
df1f183f14-Nov-2022 Tom Tung <shes050117@gmail.com>

pid: reuse the code for processing sensors input

The code for processing sensors' inputs are the same in updateFanTelemetry() and
updateSensors(). This patch extract the similar code out as a privat

pid: reuse the code for processing sensors input

The code for processing sensors' inputs are the same in updateFanTelemetry() and
updateSensors(). This patch extract the similar code out as a private
function and make it be called in these two functions.

Tested:
- Can still build phosphor-pid-control.
- Copy built image to the system and it works fine.

Change-Id: I6249053e788bfa14bb7bdf2a880be5403c20029b
Signed-off-by: Tom Tung <shes050117@gmail.com>

show more ...

aacd568119-Dec-2022 Harvey Wu <Harvey.Wu@quantatw.com>

meson: Remove autotools files and ignore patches

Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com>
Change-Id: I11624c380b2e900b528fe267514024e892e3ce1c

10e46efa01-Feb-2023 Josh Lehan <krellan@google.com>

Skipping over Association Definitions messages

These incoming messages cause problems, for the same reason Assocation
is skipped over. They are not relevant to PID control, because they
are maintain

Skipping over Association Definitions messages

These incoming messages cause problems, for the same reason Assocation
is skipped over. They are not relevant to PID control, because they
are maintained by Object Mapper for another purpose. Treating
Association Definitions similarly to Associations, namely, skipping
them over. It looks like this was simply omitted in the past, perhaps
Definitions did not exist then, only Associations.
Also adding some optional logging.

Thanks to Chu Lin for originally discovering this bug and creating
this fix.

Tested: It works, and avoids the problem of unwanted messages causing
swampd to needlessly restart itself internally.

Change-Id: I2f9cb123990d240b515d08138dd919312aac5a30
Signed-off-by: Josh Lehan <krellan@google.com>

show more ...

239aa7d717-Nov-2022 Harvey Wu <Harvey.Wu@quantatw.com>

Replace some duplicate codes about time setting

- Replace duplicate codes in pid/buildjson.cpp and dbusconfiguration.cpp

TEST:
D-Bus config =>
{
"FailSafePercent": 90.0,

Replace some duplicate codes about time setting

- Replace duplicate codes in pid/buildjson.cpp and dbusconfiguration.cpp

TEST:
D-Bus config =>
{
"FailSafePercent": 90.0,
"MinThermalOutput": 0.0,
"CycleIntervalTimeMS": 101,
"UpdateThermalsTimeMS": 1000,
"Name": "Zone 0",
"Type": "Pid.Zone",
"ZoneIndex": 0
},
{
"FailSafePercent": 90.0,
"MinThermalOutput": 0.0,
"CycleIntervalTimeMS": 100,
"Name": "Zone 1",
"Type": "Pid.Zone",
"ZoneIndex": 1
},
{
"FailSafePercent": 100.0,
"MinThermalOutput": 0.0,
"UpdateThermalsTimeMS": -1000,
"Name": "Zone 2",
"Type": "Pid.Zone",
"ZoneIndex": 2
},

pid journal log =>
Mar 09 04:49:23 qbmc swampd[4823]: Zone 1: UpdateThermalsTimeMS cannot
find setting. Use default 1000 ms
Mar 09 04:49:24 qbmc swampd[4823]: Zone 2: CycleIntervalTimeMS cannot
find setting. Use default 100 ms
Mar 09 04:49:24 qbmc swampd[4823]: Zone 2: UpdateThermalsTimeMS is
invalid. Use default 1000 ms

Static JSON =>
{
"id": 0,
"minThermalOutput": 0.0,
"failsafePercent": 100.0,
"cycleIntervalTimeMS": 100,
"updateThermalsTimeMS": 1000,
...
...
{
"id": 1,
"minThermalOutput": 0.0,
"failsafePercent": 100.0,
"updateThermalsTimeMS": 0,

pid journal log =>
Mar 09 04:38:44 qbmc swampd[10646]: Zone 1: cycleIntervalTimeMS cannot
find setting. Use default 100 ms
Mar 09 04:38:44 qbmc swampd[10646]: Zone 1: updateThermalsTimeMS is
invalid. Use default 1000 ms

Change-Id: I75d272d9458978790d2b8fe2def35a0e6ba126b0
Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com>

show more ...

56ed787015-Dec-2022 Josh Lehan <krellan@google.com>

Fixing crash when core logging was enabled

The operator=() function tried to use the "=" operator to copy the
entire structure at once, which of course called the same function
again, leading to inf

Fixing crash when core logging was enabled

The operator=() function tried to use the "=" operator to copy the
entire structure at once, which of course called the same function
again, leading to infinite recursion, and thus, segfault.

Worked around this braino by simply copying each field individually,
forgoing the convenience of copying the structure as a whole.

Tested: Use of the core logging feature no longer crashes

Signed-off-by: Josh Lehan <krellan@google.com>
Change-Id: Id472d03409296a45bb14180f5c1897dfb42be1aa

show more ...

9f9a06aa14-Dec-2022 Josh Lehan <krellan@google.com>

Fix interval calculation bug and D-Bus init

The new timing parameters were not settable from the D-Bus code path,
only from the old static JSON code path. Also, the divison would not
occur, causing

Fix interval calculation bug and D-Bus init

The new timing parameters were not settable from the D-Bus code path,
only from the old static JSON code path. Also, the divison would not
occur, causing the variable to remain at 1000 by default, not 10,
causing the thermal intervals to run 100 times slower than intended!

I fixed the algorithm used to calculate when the thermal intervals
should be inserted amongst the fan intervals. Now, the division is
not necessary, and any value should work, so long as the thermal
interval is greater than or equal to the fan interval.

I also fixed a subtle bug regarding the timer scheduling. It was
reinitializing the timer expiration time from "now" each interval,
instead of cleanly incrementing from the original expiration. This
caused the timer to run slower than intended, as the execution time
of each interval would not be subtracted out from the remaining time
that needs to be waited for, as it should have been.

Tested: Default values, for timing parameters, now work as intended

Signed-off-by: Josh Lehan <krellan@google.com>
Change-Id: I759387b97af3ce93a76459faf5e9e7be3474016e

show more ...

c612c05112-Dec-2022 Josh Lehan <krellan@google.com>

Allow derivativeCoeff and DCoefficient optional

To avoid breaking existing configurations in the field, treat the
new "derivativeCoeff" parameter as optional, not mandatory.

This affects both the o

Allow derivativeCoeff and DCoefficient optional

To avoid breaking existing configurations in the field, treat the
new "derivativeCoeff" parameter as optional, not mandatory.

This affects both the old JSON parser, and the new D-Bus
entity-manager parser (it's called "DCoefficient" there).

Signed-off-by: Josh Lehan <krellan@google.com>
Change-Id: Ifcaf47d66e009b48e41b510a2ef1686b8860ad35

show more ...

5897fcc108-Dec-2022 Patrick Williams <patrick@stwcx.xyz>

beautysh: re-format

beautysh is enabled in the openbmc-build-scripts on Bash/Zsh/POSIX-sh
files to have a consistent formatting. Re-run the formatter on the
whole repository.

Change-Id: Ie7df79b38

beautysh: re-format

beautysh is enabled in the openbmc-build-scripts on Bash/Zsh/POSIX-sh
files to have a consistent formatting. Re-run the formatter on the
whole repository.

Change-Id: Ie7df79b3878cbbc3893ab66ce30ba73c2b200da5
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

217a827d08-Dec-2022 Patrick Williams <patrick@stwcx.xyz>

prettier: re-format

Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML
files to have consistent formatting for these file types. Re-run the
formatter on the whole repository.

prettier: re-format

Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML
files to have consistent formatting for these file types. Re-run the
formatter on the whole repository.

Change-Id: I834909dc663e8762217517eab4a4294174d3bcf2
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

23e22b9013-Nov-2022 Josh Lehan <krellan@google.com>

Add new PID Class types "power" and "powersum"

Implements this feature:
https://github.com/openbmc/phosphor-pid-control/issues/24

In addition to the existing "temp" and "margin" classes, adding
new

Add new PID Class types "power" and "powersum"

Implements this feature:
https://github.com/openbmc/phosphor-pid-control/issues/24

In addition to the existing "temp" and "margin" classes, adding
new "power" and "powersum" Class types.

The "power" class is the same as "temp", but expects D-Bus power
sensors, instead of D-Bus temperature sensors.

The "powersum" class is the same as "power", but sums together all of
the given inputs, instead of finding the maximum.

Signed-off-by: Josh Lehan <krellan@google.com>
Change-Id: I11d8ad8385632658ed061671134be87a560cd02a

show more ...

e100ab8515-Nov-2022 Josh Lehan <krellan@google.com>

Adding more temporary files to gitignore

Trivial addition of temporary files to gitignore, for cleanliness.

Signed-off-by: Josh Lehan <krellan@google.com>
Change-Id: Ib3153f9d9a01c24e1ac60b1dfe3218

Adding more temporary files to gitignore

Trivial addition of temporary files to gitignore, for cleanliness.

Signed-off-by: Josh Lehan <krellan@google.com>
Change-Id: Ib3153f9d9a01c24e1ac60b1dfe3218dfca4062f6

show more ...

d38ae27913-Nov-2020 Josh Lehan <krellan@google.com>

FanController: Use raw RPM as input to fan PID loop

The fan PID loop was wrongly using normalized RPM as input, instead of
raw RPM. This meant that the input RPM was between 0.0 and 1.0, the
wrong u

FanController: Use raw RPM as input to fan PID loop

The fan PID loop was wrongly using normalized RPM as input, instead of
raw RPM. This meant that the input RPM was between 0.0 and 1.0, the
wrong units, an unusable low value for RPM.

What's more, the inputProc() function used int64_t instead of double,
for an unknown reason, as the input and output of this function is
double. This integer truncation caused the normalized RPM to always be
zero, making this bug harder to notice.

Cleaned up the inputProc() function to always use double, and
correctly use the raw RPM.

I am really glad I had earlier added a feature to maintain the raw
unscaled value, along with the normalized scaled value, in the cache!
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-pid-control/+/36697

This made it easy to recover the raw value. Otherwise, this bug would
have been much harder to fix.

Tested: The RPM input values now use same units as the setpoint,
restoring proper fan PID loop operation, as logged in the new PID core
debugging feature here:
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-pid-control/+/38087

Signed-off-by: Josh Lehan <krellan@google.com>
Change-Id: I4607d9ebee57cea04b8f83d658913e24200a6428

show more ...

de74542c07-Nov-2020 Josh Lehan <krellan@google.com>

Adding new feature of core PID loop logging

This differs from the normal logging,
as this focuses on the core of the PID loop computations.

All variables within the core pid/ec/pid.cpp pid()
functi

Adding new feature of core PID loop logging

This differs from the normal logging,
as this focuses on the core of the PID loop computations.

All variables within the core pid/ec/pid.cpp pid()
function are now logged, so math can be debugged.

Output is throttled to only log a new line
when it changes, or when 60 seconds have elapsed.

Creates 2 files for each PID loop,
one showing coefficients that were configured for it,
and one showing the variables changing over time.

Enable by --corelogging command line option,
or by creating /etc/thermal.d/corelogging file.

Tested:
Log files appear as expected, when enabled.
No changes noticed, when this feature is disabled.

Signed-off-by: Josh Lehan <krellan@google.com>
Change-Id: I3f37fe918e7cbc6fb885ffa2f268600d5a317d32

show more ...

5d678da315-Nov-2022 Josh Lehan <krellan@google.com>

Fix Meson build problem when building tests

Somehow, the top of tree broke, and Jenkins now complains when trying
to upload a new patch. I am not sure why Jenkins did not catch this
earlier. Regardl

Fix Meson build problem when building tests

Somehow, the top of tree broke, and Jenkins now complains when trying
to upload a new patch. I am not sure why Jenkins did not catch this
earlier. Regardless, this should fix it.

Signed-off-by: Josh Lehan <krellan@google.com>
Change-Id: I37744c41b1aa18e64c70dab6d2a3d8ba994055fb

show more ...

c51ba91912-Oct-2022 Bonnie Lo <Bonnie_Lo@wiwynn.com>

Add debug mode

Description:
1. Could enable debug mode by adding file: /etc/thermal.d/debugging.
$ mkdir /etc/thermal.d
$ touch /etc/thermal.d/debugging
$ systemctl resta

Add debug mode

Description:
1. Could enable debug mode by adding file: /etc/thermal.d/debugging.
$ mkdir /etc/thermal.d
$ touch /etc/thermal.d/debugging
$ systemctl restart phosphor-pid-control

2. Could record fans output PWM, chosen temperature, PID/stepwise output PWM in debug mode.

Design:
1. Create debugging file and restart service to enable debug mode.

2. Check if debug mode is enabled to output fans output PWM, chosen temperature,
PID/stepwise output PWM, and so on.

Test Case:
1. Enable debug mode and check logs: pass

Change-Id: I8527ebcb81e723298ba7e786b4501f986ebd439e
Signed-off-by: Bonnie Lo <Bonnie_Lo@wiwynn.com>

show more ...

0e8fc39804-Oct-2022 Bonnie Lo <Bonnie_Lo@wiwynn.com>

Support derivative term in PID algorithm and support to set cycle interval time from fan table

1. Support to calculate derivative term in PID algorithm.
2. Add two properties: cycleIntervalTimeMS an

Support derivative term in PID algorithm and support to set cycle interval time from fan table

1. Support to calculate derivative term in PID algorithm.
2. Add two properties: cycleIntervalTimeMS and updateThermalsTimeMS
in fan table that could be used to decide "time interval of PID control loop"
and "time interval to update thermals' cached value".

Tested:

- PID algorithm:
1. Check pid-control-service could calculate output PWM
according to the fan table.

[Test log]
root@greatlakes:~# systemctl status phosphor-pid-control -l
* phosphor-pid-control.service - Phosphor-Pid-Control Margin-based Fan Control Daemon
Loaded: loaded (/lib/systemd/system/phosphor-pid-control.service; enabled; preset: enabled)
Active: active (running) since Fri 2018-03-09 05:09:35 PST; 1min 47s ago
Main PID: 3105 (swampd)
CGroup: /system.slice/phosphor-pid-control.service
`-3105 /usr/bin/swampd -c /usr/share/entity-manager/configurations/fan-table.json
...
Mar 09 05:10:29 greatlakes phosphor-pid-control[3105]: PID Zone 1 max SetPoint 3.75 requested by
PID_NIC_SENSOR_TEMP BMC_SENSOR_FAN0_TACH BMC_SENSOR_FAN2_TACH BMC_SENSOR_FAN4_TACH BMC_SENSOR_FAN6_TACH

- Cycle interval time:
1. Set cycleIntervalTimeMS and updateThermalsTimeMS
to 1000 ms in fan table
2. Check service would update thermal every second from debug log.

[Test log]
root@greatlakes:~# journalctl -u phosphor-pid-control --since "Mar 09 04:52:16"
Mar 09 04:52:16 greatlakes systemd[1]: Started Phosphor-Pid-Control Margin-based Fan Control Daemon.
...
Mar 09 04:53:28 greatlakes phosphor-pid-control[2795]: processThermals
Mar 09 04:53:28 greatlakes phosphor-pid-control[2795]: processFans
Mar 09 04:53:29 greatlakes phosphor-pid-control[2795]: processThermals
Mar 09 04:53:29 greatlakes phosphor-pid-control[2795]: processFans
Mar 09 04:53:30 greatlakes phosphor-pid-control[2795]: processThermals
Mar 09 04:53:30 greatlakes phosphor-pid-control[2795]: processFans

Change-Id: I04e1b440603c3ad66a1e26c96451992785da6fe6
Signed-off-by: Bonnie Lo <Bonnie_Lo@wiwynn.com>

show more ...

fb82a87d20-Sep-2020 Josh Lehan <krellan@google.com>

dbusconfiguration: Init margin similar to temp

Adding "margin" PID class to the same initialization block that is
used by "temp", so they initialize similarly.

This patch used to do a lot more, now

dbusconfiguration: Init margin similar to temp

Adding "margin" PID class to the same initialization block that is
used by "temp", so they initialize similarly.

This patch used to do a lot more, now it is simplified. The other
changes, to the "timeout" and "ignoreDbusMinMax" settings, are no
longer necessary to make here, as they were quietly already made by
other patches since this was originally written, as the same bugs they
would fix were already noticed and fixed by other people as well.

Tested: Correct behavior (no timeout at all, because these are D-Bus
passive sensors, which operate on a push model, not being polled by a
timer). Without this fix, margin PID class wrongly still had timeout.

Signed-off-by: Josh Lehan <krellan@google.com>
Change-Id: Ibbf9294c249de9bc13a6449ea936ab0be4910dcc

show more ...

b300575e22-Feb-2022 Josh Lehan <krellan@google.com>

pid/zone: Adding unscaled to cache and logging

The "ReadReturn" structure, and the cache within DbusPidZone, have
been widened, to hold both the scaled and the original unscaled values
at the same t

pid/zone: Adding unscaled to cache and logging

The "ReadReturn" structure, and the cache within DbusPidZone, have
been widened, to hold both the scaled and the original unscaled values
at the same time. This allows logging to show both at once, and also
clears up confusion/bugs resulting from storing one or the other and
losing track of which was which.

Compatibility setValue() and getCachedValue() functions still
retained, so this will not break other sensors. These functions still
only take a single argument/return, which will be used for both value
and unscaled, indicating scaling is unknown or irrelevant to this
sensor.

Also, the PWM output of the PID loop appears in the log file,
conveniently right alongside the RPM input of the PID loop.

An output cache has been added to the zone interface, and, unlike the
input cache, use of it is optional. It is only to help populate the
logging, so subclasses are free to ignore it if they want.

Tested: In the logging files, I can see both PWM and RPM, and they are
consistent, showing how the PID loop is trying to update the PWM to
target the desired RPM.

Example: Here's /tmp/zone_0.log on my system
epoch_ms,setpt,fan0_tach,fan0_tach_raw,fan0_tach_pwm,fan0_tach_pwm_raw,bmcmargin_zone0,bmcmargin_zone0_raw,thermal_zone0,thermal_zone0_raw,failsafe
3097918,3818.42,0.748267,11224,0,0,0.724753,56.812,0.745098,62,0
3098022,3818.42,0.748267,11224,0.266666,67,0.724753,56.812,0.745098,62,0
3098132,3818.42,0.748267,11224,0.266666,67,0.724753,56.812,0.745098,62,0

Here's what we can now learn:
The desired setpoint is 3818 RPM.
The fan is at 74.8% of scale, which is 11224 RPM.
The written PWM, after the first PID loop pass, is a raw value of 67,
which is 26.6% of scale.
The first margin temperature is 56.8 degrees of margin, which is 72.4%
of scale.
The second margin temperature is 62 degrees of margin, which is 74.5%
of scale.
This zone is not in failsafe mode.
As you can see, this will be rather useful for PID loop tuning.

Signed-off-by: Josh Lehan <krellan@google.com>
Change-Id: I972a4e4a3b787255f0dcafa10d4498ee58b682f0

show more ...

b1225b2628-Oct-2022 Harvey.Wu <Harvey.Wu@quantatw.com>

meson: Add meson and meson_option files

Tested: compile and run successfully

tests log using run-unit-test-docker.sh :
1/14 dbus_active_unittest OK 0.03s
2/14 dbus

meson: Add meson and meson_option files

Tested: compile and run successfully

tests log using run-unit-test-docker.sh :
1/14 dbus_active_unittest OK 0.03s
2/14 dbus_util_unittest OK 0.02s
3/14 json_parse_unittest OK 0.02s
4/14 pid_json_unittest OK 0.02s
5/14 pid_stepwisecontroller_unittest OK 0.03s
6/14 pid_fancontroller_unittest OK 0.04s
7/14 pid_thermalcontroller_unittest OK 0.03s
8/14 dbus_passive_unittest OK 0.05s
9/14 sensor_pluggable_unittest OK 0.02s
10/14 sensor_manager_unittest OK 0.02s
11/14 sensor_host_unittest OK 0.03s
12/14 sensors_json_unittest OK 0.01s
13/14 util_unittest OK 0.01s
14/14 pid_zone_unittest OK 0.04s

Ok: 14
Expected Fail: 0
Fail: 0
Unexpected Pass: 0
Skipped: 0
Timeout: 0

systemctl status phosphor-pid-control.service
* phosphor-pid-control.service - Phosphor-Pid-Control Margin-based Fan Control Daemon
Loaded: loaded (/lib/systemd/system/phosphor-pid-control.service; enabled; preset: enabled)
Drop-In: /lib/systemd/system/phosphor-pid-control.service.d
`-service-override.conf
Active: active (running) since Fri 2018-03-09 04:36:30 PST; 1min 37s ago
Process: 2561 ExecStartPre=/usr/bin/fan-table-init.sh (code=exited, status=0/SUCCESS)
Main PID: 2633 (swampd)
CGroup: /system.slice/phosphor-pid-control.service
`-2633 /usr/bin/swampd

Mar 09 04:36:45 qbmc swampd[2633]: PID name: pwm 5
Mar 09 04:36:45 qbmc swampd[2633]: inputs: fan2_tachfan5_pwm, fan3_tachfan5_pwm, fan5_tachfan5_pwm,
Mar 09 04:36:45 qbmc swampd[2633]: PID name: tray_dt PID
Mar 09 04:36:45 qbmc swampd[2633]: inputs: tray_dt,
Mar 09 04:36:45 qbmc swampd[2633]: pushing zone 2
Mar 09 04:36:45 qbmc swampd[2633]: PID Zone 2 max SetPoint 4200 requested by CPU0 PID fan0_tachfan4_pwm fan1_tachfan4_pwm fan2_tachfan5_pwm fan3_tachfan5_pwm fan4_tachfan4_pwm fan5_tachfan5_pwm
Mar 09 04:36:45 qbmc swampd[2633]: pushing zone 1
Mar 09 04:36:45 qbmc swampd[2633]: PID Zone 1 max SetPoint 4200 requested by CPU1 PID fan2_tachfan2_pwm fan3_tachfan3_pwm
Mar 09 04:36:45 qbmc swampd[2633]: pushing zone 0
Mar 09 04:36:45 qbmc swampd[2633]: PID Zone 0 max SetPoint 4200 requested by CPU0 PID fan0_tachfan0_pwm fan1_tachfan1_pwm

Signed-off-by: Harvey.Wu <Harvey.Wu@quantatw.com>
Change-Id: I779fed7a5deef262a0e65d4eb00116072beb28e8

show more ...

22579ca407-Nov-2022 Harvey Wu <Harvey.Wu@quantatw.com>

fix cppcheck warning

- Fix warnings:
[noExplicitConstructor]
ipmi/manualcmds.hpp:20:5: style: Class 'ZoneControlIpmiHandler' has a
constructor with 1 argument that is not explicit.

[red

fix cppcheck warning

- Fix warnings:
[noExplicitConstructor]
ipmi/manualcmds.hpp:20:5: style: Class 'ZoneControlIpmiHandler' has a
constructor with 1 argument that is not explicit.

[redundantInitialization]
dbus/dbusutil.cpp:96:15: style: Redundant initialization for 'layer'.
The initialized value is overwritten before it is read.

[uninitMemberVar]
pid/pidcontroller.hpp:23:5: warning: Member variable
'PIDController::_pid_info' is not initialized in the constructor.

[memsetClassFloat]
pid/util.cpp:29:10: portability: Using memset() on struct which
contains a floating point number.

[constParameter]
ipmi/manualcmds.cpp:108:72: style: Parameter 'dataLen' can be
declared as pointer to const

Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com>
Change-Id: Ib368c6e3a609e446529573cd0b9fa03858232db1

show more ...

3dcfd54631-Oct-2022 Harvey Wu <Harvey.Wu@quantatw.com>

Change folder name build to buildjson

- If change to use meson build, meson will automake build folder,
and this will overwrite the origin folder and miss the buildjson
files.

Signed-off-by: Ha

Change folder name build to buildjson

- If change to use meson build, meson will automake build folder,
and this will overwrite the origin folder and miss the buildjson
files.

Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com>
Change-Id: Idfc4852bf56ed8f6c04e1b4be78ce40e08539132

show more ...

a1ae4fa128-Oct-2022 Harvey.Wu <Harvey.Wu@quantatw.com>

fix compile warning when meson build

- Fix compile warning:
[-Werror=unused-variable], [-Werror=sign-compare] and
deprecated INSTANTIATE_TEST_CASE_P

Signed-off-by: Harvey.Wu <Harvey.Wu@quantatw

fix compile warning when meson build

- Fix compile warning:
[-Werror=unused-variable], [-Werror=sign-compare] and
deprecated INSTANTIATE_TEST_CASE_P

Signed-off-by: Harvey.Wu <Harvey.Wu@quantatw.com>
Change-Id: If8713f0b938cd5306bbe19a9078731db0c3667dc

show more ...

cf8ee30012-Oct-2022 Ed Tanous <edtanous@google.com>

Move Ed from maintainer to reviewer

Josh has been doing an excellent job of fielding phosphor-pid-control
related activities, and at this moment, I feel like he can do a better
job of fielding new f

Move Ed from maintainer to reviewer

Josh has been doing an excellent job of fielding phosphor-pid-control
related activities, and at this moment, I feel like he can do a better
job of fielding new features/bug fixes than I can.

As such, I've moved myself from the maintainers list to the reviewers
list. I'm still happy to help clarify intent, discuss new features, and
help with code reviews from time to time, but all of these are things
that Josh has done an excellent job of, and doesn't need my direct input
to continue.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ic52cdb3746ef1cf8e54d1e5d4a0e17b2c3051680

show more ...

e2ec69ad30-Sep-2022 Potin Lai <potin.lai@quantatw.com>

Add SIGHUP handling for reloading configuration

Add signal handling feature for handling the SIGHUP generated by
systemd ExecReload.

Tested log:
- Brfore reload
root@bletchley:~# systemctl status p

Add SIGHUP handling for reloading configuration

Add signal handling feature for handling the SIGHUP generated by
systemd ExecReload.

Tested log:
- Brfore reload
root@bletchley:~# systemctl status phosphor-pid-control.service
* phosphor-pid-control.service - Phosphor-Pid-Control Margin-based Fan Control Daemon
Loaded: loaded (/lib/systemd/system/phosphor-pid-control.service; enabled; preset: enabled)
Drop-In: /lib/systemd/system/phosphor-pid-control.service.d
`-10-bletchley.conf
Active: active (running) since Fri 2022-09-30 09:12:10 UTC; 1min 11s ago
Main PID: 884 (swampd)
CGroup: /system.slice/phosphor-pid-control.service
`-884 /usr/bin/swampd

Sep 30 09:12:32 bletchley swampd[884]: PID name: fan_tachs
Sep 30 09:12:32 bletchley swampd[884]: inputs: FAN0_TACH_IL, FAN0_TACH_OL, FAN1_TACH_IL, FAN1_TACH_OL, FAN2_TACH_IL, FAN2_TACH_OL, FAN3_TACH_IL, FAN3_TACH_OL,
Sep 30 09:12:32 bletchley swampd[884]: PID name: inlet_Temp
Sep 30 09:12:32 bletchley swampd[884]: inputs: Virtual_Inlet_Temp,
Sep 30 09:12:32 bletchley swampd[884]: PID name: retimer_temp
Sep 30 09:12:32 bletchley swampd[884]: inputs: MB_U19_THERM_LOCAL,
Sep 30 09:12:32 bletchley swampd[884]: PID name: switch_temp
Sep 30 09:12:32 bletchley swampd[884]: inputs: MB_U402_THERM_LOCAL,
Sep 30 09:12:32 bletchley swampd[884]: pushing zone 1
Sep 30 09:12:32 bletchley swampd[884]: PID Zone 1 max SetPoint 37 requested by inlet_Temp FAN0_TACH_IL FAN0_TACH_OL FAN1_TACH_IL FAN1_TACH_OL FAN2_TACH_IL FAN2_TACH_OL FAN3_TACH_IL FAN3_TACH_OL

- After reload called
root@bletchley:~# journalctl -u phosphor-pid-control.service | grep -i reload
Sep 30 09:13:46 bletchley systemd[1]: Reloading Phosphor-Pid-Control Margin-based Fan Control Daemon...
Sep 30 09:13:46 bletchley swampd[884]: reloading configuration
Sep 30 09:13:46 bletchley systemd[1]: Reloaded Phosphor-Pid-Control Margin-based Fan Control Daemon.
root@bletchley:~#
root@bletchley:~# systemctl status phosphor-pid-control
* phosphor-pid-control.service - Phosphor-Pid-Control Margin-based Fan Control Daemon
Loaded: loaded (/lib/systemd/system/phosphor-pid-control.service; enabled; preset: enabled)
Drop-In: /lib/systemd/system/phosphor-pid-control.service.d
`-10-bletchley.conf
Active: active (running) since Fri 2022-09-30 09:12:10 UTC; 2min 35s ago
Process: 1353 ExecReload=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)
Main PID: 884 (swampd)
CGroup: /system.slice/phosphor-pid-control.service
`-884 /usr/bin/swampd

Sep 30 09:13:56 bletchley swampd[884]: PID name: fan_tachs
Sep 30 09:13:56 bletchley swampd[884]: inputs: FAN0_TACH_IL, FAN0_TACH_OL, FAN1_TACH_IL, FAN1_TACH_OL, FAN2_TACH_IL, FAN2_TACH_OL, FAN3_TACH_IL, FAN3_TACH_OL,
Sep 30 09:13:56 bletchley swampd[884]: PID name: inlet_Temp
Sep 30 09:13:56 bletchley swampd[884]: inputs: Virtual_Inlet_Temp,
Sep 30 09:13:56 bletchley swampd[884]: PID name: retimer_temp
Sep 30 09:13:56 bletchley swampd[884]: inputs: MB_U19_THERM_LOCAL,
Sep 30 09:13:56 bletchley swampd[884]: PID name: switch_temp
Sep 30 09:13:56 bletchley swampd[884]: inputs: MB_U402_THERM_LOCAL,
Sep 30 09:13:56 bletchley swampd[884]: pushing zone 1
Sep 30 09:13:56 bletchley swampd[884]: PID Zone 1 max SetPoint 37 requested by inlet_Temp FAN0_TACH_IL FAN0_TACH_OL FAN1_TACH_IL FAN1_TACH_OL FAN2_TACH_IL FAN2_TACH_OL FAN3_TACH_IL FAN3_TACH_OL

Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: Idea1ede908fe4a2da3018cc0624c78ac7e0530eb

show more ...

f2efcbbd08-Feb-2022 Harvey.Wu <Harvey.Wu@quantatw.com>

Using readPath dbuspath in getMatch function

- If the "name" setting is not same as dbus sensor name,
it has problem when getMatch function.

For example:
if json setting like below,
{
"name":

Using readPath dbuspath in getMatch function

- If the "name" setting is not same as dbus sensor name,
it has problem when getMatch function.

For example:
if json setting like below,
{
"name": "fan00",
"type": "fan",
"readPath": "/xyz/openbmc_project/sensors/fan_tach/fan0_tach",
"writePath": "/xyz/openbmc_project/sensors/fan_tach/fan0_pwm",
"min": 0,
"max": 255
}

the swampd will start failed, log like below,
swampd[17273]: Sensor: fan00 fan /xyz/openbmc_project/sensors/fan_tach/fan0_tach /xyz/openbmc_project/sensors/fan_tach/fan0_pwm
swampd[17273]: ObjectMapper call failure

Signed-off-by: Harvey.Wu <Harvey.Wu@quantatw.com>
Change-Id: I08cd374ea7447148e4aeff7b06b288957260cbd2

show more ...

12345678910>>...15