| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Temperature readings should not be in percent. Add
ignoreDbusMinMax as inheritFromDbus was removed.
Tested: modified fan floor by changing stepwise controller
Change-Id: I1bf4e15ca78bc894dc82dd68e787fd6fbd3d0aef
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Originally 'inheritFromDBus' was only set for fan
configurations. This was removed, so now everything
was inheriting from Dbus. Set the inverse of
'inheritFromDBus' of ignoreDbusMinMax to temp configurations
so that they get the correct reading.
Tested: Used sensor override in a loop on a sensor and
saw the reading in the pid be correct
Change-Id: I29dab298921f9c5204d29341555f2c5d2d011aa2
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Occasionally, phosphor-pid-control fails to start logging:
swampd[2688]: terminate called after throwing an instance of 'std::runtime_error'
swampd[2688]: what(): ObjectMapper Call Failure
This happens multiple times:
systemd[1]: phosphor-pid-control.service: Main process exited, code=killed, status=6/ABRT
systemd[1]: phosphor-pid-control.service: Failed with result 'signal'.
systemd[1]: phosphor-pid-control.service: Service RestartSec=1s expired, scheduling restart.
systemd[1]: phosphor-pid-control.service: Scheduled restart job, restart counter is at 2.
systemd[1]: Stopped Swampd Margin-based Fan Control Daemon.
systemd[1]: phosphor-pid-control.service: Start request repeated too quickly.
systemd[1]: phosphor-pid-control.service: Failed with result 'signal'.
systemd[1]: Failed to start Swampd Margin-based Fan Control Daemon.
and systemd gives up and stops trying to restart the service.
$ systemctl --no-page status phosphor-pid-control.service
* phosphor-pid-control.service - Swampd Margin-based Fan Control Daemon
Loaded: loaded (/lib/systemd/system/phosphor-pid-control.service; enabled; vendor preset: enabled)
Active: failed (Result: signal) since Thu 2019-10-31 18:05:11 UTC; 1min 56s ago
Process: 2738 ExecStart=/usr/bin/swampd (code=killed, signal=ABRT)
Main PID: 2738 (code=killed, signal=ABRT)
xyz.openbmc_project.fansensor.service is the service from dbus-sensors
that phosphor-pid-control uses to interact with the fans and pwms.
phosphor-pid-control should not start until after fansensor.
Tested:
swampd comes up reliably on a system using
xyz.openbmc_project.fansensor.service. I have not tried a system that
isn't using dbus-sensors.
Signed-off-by: Peter Lundgren <peterlundgren@google.com>
Change-Id: Iec019bfabcc77279c7dfe8d4899ac07c1c41a428
|
|
|
|
|
|
|
|
|
| |
Add an optional field to the sensor configuration, s.t. it'll tell a
dbus passive sensor to ignore the MinValue and MaxValue properties from
dbus.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ia6a8c802c2dc5bf41e5e860b21d7764cc09e6b6b
|
|
|
|
|
|
|
|
|
|
| |
main.o swampd-util.o ./.libs/libswampd.a -lstdc++fs -lphosphor_logging
-lsdbusplus -lsystemd -lphosphor_dbus
00:59:59 | lto1: internal compiler error: in add_symbol_to_partition_1,
at lto/lto-partition.c:154
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I387d1530ff7daaa217dce980e357ea612f7ddfdb
|
|
|
|
|
|
|
|
|
| |
The min/max value in the json configuration only provide meaning in the
context of a fan sensor. This patch only loads the configuration
options in that case, and reports a warning if otherwise detected.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I20898ab3c87f4e9c6005683420a30c6685944c96
|
|
|
|
|
| |
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I9d01753a40f1146d49e1a03a18dbea704f3fff84
|
|
|
|
|
| |
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ia1f08915f5541142cb3e10aa68043d3d2cad0167
|
|
|
|
|
|
|
|
|
|
| |
The SetPoint output from a thermal PID is likely RPM, and that value is
then fed into a fan controller PID as the set-point (unit: RPM). This
does not have to be RPM, however. Continue renaming variables and
methods to remove the explicit unit-naming.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I570dee0c688338f9a458cac7123314717bee2b42
|
|
|
|
|
|
|
|
|
|
|
| |
The PIDs were originally focused on collecting RPM set points from
thermal PIDs and then having fan PIDs use the highest value collected,
it doesn't need to be strictly an RPM set point.
It does however need to be one type of value.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I1d589cf4b2688d7e86030c10496d737dc5bbdadf
|
|
|
|
|
| |
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ib144b0759ce3b5db92e16c8801df365fb07e1a7c
|
|
|
|
|
|
|
|
|
|
| |
For the sensor, if writePath is used for dbus active, it is always
FanPwm (presently) and needs to be the object path.
Tested: Not tested, only code inspected.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I4eafaff4316aac9dab9a2c9e1bd61093a670b023
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As we allow dynamic thresholds in dbus-sensors to track
the t-control of dimms etc, we want to be able to set a
setpoint based on a offset from a threshold. This adds
the ability to create a "SetPointOffset" that is a
threshold of the given sensor. For instance a "SetPointOffset"
of "WarningHigh" would get the sensors "WarningHigh" value
then add the "SetPoint" value to it (commonly negative for
WarningHigh/CriticalHigh).
Tested: Turned on debug print and saw correct setpoint being
loaded into config
Change-Id: Idb9760ea5a66347f24573fb26937f8f278834a19
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
min/max values were meant to scale write to be PWM, but were
overloaded in commit 75eb769d351434547899186f73ff70ae00d7934a
to scale sensor read to percent as well. However currently the D-Bus sensors
built from JSON can only specify one pair of min/max values,so they
cannot be used for both read/write interfaces.
Fix the behavior by ignoring min/max in settings when building D-Bus passive
read interface and only read them from D-Bus.
Tested:
D-Bus passive sensor value is no longer scaled if there is no
MinValue/MaxValue specified.
Resolves: openbmc/phosphor-pid-control#14
Signed-off-by: Kun Yi <kunyi731@gmail.com>
Change-Id: I206bbe75c77e79f765eca76cfa015321dcba4aa7
|
|
|
|
|
|
|
| |
Check for max > min before dividing by difference
Signed-off-by: Kun Yi <kunyi731@gmail.com>
Change-Id: Ic2a983bb6f7c04f1deafcab228b76ff60012f011
|
|
|
|
|
|
|
| |
When setting min, should check for min instead of max.
Signed-off-by: Kun Yi <kunyi731@gmail.com>
Change-Id: I0097bb329408f807fea6d68ca0055c5d8215aba3
|
|
|
|
|
|
|
|
| |
The tool used to write this implemented features not available in the
makrdown used by github. Therefore, this removes those features.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I3a3eed1c8f298fe88f0ddbcb43aa897ec4d6f623
|
|
|
|
|
|
|
| |
Service file for swampd has been added
Signed-off-by: Vijay Khemka <vijaykhemka@fb.com>
Change-Id: If449c0e943f1a82e9d18599391f0dc68c28009ec
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Configurations with no input are not allowed. The
current code looked for if there were any sensors
avaiable. On our systems an input was not being
displayed due to a bug, but the output was there,
causing pid control to crash. Protect against this
issue.
Tested: Had sensor bug in tree, and pid control didn't
segfault
Change-Id: I42869748bac0b85affae5f5c671b859fec996a54
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
| |
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I1d58fc0408d4c1bf29927dfe36155139e87ba242
|
|
|
|
|
|
|
|
| |
Add some initial PID notes. Added some TODO line items for things that
need further documentation.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: If9d219a6410d4f36af04e0d69d4a865dbdd19492
|
|
|
|
|
|
|
| |
Add details for configuring the sensor. Not yet the zones.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I073a4dde4fd6c785ffaea2daed03ebbe83d0d1d2
|
|
|
|
|
| |
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ib2b0d89df2f5475fd571d9bec474ae7b769cf28a
|
|
|
|
|
| |
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I459a910f39695f22732bfdef2d70a9d594af290d
|
|
|
|
|
|
|
|
| |
Dropped this into an auto-formatter today as part of setting up for the
next changes.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Iee4fbdc2ba58bfe435dafc07bae7ad47f2e4ef61
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds fan redundancy support to passive sensors.
If there are redundancy interfaces on dbus, we'll fail
a sensor if the status is set to failed.
Tested: Set Redundancy to Failed On Dbus, saw all fans
in collection boost. Then restarted swampd, came up
and still boosted. Set redundancy OK, and they all slowed
down.
Change-Id: I8879bef1471bbc168435d6b22dd20006b9dca133
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
| |
Add a guide explaining the tuning procedure and logging
format, and point README to it
Signed-off-by: Kun Yi <kunyi731@gmail.com>
Change-Id: I287b0ef4a5ede1c62751d1671e2eec188133a074
|
|
|
|
|
|
|
|
| |
The json parser cannot read stepwise setting from config.
This change adds support to stepwise type of pid.
Change-Id: I650c5bd6a0040bf25630e33b3bd36abf388f0cd8
Signed-off-by: Hank Liou <Hank.Liou@quantatw.com>
|
|
|
|
|
|
|
|
| |
Add check the fan fail. If detect fan fail then into
the fail safe mode.
Signed-off-by: Will Liang <will.liang@quantatw.com>
Change-Id: I6ef9d42e131500c1b38a708e1c6fda15dc712f60
|
|
|
|
|
|
|
|
|
| |
loggingPath is not populated after args are parsed.
Tested: with -l, swampd correctly generated logs
Resolves: openbmc/phosphor-pid-control#12
Signed-off-by: Kun Yi <kunyi731@gmail.com>
Change-Id: Ic103879f6b65d4e89c49e8d9700c5d71b9549f4d
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we add a "Profiles" vector into the PID and Stepwise
entity-manager configurations the logic becomes much more
simple. We default to all profiles, and can limit the scope
of some configurations to the selected profile.
Tested: Switched between Acoustic/Performance mode and saw
a UpperClippingCurve get added / removed.
Change-Id: Ib0448b59210f696c8a28a99da06f98b065eadf08
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that asio is being used instead of threads, we can
reload the fan configuration without having to restart the
application. This moves the ownership of the passive and host
bus outside of the SensorManager so that it can be recreated
each reload.
Tested: Watched logs and saw full fan config get reloaded
after changing fan configuration
Tested: Ran on json configured system and it behaved as
expected.
Change-Id: I00e6b27f75384fd41de2017b723f159c9691ae97
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
| |
This deletes all lower level util.hpp and cats them
into the top level util.hpp to avoid name conflicts.
Change-Id: Ia11e4a08053a3970b0aadf21d1156ab26def36bd
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
| |
Verify the logging parameter is explicitly a directory. Treat the path
as a directory for creating the logging files.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I84d6be79780df3f52deeb1ff1b7a50de6175c055
|
|
|
|
|
|
|
|
|
| |
add a flag to enable/disable tuning: default off
add an option for specifying a folder for outputting logs.
Closes: #10
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I43864768f1dee8672f13288d3cf5a0c87c373aed
|
|
|
|
|
|
|
| |
Remove check that the log file path exists.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I8324ea847fd57de54ab1a9d252fd12a3ddafc4d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This converts phosphor-pid-control into an async
single threaded application. The reason for doing this
is on our systems phosphor-pid-control had the largest
VSZ when viewed under top. Before this patch the VSZ
was at 50720, after it is at 7760.
Tested-by: Could still interact with all interfaces
under rest-dbus and sensor override worked to ramp fans
when changing cpu temps.
Change-Id: Ie0a837bdf0d1b1df61dc7aff87e5d503b9e0e875
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
| |
s/positive/negative
Change-Id: Ib7761abae47404706c69255fc2861d0f58c26369
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
| |
Installs swampd and setsensor into bin instead of sbin per guidelines.
Warning: Every platform requires its own service file, please update
your service file when you pick up this change.
Change-Id: Ib7fe057d8758a8851049e88d41d13ca80b0b9862
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
| |
The code incorrectly attempts to read the hystersis parameters from the
wrong scope of the json object. This fixes it to read from the pid
configuration's scope.
Tested: Added a new unit-test to hit this case.
Change-Id: I808bc907ec33a0b12d68a88fd316c3c9fae41516
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
| |
The code coverage macros from the archive changed in a backward
incompatible way. This adds a workaround to autodetect either version
and do the right thing.
Change-Id: I63d1cdf6edb125d75872d6dae38f8602fc043431
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
When a log path is provided, append the zone id to the log so that each
zone will have its own log file.
Change-Id: I56f92669eda23148127f53fd50e119912a24200b
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
Swap out getopt for cli11 for parsing parameters.
Change-Id: If6845c359dafc28b545925faa4701d401c7b8dd2
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
[experiments/drive.cpp:83] -> [experiments/drive.cpp:96]: (style)
Variable 'check' is reassigned a value before the old one has been used.
Change-Id: I241a2b38418ab89790d2d8762aaceb3cd080ad77
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
Use filesystem now that it should be available instead of
experimental::filesystem.
Change-Id: I8648ac2b279eea42c13d6b12f312a2e1e02aa152
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
Add this explicitly everywhere.
Change-Id: Ia7a6edd077100de545186b9e298e3bc8e4456fba
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
Enable code coverage for the project. Valgrind not enabled in this
step.
Change-Id: I62891f6054e5e5315d7f150a1f3dcf619f2740db
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
Rework gtest checks to be modeled after openbmc/gpioplus.
Change-Id: I54539c7031dbf87fea5d2c8ad56e415be8917f7a
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
Add coverage bits to gitignore.
Change-Id: Ia023c7e8d3a0035d72774c90ad76b0895149573f
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Add a variable that when set, enables tuning logging. This variable is
set to false.
Tuning can be enabled via "-t" "--tuning" on the command line.
With a parameter is the path where to write the logging information.
Change-Id: I6eb8035d56cc3301face21e9375c02fc9fcc5b31
Signed-off-by: Patrick Venture <venture@google.com>
|