Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
control/ | H | - | - | 32,779 | 24,825 | |
cooling-type/ | H | - | - | 336 | 245 | |
docs/ | H | - | - | 2,975 | 2,309 | |
evdevpp/ | H | - | - | 218 | 135 | |
monitor/ | H | - | - | 7,807 | 4,910 | |
presence/ | H | - | - | 4,265 | 2,812 | |
sensor-monitor/ | H | - | - | 1,788 | 1,068 | |
subprojects/ | H | - | - | 52 | 36 | |
test/ | H | - | - | 77 | 54 | |
.clang-format | H A D | 03-Feb-2025 | 3.7 KiB | 137 | 135 | |
.gitignore | H A D | 20-Jun-2022 | 50 | 5 | 4 | |
LICENSE | H A D | 18-Jan-2017 | 11.1 KiB | 202 | 169 | |
OWNERS | H A D | 13-Oct-2022 | 1.6 KiB | 49 | 44 | |
README.md | H A D | 30-Aug-2024 | 7.4 KiB | 231 | 158 | |
dbus_paths.hpp | H A D | 29-Jun-2022 | 637 | 20 | 8 | |
hwmon_ffdc.cpp | H A D | 29-Feb-2024 | 3.1 KiB | 138 | 109 | |
hwmon_ffdc.hpp | H A D | 14-Jun-2021 | 341 | 18 | 6 | |
json_config.hpp | H A D | 16-Aug-2024 | 13 KiB | 380 | 209 | |
logger.hpp | H A D | 17-Jul-2023 | 4.2 KiB | 176 | 97 | |
meson.build | H A D | 01-Feb-2025 | 6.6 KiB | 235 | 201 | |
meson.options | H A D | 01-Feb-2025 | 3.9 KiB | 182 | 153 | |
power_state.hpp | H A D | 16-Aug-2024 | 11.2 KiB | 384 | 215 | |
sdbusplus.hpp | H A D | 03-Feb-2025 | 21.3 KiB | 585 | 458 | |
sdeventplus.hpp | H A D | 29-Jun-2021 | 1 KiB | 40 | 14 | |
utility.hpp | H A D | 17-Jul-2023 | 3.1 KiB | 123 | 89 |
README.md
1# Repository Details 2 3## Table of Contents 4 5- [Overview](#overview) 6- [Building](#building) 7- [Contents](#contents) 8 9## Overview 10 11The phosphor-fan-presence repository provides a set of thermal related 12applications that control and monitor the cooling of a system using fans. Each 13application independently controls or monitors an area related to the thermal 14status of a system that uses fans as its primary cooling mechanism. Since each 15application independent in its functionality, they can individually be included 16in a BMC image at _configure_ time to provide only the functionality needed by a 17user's machine. 18 19## Building 20 21By default, runtime JSON configuration file(s) are used for each application. 22The use of YAML configuration file(s) has been deprecated in favor of the JSON 23method. Support for the use of YAML based configuration files may be removed 24once all applications completely support getting their configuration from JSON 25file(s) at runtime. 26 27The following applications are built by default: 28 29- [Fan Control](#fan-control) 30 31 - To disable from building, use the `-Dcontrol-service=disabled` meson option: 32 33 meson build -Dcontrol-service=disabled 34 35- [Fan Presence Detection](#fan-presence-detection) 36 37 - To disable from building, use the `-Dpresence-service=disabled` meson 38 option: 39 40 meson build -Dpresence-service=disabled 41 42- [Fan Monitoring](#fan-monitoring) 43 44 - To disable from building, use the `-Dmonitor-service=disabled` meson option: 45 46 meson build -Dmonitor-service=disabled 47 48- [Sensor Monitoring](#sensor-monitoring) 49 50 - To disable from building, use the `-Dsensor-monitor-service=disabled` meson 51 option: 52 53 meson build -Dsensor-monitor-service=disabled 54 55The following applications must be enabled at _configure_ time to be built: 56 57- [Cooling Type](#cooling-type) 58 59 - To enable building this, set the `-Dcooling-type-service=enable` meson 60 option: 61 62 meson build -Dcooling-type-service=enabled 63 64### YAML (Deprecated) 65 66The location of the YAML configuration file(s) are provided at _configure_ time 67to each application thru environment variables. The default YAML configuration 68file(s) used are the examples found within each application's example directory. 69See each application below ([Contents](#contents)) for more information on how 70to set their specific _configure_ time options, including the location of the 71YAML configuration file(s). 72 73Meson defaults to JSON based runtime configuration, so to select the YAML 74configuration use the '-Djson-config=disabled' option when building: 75 761. meson build -Djson-config=disabled 772. ninja -C build 78 79### JSON 80 81See each application below ([Contents](#contents)) for more information on how 82to set their specific _configure_ time options and details on how to configure 83each using JSON. 84 85As JSON based runtime configuration is the default option, no extra options are 86required to build: 87 881. meson build 892. ninja -C build 90 91**Note: Features/Restrictions of applications in this package that are only 92supported using the JSON based configuration are listed below:** 93 94#### Features 95 96- [Fan Presence Detection](#fan-presence-detection) 97 - Error logging for missing fans 98- [Fan Monitoring](#fan-monitoring) 99 - Error logging for nonfunctional fans 100 - System power off due to missing or nonfunctional fans 101- [Sensor Monitoring](#sensor-monitoring) - Only supports JSON 102 103## Contents 104 105### Fan Control 106 107Controls the fans based on a set of events that are configured using a group of 108D-Bus objects and one-or-more triggers that run a configured set of actions. 109These events are meant to be configured to handle all aspects of controlling the 110fans within a system. Fans are added to zones that then have events configured 111against the zone to control the fans based on the state of any sized group of 112D-Bus objects. 113 114- Available meson options: 115 - `control-persist-root-path` - Base location to persist zone property states 116 on the BMC 117 - Default = '/var/lib/phosphor-fan-presence/control' 118 119#### YAML (Deprecated) 120 121- Available meson options: 122 - `fan-def-yaml-file` - Build time fan configuration file 123 - Default = ['control/example/fans.yaml'](control/example/fans.yaml) 124 - `fan-zone-yaml-file` - Build time zone configuration file 125 - Default = ['control/example/zones.yaml'](control/example/zones.yaml) 126 - `fan-events-yaml-file` - Build time events configuration file 127 - Default = ['control/example/events.yaml'](control/example/events.yaml) 128 - `zone-conditions-yaml-file` Build time zone conditions configuration file 129 - Default = 130 ['control/example/zone_conditions.yaml'](control/example/zone_conditions.yaml) 131 132[Example](control/example/) 133 134#### JSON 135 136[README](docs/control/README.md) 137 138--- 139 140### Fan Presence Detection 141 142Monitors the presence state of fans using GPIOs, nonzero tach feedbacks, or a 143combination of both. This updates a configured location of a fan D-Bus object's 144`Present` property according to the state of the methods used to detect the 145fan's presence. 146 147- Available meson options: 148 - `num-presence-log-entries` - Maximum number of entries in the message log 149 - Default = 50 150 151#### YAML (Deprecated) 152 153- Available meson options: 154 - `presence-config` - Location of the config file 155 - Default = ['presence/example/example.yaml'](presence/example/example.yaml) 156 157Example: [example.yaml](presence/example/example.yaml) 158 159#### JSON 160 161[README](docs/presence/README.md) 162 163--- 164 165### Fan Monitoring 166 167Monitors the functional state of fans by comparing the fan feedback speed 168against the current target, applying any configured adjustments to the target 169due to fan hardware properties. In addition to updating the configured location 170of a fan D-Bus object's `Functional` property in inventory, actions can be 171configured\* to be taken based on the state of fans, i.e.) creating event logs 172or powering off the system. 173 174Another feature that can be configured is the ability to cancel the monitoring 175of a set of fans that may be necessary to workaround designs of the fan hardware 176and/or controller used. 177 178\*_Actions to be taken based on the state of fans is only available using a JSON 179based configuration_ 180 181- Available meson options: 182 - `num-monitor-log-entries` - Maximum number of entries in the message log 183 - Default = 75 184 185#### YAML (Deprecated) 186 187- Available meson options: 188 - `fan-monitor-yaml-file` - Location of the config file 189 - Default = ['monitor/example/monitor.yaml'](monitor/example/monitor.yaml) 190 191Example: [monitor.yaml](monitor/example/monitor.yaml) 192 193#### JSON 194 195[README](docs/monitor/README.md) 196 197--- 198 199### Cooling Type 200 201Sets the `AirCooled` and `WaterCooled` property on the 202`xyz.openbmc_project.Inventory.Decorator.CoolingType` interface in inventory 203based on a given GPIO. No configuration files are used with this application as 204it is command line driven. 205 206--- 207 208### Sensor Monitoring 209 210Takes actions, such as powering off the system, based on sensor thresholds and 211values. 212 213- Available meson options: 214 - `sensor-monitor-persist-root-path` - Base location to persist sensor 215 monitoring data 216 - Default = '/var/lib/phosphor-fan-presence/sensor-monitor' 217 - `sensor-monitor-hard-shutdown-delay` - Milliseconds to delay the alarm hard 218 shutdown 219 - Default = 23000 220 - `sensor-monitor-soft-shutdown-delay` - Milliseconds to delay the alarm soft 221 shutdown 222 - Default = 900000 223 - `use-host-power-state` - Use the host state for the power state as opposed 224 to the PGOOD state. 225 - `skip-power-checking` - Skip power state checking while sending threshold 226 alarm event. 227 228[README](docs/sensor-monitor/README.md) 229 230--- 231