The phosphor-fan-control
application is comprised of as set of configuration files (config files) that constructs the algorithm in which fans are controlled within a machine.
The config file is written using the JSON (JavaScript Object Notation) data format and can be created using a text editor.
TBD
The config file names are:
manager.json
profiles.json
fans.json
zones.json
groups.json
events.json
/usr/share/phosphor-fan-presence/control/
The supported version of the config files are installed under this read-only directory location as part of the firmware image install. This is where the config files will be loaded from when no corresponding override config file exists.
Where a single set of config files for 1-or-more system types can be used, the config files can be located at the base of the supported directory.
i.e.)/usr/share/phosphor-fan-presence/control/manager.json
/usr/share/phosphor-fan-presence/control/profiles.json
/usr/share/phosphor-fan-presence/control/fans.json
/usr/share/phosphor-fan-presence/control/zones.json
/usr/share/phosphor-fan-presence/control/groups.json
/usr/share/phosphor-fan-presence/control/events.json
The config files location can also be based on a system type. This is necessary where more than one type of machine is supported in a single BMC firmware image and those system types can not share any one common config file.
A system type sub-directory can be obtained from the IBMCompatibleSystem
D-Bus interface's Names
property. The Names
property contains a list of one or more compatible system types, ordered from most specific to the most general.
Example:
ibm,rainier-2u
ibm,rainier
The phosphor-fan-control
application then traverses the supported directory, appending each compatible system type entry as a sub-directory from most specific to most general on each config file until it is found.
Example: TBD
If any required config file is not found and the machine is powered on, an error is logged and phosphor-fan-control
application terminates preventing the machine from successfully powering on.
/etc/phosphor-fan-presence/control/
A different version of each of the config files can be loaded by placing it into this writable directory location. This avoids the need to build and install a new firmware image on the BMC when changing any part of the configuration, such as for testing purposes.
The override directory may not exist on the BMC, therefore to be able to use any number of overriding config files it must be created using the following command:
mkdir -p /etc/phosphor-fan-presence/control
The phosphor-fan-control
application will search for each config file at the directory locations in the following order:
TBD
TBD
TBD
TBD
When a new firmware image is installed on the BMC, it will update the config file in the standard directory.
The override directory will not be modified by a firmware update. If a config file exists in the override directory, it will continue to be used as the fan presence configuration instead of the config file located under the appropriate location within the supported directory.
The config files are loaded when the phosphor-fan-control
application starts.
To force the application to reload the config files, use the following command on the BMC:
systemctl kill -s HUP phosphor-fan-control@0.service
To confirm which config files were loaded, use the following command on the BMC:
journalctl -u phosphor-fan-control@0.service | grep Loading