{"id":18368640,"url":"https://github.com/openbmc/phosphor-fan-presence","last_synced_at":"2025-04-06T17:31:48.169Z","repository":{"id":40783001,"uuid":"79339769","full_name":"openbmc/phosphor-fan-presence","owner":"openbmc","description":"Provides presence detection, monitoring, and control of physical fans.","archived":false,"fork":false,"pushed_at":"2025-04-03T20:46:30.000Z","size":7051,"stargazers_count":9,"open_issues_count":8,"forks_count":12,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-03T21:31:45.712Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openbmc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-18T12:52:56.000Z","updated_at":"2025-04-03T20:46:34.000Z","dependencies_parsed_at":"2023-02-16T03:30:50.879Z","dependency_job_id":"bdb39b77-0d3c-48eb-881b-82cc213b1753","html_url":"https://github.com/openbmc/phosphor-fan-presence","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openbmc%2Fphosphor-fan-presence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openbmc%2Fphosphor-fan-presence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openbmc%2Fphosphor-fan-presence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openbmc%2Fphosphor-fan-presence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openbmc","download_url":"https://codeload.github.com/openbmc/phosphor-fan-presence/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247522390,"owners_count":20952540,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T23:26:50.768Z","updated_at":"2025-04-06T17:31:46.621Z","avatar_url":"https://github.com/openbmc.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Repository Details\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Building](#building)\n- [Contents](#contents)\n\n## Overview\n\nThe phosphor-fan-presence repository provides a set of thermal related\napplications that control and monitor the cooling of a system using fans. Each\napplication independently controls or monitors an area related to the thermal\nstatus of a system that uses fans as its primary cooling mechanism. Since each\napplication independent in its functionality, they can individually be included\nin a BMC image at _configure_ time to provide only the functionality needed by a\nuser's machine.\n\n## Building\n\nBy default, runtime JSON configuration file(s) are used for each application.\nThe use of YAML configuration file(s) has been deprecated in favor of the JSON\nmethod. Support for the use of YAML based configuration files may be removed\nonce all applications completely support getting their configuration from JSON\nfile(s) at runtime.\n\nThe following applications are built by default:\n\n- [Fan Control](#fan-control)\n\n  - To disable from building, use the `-Dcontrol-service=disabled` meson option:\n\n    meson build -Dcontrol-service=disabled\n\n- [Fan Presence Detection](#fan-presence-detection)\n\n  - To disable from building, use the `-Dpresence-service=disabled` meson\n    option:\n\n    meson build -Dpresence-service=disabled\n\n- [Fan Monitoring](#fan-monitoring)\n\n  - To disable from building, use the `-Dmonitor-service=disabled` meson option:\n\n    meson build -Dmonitor-service=disabled\n\n- [Sensor Monitoring](#sensor-monitoring)\n\n  - To disable from building, use the `-Dsensor-monitor-service=disabled` meson\n    option:\n\n    meson build -Dsensor-monitor-service=disabled\n\nThe following applications must be enabled at _configure_ time to be built:\n\n- [Cooling Type](#cooling-type)\n\n  - To enable building this, set the `-Dcooling-type-service=enable` meson\n    option:\n\n    meson build -Dcooling-type-service=enabled\n\n### YAML (Deprecated)\n\nThe location of the YAML configuration file(s) are provided at _configure_ time\nto each application thru environment variables. The default YAML configuration\nfile(s) used are the examples found within each application's example directory.\nSee each application below ([Contents](#contents)) for more information on how\nto set their specific _configure_ time options, including the location of the\nYAML configuration file(s).\n\nMeson defaults to JSON based runtime configuration, so to select the YAML\nconfiguration use the '-Djson-config=disabled' option when building:\n\n1. meson build -Djson-config=disabled\n2. ninja -C build\n\n### JSON\n\nSee each application below ([Contents](#contents)) for more information on how\nto set their specific _configure_ time options and details on how to configure\neach using JSON.\n\nAs JSON based runtime configuration is the default option, no extra options are\nrequired to build:\n\n1. meson build\n2. ninja -C build\n\n**Note: Features/Restrictions of applications in this package that are only\nsupported using the JSON based configuration are listed below:**\n\n#### Features\n\n- [Fan Presence Detection](#fan-presence-detection)\n  - Error logging for missing fans\n- [Fan Monitoring](#fan-monitoring)\n  - Error logging for nonfunctional fans\n  - System power off due to missing or nonfunctional fans\n- [Sensor Monitoring](#sensor-monitoring) - Only supports JSON\n\n## Contents\n\n### Fan Control\n\nControls the fans based on a set of events that are configured using a group of\nD-Bus objects and one-or-more triggers that run a configured set of actions.\nThese events are meant to be configured to handle all aspects of controlling the\nfans within a system. Fans are added to zones that then have events configured\nagainst the zone to control the fans based on the state of any sized group of\nD-Bus objects.\n\n- Available meson options:\n  - `control-persist-root-path` - Base location to persist zone property states\n    on the BMC\n    - Default = '/var/lib/phosphor-fan-presence/control'\n\n#### YAML (Deprecated)\n\n- Available meson options:\n  - `fan-def-yaml-file` - Build time fan configuration file\n    - Default = ['control/example/fans.yaml'](control/example/fans.yaml)\n  - `fan-zone-yaml-file` - Build time zone configuration file\n    - Default = ['control/example/zones.yaml'](control/example/zones.yaml)\n  - `fan-events-yaml-file` - Build time events configuration file\n    - Default = ['control/example/events.yaml'](control/example/events.yaml)\n  - `zone-conditions-yaml-file` Build time zone conditions configuration file\n    - Default =\n      ['control/example/zone_conditions.yaml'](control/example/zone_conditions.yaml)\n\n[Example](control/example/)\n\n#### JSON\n\n[README](docs/control/README.md)\n\n---\n\n### Fan Presence Detection\n\nMonitors the presence state of fans using GPIOs, nonzero tach feedbacks, or a\ncombination of both. This updates a configured location of a fan D-Bus object's\n`Present` property according to the state of the methods used to detect the\nfan's presence.\n\n- Available meson options:\n  - `num-presence-log-entries` - Maximum number of entries in the message log\n    - Default = 50\n\n#### YAML (Deprecated)\n\n- Available meson options:\n  - `presence-config` - Location of the config file\n    - Default = ['presence/example/example.yaml'](presence/example/example.yaml)\n\nExample: [example.yaml](presence/example/example.yaml)\n\n#### JSON\n\n[README](docs/presence/README.md)\n\n---\n\n### Fan Monitoring\n\nMonitors the functional state of fans by comparing the fan feedback speed\nagainst the current target, applying any configured adjustments to the target\ndue to fan hardware properties. In addition to updating the configured location\nof a fan D-Bus object's `Functional` property in inventory, actions can be\nconfigured\\* to be taken based on the state of fans, i.e.) creating event logs\nor powering off the system.\n\nAnother feature that can be configured is the ability to cancel the monitoring\nof a set of fans that may be necessary to workaround designs of the fan hardware\nand/or controller used.\n\n\\*_Actions to be taken based on the state of fans is only available using a JSON\nbased configuration_\n\n- Available meson options:\n  - `num-monitor-log-entries` - Maximum number of entries in the message log\n    - Default = 75\n\n#### YAML (Deprecated)\n\n- Available meson options:\n  - `fan-monitor-yaml-file` - Location of the config file\n    - Default = ['monitor/example/monitor.yaml'](monitor/example/monitor.yaml)\n\nExample: [monitor.yaml](monitor/example/monitor.yaml)\n\n#### JSON\n\n[README](docs/monitor/README.md)\n\n---\n\n### Cooling Type\n\nSets the `AirCooled` and `WaterCooled` property on the\n`xyz.openbmc_project.Inventory.Decorator.CoolingType` interface in inventory\nbased on a given GPIO. No configuration files are used with this application as\nit is command line driven.\n\n---\n\n### Sensor Monitoring\n\nTakes actions, such as powering off the system, based on sensor thresholds and\nvalues.\n\n- Available meson options:\n  - `sensor-monitor-persist-root-path` - Base location to persist sensor\n    monitoring data\n    - Default = '/var/lib/phosphor-fan-presence/sensor-monitor'\n  - `sensor-monitor-hard-shutdown-delay` - Milliseconds to delay the alarm hard\n    shutdown\n    - Default = 23000\n  - `sensor-monitor-soft-shutdown-delay` - Milliseconds to delay the alarm soft\n    shutdown\n    - Default = 900000\n  - `use-host-power-state` - Use the host state for the power state as opposed\n    to the PGOOD state.\n  - `skip-power-checking` - Skip power state checking while sending threshold\n    alarm event.\n\n[README](docs/sensor-monitor/README.md)\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenbmc%2Fphosphor-fan-presence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenbmc%2Fphosphor-fan-presence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenbmc%2Fphosphor-fan-presence/lists"}