|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| control/ | H | - | - | 38,176 | 30,215 |
| cooling-type/ | H | - | - | 323 | 235 |
| docs/ | H | - | - | 2,974 | 2,308 |
| evdevpp/ | H | - | - | 219 | 136 |
| monitor/ | H | - | - | 7,983 | 5,085 |
| presence/ | H | - | - | 4,381 | 2,927 |
| sensor-monitor/ | H | - | - | 1,796 | 1,069 |
| 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-Jun-2025 | 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 | 09-Apr-2025 | 12.8 KiB | 375 | 204 |
| logger.hpp | H A D | 02-Apr-2025 | 4.1 KiB | 174 | 95 |
| meson.build | H A D | 17-Feb-2025 | 6.8 KiB | 242 | 207 |
| meson.options | H A D | 17-Feb-2025 | 4 KiB | 189 | 159 |
| power_state.hpp | H A D | 09-Apr-2025 | 11.1 KiB | 383 | 214 |
| sdbusplus.hpp | H A D | 02-Apr-2025 | 21 KiB | 580 | 453 |
| sdeventplus.hpp | H A D | 29-Jun-2021 | 1 KiB | 40 | 14 |
| utility.hpp | H A D | 09-Apr-2025 | 3 KiB | 119 | 86 |
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 - To disable from building, use the `-Dcontrol-service=disabled` meson option:
31
32 meson build -Dcontrol-service=disabled
33
34- [Fan Presence Detection](#fan-presence-detection)
35 - To disable from building, use the `-Dpresence-service=disabled` meson
36 option:
37
38 meson build -Dpresence-service=disabled
39
40- [Fan Monitoring](#fan-monitoring)
41 - To disable from building, use the `-Dmonitor-service=disabled` meson option:
42
43 meson build -Dmonitor-service=disabled
44
45- [Sensor Monitoring](#sensor-monitoring)
46 - To disable from building, use the `-Dsensor-monitor-service=disabled` meson
47 option:
48
49 meson build -Dsensor-monitor-service=disabled
50
51The following applications must be enabled at _configure_ time to be built:
52
53- [Cooling Type](#cooling-type)
54 - To enable building this, set the `-Dcooling-type-service=enable` meson
55 option:
56
57 meson build -Dcooling-type-service=enabled
58
59### YAML (Deprecated)
60
61The location of the YAML configuration file(s) are provided at _configure_ time
62to each application thru environment variables. The default YAML configuration
63file(s) used are the examples found within each application's example directory.
64See each application below ([Contents](#contents)) for more information on how
65to set their specific _configure_ time options, including the location of the
66YAML configuration file(s).
67
68Meson defaults to JSON based runtime configuration, so to select the YAML
69configuration use the '-Djson-config=disabled' option when building:
70
711. meson build -Djson-config=disabled
722. ninja -C build
73
74### JSON
75
76See each application below ([Contents](#contents)) for more information on how
77to set their specific _configure_ time options and details on how to configure
78each using JSON.
79
80As JSON based runtime configuration is the default option, no extra options are
81required to build:
82
831. meson build
842. ninja -C build
85
86**Note: Features/Restrictions of applications in this package that are only
87supported using the JSON based configuration are listed below:**
88
89#### Features
90
91- [Fan Presence Detection](#fan-presence-detection)
92 - Error logging for missing fans
93- [Fan Monitoring](#fan-monitoring)
94 - Error logging for nonfunctional fans
95 - System power off due to missing or nonfunctional fans
96- [Sensor Monitoring](#sensor-monitoring) - Only supports JSON
97
98## Contents
99
100### Fan Control
101
102Controls the fans based on a set of events that are configured using a group of
103D-Bus objects and one-or-more triggers that run a configured set of actions.
104These events are meant to be configured to handle all aspects of controlling the
105fans within a system. Fans are added to zones that then have events configured
106against the zone to control the fans based on the state of any sized group of
107D-Bus objects.
108
109- Available meson options:
110 - `control-persist-root-path` - Base location to persist zone property states
111 on the BMC
112 - Default = '/var/lib/phosphor-fan-presence/control'
113
114#### YAML (Deprecated)
115
116- Available meson options:
117 - `fan-def-yaml-file` - Build time fan configuration file
118 - Default = ['control/example/fans.yaml'](control/example/fans.yaml)
119 - `fan-zone-yaml-file` - Build time zone configuration file
120 - Default = ['control/example/zones.yaml'](control/example/zones.yaml)
121 - `fan-events-yaml-file` - Build time events configuration file
122 - Default = ['control/example/events.yaml'](control/example/events.yaml)
123 - `zone-conditions-yaml-file` Build time zone conditions configuration file
124 - Default =
125 ['control/example/zone_conditions.yaml'](control/example/zone_conditions.yaml)
126
127[Example](control/example/)
128
129#### JSON
130
131[README](docs/control/README.md)
132
133---
134
135### Fan Presence Detection
136
137Monitors the presence state of fans using GPIOs, nonzero tach feedbacks, or a
138combination of both. This updates a configured location of a fan D-Bus object's
139`Present` property according to the state of the methods used to detect the
140fan's presence.
141
142- Available meson options:
143 - `num-presence-log-entries` - Maximum number of entries in the message log
144 - Default = 50
145
146#### YAML (Deprecated)
147
148- Available meson options:
149 - `presence-config` - Location of the config file
150 - Default = ['presence/example/example.yaml'](presence/example/example.yaml)
151
152Example: [example.yaml](presence/example/example.yaml)
153
154#### JSON
155
156[README](docs/presence/README.md)
157
158---
159
160### Fan Monitoring
161
162Monitors the functional state of fans by comparing the fan feedback speed
163against the current target, applying any configured adjustments to the target
164due to fan hardware properties. In addition to updating the configured location
165of a fan D-Bus object's `Functional` property in inventory, actions can be
166configured\* to be taken based on the state of fans, i.e.) creating event logs
167or powering off the system.
168
169Another feature that can be configured is the ability to cancel the monitoring
170of a set of fans that may be necessary to workaround designs of the fan hardware
171and/or controller used.
172
173\*_Actions to be taken based on the state of fans is only available using a JSON
174based configuration_
175
176- Available meson options:
177 - `num-monitor-log-entries` - Maximum number of entries in the message log
178 - Default = 75
179
180#### YAML (Deprecated)
181
182- Available meson options:
183 - `fan-monitor-yaml-file` - Location of the config file
184 - Default = ['monitor/example/monitor.yaml'](monitor/example/monitor.yaml)
185
186Example: [monitor.yaml](monitor/example/monitor.yaml)
187
188#### JSON
189
190[README](docs/monitor/README.md)
191
192---
193
194### Cooling Type
195
196Sets the `AirCooled` and `WaterCooled` property on the
197`xyz.openbmc_project.Inventory.Decorator.CoolingType` interface in inventory
198based on a given GPIO. No configuration files are used with this application as
199it is command line driven.
200
201---
202
203### Sensor Monitoring
204
205Takes actions, such as powering off the system, based on sensor thresholds and
206values.
207
208- Available meson options:
209 - `sensor-monitor-persist-root-path` - Base location to persist sensor
210 monitoring data
211 - Default = '/var/lib/phosphor-fan-presence/sensor-monitor'
212 - `sensor-monitor-hard-shutdown-delay` - Milliseconds to delay the alarm hard
213 shutdown
214 - Default = 23000
215 - `sensor-monitor-soft-shutdown-delay` - Milliseconds to delay the alarm soft
216 shutdown
217 - Default = 900000
218 - `use-host-power-state` - Use the host state for the power state as opposed
219 to the PGOOD state.
220 - `skip-power-checking` - Skip power state checking while sending threshold
221 alarm event.
222
223[README](docs/sensor-monitor/README.md)
224
225---
226