16aab356 | 30-Jun-2021 |
Mike Capps <mikepcapps@gmail.com> |
control: command line tool to retrieve fan status (set/resume functions)
This is part three of a multipart commit to create a fan control command line utility to report service status, show target/a
control: command line tool to retrieve fan status (set/resume functions)
This is part three of a multipart commit to create a fan control command line utility to report service status, show target/actual RPM/PWM info, and manually control single fans. This commit contains the set/resume commands. Further functionality will come in subsequent commits.
The resume command is a shortcut to start phosphor-fan-control@0 systemd service, since most workflows require stopping it to allow control of individual fans. Once manual intervention is done, it can be resumed.
root@p10bmc:~# systemctl stop phosphor-fan-control@0.service root@p10bmc:~# fanctl resume root@p10bmc:~# systemctl status phosphor-fan-control@0.service root@p10bmc:~# <output indicates service is running>
For set/get functions, here is a usage example:
root@p10bmc:~# fanctl set 10000 root@p10bmc:~# fanctl set 2000 fan1 fan3_0 root@p10bmc:~# fanctl get
TARGET SENSOR TARGET(RPM) FEEDBACK SENSOR FEEDBACK(RPMS) =============================================================== fan0_0 10000 fan0_0 10000 fan0_1 13591 fan1_0 2000 fan1_0 1991 fan1_1 2000 fan2_0 10000 fan2_0 10000 fan2_1 13591 fan3_0 2000 fan3_0 1991 fan3_1 2000 fan4_0 10000 fan4_0 10000 fan4_1 10091 fan5_0 10000 fan5_0 10000 fan5_1 10021
Signed-off-by: Mike Capps <mikepcapps@gmail.com> Change-Id: Ib2b2f7433701e0178fcb8d2223e452b541ea5b0c
show more ...
|
ddb773b2 | 06-Oct-2021 |
Patrick Williams <patrick@stwcx.xyz> |
catch exceptions as const
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Id1b5054d3147c39d98309bc11ed7016d6909e2a6 |
16861797 | 27-Sep-2021 |
Matthew Barth <msbarth@us.ibm.com> |
control: Support `member` signal triggers
`member` signals are signals that a dbus object could send out on dbus that acts as a notification that does not contain any other data. This adds support t
control: Support `member` signal triggers
`member` signals are signals that a dbus object could send out on dbus that acts as a notification that does not contain any other data. This adds support to fan control events that can be triggered by this type of signal on dbus to essentially run a set of actions. The configuration of this trigger is contained within the JSON configuration of the trigger on the event and not against the event's group(s).
i.e.) "triggers": [ { "class": "signal", "signal": "member", "member": { "name": "Pressed", "path": "/xyz/openbmc_project/Chassis/Buttons/Power0", "interface": "xyz.openbmc_project.Chassis.Buttons.Power" } } ]
Change-Id: Ie7924174333c604fb54c8f18560a890bf6a7c489 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
737f11cd | 27-Sep-2021 |
Matthew Barth <msbarth@us.ibm.com> |
control: Provide trigger JSON to signal trigger subscribing
An upcoming signal class trigger will have additional JSON configuration details for subscribing to it. This removes the generally unused
control: Provide trigger JSON to signal trigger subscribing
An upcoming signal class trigger will have additional JSON configuration details for subscribing to it. This removes the generally unused event name passed to each type of signal and replaces it with the trigger's JSON configuration where used, which will not be used until the upcoming `member` type of signal.
Change-Id: I7f9be935ba32ea71d0529f27e8e1c9016f7cec1f Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
5894cd1e | 23-Sep-2021 |
Matthew Barth <msbarth@us.ibm.com> |
control: Remove deprecated `setActiveAllow` method
With the enhanced `setTargetHold` method addition, `setActiveAllow` should no longer be used in favor of utilizing the `setTargetHold` method for h
control: Remove deprecated `setActiveAllow` method
With the enhanced `setTargetHold` method addition, `setActiveAllow` should no longer be used in favor of utilizing the `setTargetHold` method for holding a zone at a given target.
Change-Id: I52c95c018e3a08e73ef294cf625940db1fcef6d8 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
5368011e | 23-Sep-2021 |
Matthew Barth <msbarth@us.ibm.com> |
control: Associate identifier with target holds
Create a zone method that associates a unique identifier to a target hold so that if more than one hold exists, the highest target is always used betw
control: Associate identifier with target holds
Create a zone method that associates a unique identifier to a target hold so that if more than one hold exists, the highest target is always used between all actions that could have set a target hold on the zone.
Change-Id: I7699769a2e271c8a63a0a0a05aef6b0888ce180a Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
c981bb5b | 21-Sep-2021 |
Matt Spinler <spinler@us.ibm.com> |
control: Mapped floor action can use parameters
Previously, the mapped floor action could only set floor values based on group property values. This commit adds support to be able to use a manager
control: Mapped floor action can use parameters
Previously, the mapped floor action could only set floor values based on group property values. This commit adds support to be able to use a manager parameter instead of a floor value.
For example:
"floors": [ { "parameter": "pcie_floor_index", "floors": [ { "value": 1, "floor": 2000 } ... } ...
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I874fa0f0c6b9befd74a095c31b893c5435b08abe
show more ...
|
530c655e | 29-Jun-2021 |
Mike Capps <mikepcapps@gmail.com> |
control: add command line tool to retrieve fan status (get function)
This is part two of a multipart commit to create a fan-control command line utility to report service status, show target/actual
control: add command line tool to retrieve fan status (get function)
This is part two of a multipart commit to create a fan-control command line utility to report service status, show target/actual RPM/PWM info, and manually control single fans. This commit implements the "get" command. Further functionality will come in subsequent commits.
Sample output: /tmp/fanctl get TARGET SENSOR TARGET(RPM) FEEDBACK SENSOR FEEDBACK(RPMS) =============================================================== fan0_0 10000 fan0_0 10000 fan0_1 13591 fan1_0 10000 fan1_0 10000 fan1_1 13591 fan2_0 10000 fan2_0 10000 fan2_1 13591 fan3_0 10000 fan3_0 10000 fan3_1 13591 fan4_0 10000 fan4_0 10000 fan4_1 13591 fan5_0 10000 fan5_0 10000 fan5_1 13591
Signed-off-by: Mike Capps <mikepcapps@gmail.com> Signed-off-by: Matthew Barth <msbarth@us.ibm.com> Change-Id: I5a918b34b807fa284c0072db2141aa572ae0f0da
show more ...
|
385b1986 | 28-Jun-2021 |
Mike Capps <mikepcapps@gmail.com> |
control: command line tool to retrieve fan status (status/help functions)
This is part one of a multipart commit to create a fan control command line utility to report service status, show target/ a
control: command line tool to retrieve fan status (status/help functions)
This is part one of a multipart commit to create a fan control command line utility to report service status, show target/ actual RPM/PWM info, and manually control single fans. Currently this only implements "status" and "help" commands (and makefile). Further functionality will come in subsequent commits.
Signed-off-by: Mike Capps <mikepcapps@gmail.com> Signed-off-by: Matthew Barth <msbarth@us.ibm.com> Change-Id: I9a9fc5c50edf7981075b59bb526e967e50e67c86
show more ...
|
65d07507 | 30-Aug-2021 |
Matthew Barth <msbarth@us.ibm.com> |
control: Remove setting target = poweron target at startup
After constructing the zone objects, the fan objects are created with their current target set to what's on dbus. This is then read and set
control: Remove setting target = poweron target at startup
After constructing the zone objects, the fan objects are created with their current target set to what's on dbus. This is then read and set on the zone as the fan(s) are added to their configured zone. Setting the target to the configured poweron target of the zone should not be done by default to ensure the zone is set to whatever the target is of its contained fan(s).
Signed-off-by: Matthew Barth <msbarth@us.ibm.com> Change-Id: I13bb83e6c06c4220e56c5574ee26c607074c261a
show more ...
|
12e888fb | 20-Aug-2021 |
Matthew Barth <msbarth@us.ibm.com> |
control: Use `poweron_target` in place of `full_speed`
The use of `full_speed` as a zone configuration attribute is removed in favor of `poweron_target`.
Change-Id: I1edb03f2c738105479d1ddf1236880a
control: Use `poweron_target` in place of `full_speed`
The use of `full_speed` as a zone configuration attribute is removed in favor of `poweron_target`.
Change-Id: I1edb03f2c738105479d1ddf1236880aa28e667f3 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
d9ec33a0 | 02-Sep-2021 |
Patrick Williams <patrick@stwcx.xyz> |
exception: switch to public sdbus exception
SdBusError was intended to be a private error type inside sdbusplus. Switch all catch locations to use the general sdbusplus::exception type.
Signed-off-
exception: switch to public sdbus exception
SdBusError was intended to be a private error type inside sdbusplus. Switch all catch locations to use the general sdbusplus::exception type.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ia432ec5539a6af3c761dfbb86916464de5455149
show more ...
|
89147526 | 25-Aug-2021 |
Matthew Barth <msbarth@us.ibm.com> |
control: Rename increase/decrease actions
Remove "speed" from the NetTargetIncrease and NetTargetDecrease action class names and use "target" instead.
Signed-off-by: Matthew Barth <msbarth@us.ibm.c
control: Rename increase/decrease actions
Remove "speed" from the NetTargetIncrease and NetTargetDecrease action class names and use "target" instead.
Signed-off-by: Matthew Barth <msbarth@us.ibm.com> Change-Id: I196a7c2fe9007a12ab4e470e4885afff775a39f8
show more ...
|
6a2418a2 | 01-Sep-2021 |
Matthew Barth <msbarth@us.ibm.com> |
control: Throw exception when no zones exist at poweron
A configuration of 1 or more zones is required (which includes a configuration of fans within those zone(s)), so throw an exception that will
control: Throw exception when no zones exist at poweron
A configuration of 1 or more zones is required (which includes a configuration of fans within those zone(s)), so throw an exception that will crash fan control if there are no zones configured once a system is powered on.
Since fan control could be waiting to find its JSON configuration files from the compatible interface, if that's never received by the time a poweron occurs, this will crash fan control. Essentially, fan control should already be configured prior to any poweron if its JSON configuration files are located in the default or override locations. However, if it should get the location of the JSON configuration files from the compatible interface, then this exception ensures that interface provided the location prior to a poweron.
Signed-off-by: Matthew Barth <msbarth@us.ibm.com> Change-Id: Ie421fb7dd98db7013aef8ae3bb61864756e493ce
show more ...
|
82a7d0b8 | 26-Aug-2021 |
Matthew Barth <msbarth@us.ibm.com> |
control: CountStateTarget action use unique identifier
Each instance of the CountStateTarget action needs to use a unique identifier when setting a zone's active fan control allowed state. This ensu
control: CountStateTarget action use unique identifier
Each instance of the CountStateTarget action needs to use a unique identifier when setting a zone's active fan control allowed state. This ensures that when more than one event is configured with the CountStateTarget action against the same group, their active fan control allowed states wont conflict.
Signed-off-by: Matthew Barth <msbarth@us.ibm.com> Change-Id: Ie515119c697f6f1819beb26aa9d2b16ed171b571
show more ...
|
bab94f29 | 24-Aug-2021 |
Matthew Barth <msbarth@us.ibm.com> |
control: Replace 'speed' with 'target' in CountStateTarget class
Signed-off-by: Matthew Barth <msbarth@us.ibm.com> Change-Id: Ia1515a7bbbffb2a0f0ba54c4a834df290e8eba49 |
81bc880d | 06-Aug-2021 |
Matt Spinler <spinler@us.ibm.com> |
control: set_parameter_from_group_max action
This action will write a D-Bus property value to the Manager's parameter cache. The property value written is the maximum value of all the configured gr
control: set_parameter_from_group_max action
This action will write a D-Bus property value to the Manager's parameter cache. The property value written is the maximum value of all the configured groups. The value can be modified using the Modifier utility class's expressions before storing it.
The use case for this is that this action would be configured to write a parameter that could then be used by another action.
An example JSON config is:
{ "name": "set_parameter_from_group", "parameter_name": "proc_0_throttle_temp", "modifier": { "operator": "minus", "value": 4 } }
This would read the maximum D-Bus property found in all the groups configured for the action, subtract 4 from it, and then store it as a Manager parameter under the name proc_0_throttle_temp.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I75d91110023e0de9908d694997676e4854917ea8
show more ...
|
babe3127 | 06-Aug-2021 |
Matt Spinler <spinler@us.ibm.com> |
control: Parameter use for set_net_increase_speed
Change the set_net_increase_speed to be able to specify a Manager parameter to get the state value from instead of just looking up a hardcoded value
control: Parameter use for set_net_increase_speed
Change the set_net_increase_speed to be able to specify a Manager parameter to get the state value from instead of just looking up a hardcoded value in the JSON.
The JSON now supports a 'state_parameter_name' field that can be used in place of the 'state' field. The code will then call Manager::getParameter with this parameter name to get the state value to use in the action.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Iaf422787c57c60a3a90c3272813e5f4eb3ca9886
show more ...
|
c09b8c88 | 05-Aug-2021 |
Matt Spinler <spinler@us.ibm.com> |
control: Add Modifier utility
Create a Modifier utility class that provides a doOp() function that can modify a value based on the JSON config passed to its constructor.
With the JSON: { "opera
control: Add Modifier utility
Create a Modifier utility class that provides a doOp() function that can modify a value based on the JSON config passed to its constructor.
With the JSON: { "operator": "minus", "value": 3 }
doOp() will subtract 3 from the passed in value.
The only currently supported expression is 'minus'.
This will be used by future actions to read a D-Bus property, subtract some configurable value from it, and store it in the Manager's parameter store.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I31d9800f83e52a927a2061a9a896da9c19d35809
show more ...
|
d76351bd | 05-Aug-2021 |
Matt Spinler <spinler@us.ibm.com> |
control: Add a parameter store to Manager
Add a map of names to PropertyVariantValues to the Manager class that actions can set and read. This allows one action to use a value from this parameter m
control: Add a parameter store to Manager
Add a map of names to PropertyVariantValues to the Manager class that actions can set and read. This allows one action to use a value from this parameter map that another action has previously set.
A future use of this is to store a throttle temperature that has to be calculated, which net_target_increase can then use to make decisions on.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ibefb97ed667d6b19ce71113d13efe08a1d3ff81f
show more ...
|
ceb75d71 | 18-Aug-2021 |
Matthew Barth <msbarth@us.ibm.com> |
control: Install JSON config files from repo
Install the JSON config files for the machine name provided in the environment variable "MACHINE" into the application's data directory. When no "MACHINE
control: Install JSON config files from repo
Install the JSON config files for the machine name provided in the environment variable "MACHINE" into the application's data directory. When no "MACHINE" name is given, the entire contents of the `config_files` directory is installed and when a given "MACHINE" named directory does not exist, the installation is intended to fail. This failure of installation is to ensure that the fan application's necessary JSON config files will exist so the fan application does not fail to start.
Change-Id: I9d93694ece2fa26cd556f3010f2136d5576f8270 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
b9f94185 | 18-Aug-2021 |
Matthew Barth <msbarth@us.ibm.com> |
control: Add machine JSON config files
Add the known JSON config files that exist in the openbmc repository to be installed for each machine.
Change-Id: I64a9e87c3c947790c5368b0195634a81264b0537 Si
control: Add machine JSON config files
Add the known JSON config files that exist in the openbmc repository to be installed for each machine.
Change-Id: I64a9e87c3c947790c5368b0195634a81264b0537 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
config_files/p10bmc/ibm,everest/fans.jsonconfig_files/p10bmc/ibm,everest/zones.jsonconfig_files/p10bmc/ibm,rainier-1s4u/fans.jsonconfig_files/p10bmc/ibm,rainier-1s4u/zones.jsonconfig_files/p10bmc/ibm,rainier-2u/zones.jsonconfig_files/p10bmc/ibm,rainier-4u/zones.jsonconfig_files/p10bmc/ibm,rainier/fans.json/openbmc/phosphor-fan-presence/monitor/config_files/p10bmc/ibm,everest/config.json/openbmc/phosphor-fan-presence/monitor/config_files/p10bmc/ibm,rainier-1s4u/config.json/openbmc/phosphor-fan-presence/monitor/config_files/p10bmc/ibm,rainier-2u/config.json/openbmc/phosphor-fan-presence/monitor/config_files/p10bmc/ibm,rainier-4u/config.json/openbmc/phosphor-fan-presence/monitor/config_files/witherspoon/config.json/openbmc/phosphor-fan-presence/presence/config_files/p10bmc/ibm,everest/config.json/openbmc/phosphor-fan-presence/presence/config_files/p10bmc/ibm,rainier-1s4u/config.json/openbmc/phosphor-fan-presence/presence/config_files/p10bmc/ibm,rainier-2u/config.json/openbmc/phosphor-fan-presence/presence/config_files/p10bmc/ibm,rainier-4u/config.json/openbmc/phosphor-fan-presence/presence/config_files/witherspoon/config.json |
848799f9 | 01-Jul-2021 |
Matt Spinler <spinler@us.ibm.com> |
control: Create MappedFloor action
This action can be used to set a floor value based on 2 or more groups having values within certain ranges, where the key group chooses the set of tables in which
control: Create MappedFloor action
This action can be used to set a floor value based on 2 or more groups having values within certain ranges, where the key group chooses the set of tables in which to check the remaining group values.
For example, with the following JSON:
{ "name": "mapped_floor", "key_group": "ambient_temp", "fan_floors": [ { "key": 27, "floors": [ { "group": "altitude", "floors": [ { "value": 5000, "floor": 2000 }, { "value": 7000, "floor": 6000 } ] }, { "group": "power_mode", "floors": [ { "value": "PowerSave", "floor": 3000 }, { "value": "MaximumPerformance", "floor": 5000 } ] } ] } ] }
If the ambient_temp group has a value less than 27, then it looks up the values for the altitude and power_mode groups, where for altitude, since it's numeric, it will use a <= operator, and for power_mode, since it's a string, it will use an == operator when comparing to the values in the JSON. It will then choose the largest floor value between the altitude and power_mode results.
There are several scenarios that result in a default floor being set.
Full action documentation is in the class header file.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I8e0ff3a97ff73dd20018473c1993b2e043276099
show more ...
|
34835150 | 01-Jul-2021 |
Matt Spinler <spinler@us.ibm.com> |
control: Use getSubTreeRaw call in addServices
In cases where a property used by an action isn't on D-Bus on startup, the original getSubTree() call would throw an unhandled exception which would cr
control: Use getSubTreeRaw call in addServices
In cases where a property used by an action isn't on D-Bus on startup, the original getSubTree() call would throw an unhandled exception which would crash the daemon. Change to getSubTreeRaw() so that doesn't happen.
Also change a trace that a occurs when a D-Bus service isn't found to debug as that is expected in this case.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ibd147c303d40761f75f961a9ce404139c2b2c134
show more ...
|
5a2b5017 | 22-Jul-2021 |
Matt Spinler <spinler@us.ibm.com> |
control: Remove target check in Zone::setTarget
In Zone::setTarget that sets fan targets, remove the check that exits out if the new target value equals the previous target (_target) value.
Do this
control: Remove target check in Zone::setTarget
In Zone::setTarget that sets fan targets, remove the check that exits out if the new target value equals the previous target (_target) value.
Do this because:
1) _target gets set to the power on speed in the constructor but doesn't set fan speeds then. When the power turns on is when the code acutally sets the fans to that value, which was then not doing anything because the target was already the _target value.
2) The fan objects also check if the new requested speed matched their previous one, so that check would also catch a duplicate speed change.
Tested: Verify the fan speeds were being written on a power on.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I1db60d9ea3a2e3ba04fc32e024da6c21e722b828
show more ...
|