# openbmc/phosphor-power architecture

> Architecture diagram of the GitHub repository openbmc/phosphor-power, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/openbmc/phosphor-power
- Repository: https://github.com/openbmc/phosphor-power

## Overview

phosphor-power is a suite of OpenBMC applications for configuring and monitoring power hardware. Its principal workflow is to identify the system, load device configuration, monitor hardware state, and expose status or faults; individual applications cover chassis power, sequencing, supplies, and regulator configuration. The repository also includes legacy monitors and operator utilities. Internal connections are shown only where the README or supplied source index/excerpts support them; many runtime details are unsampled.

Main entry points: [`phosphor-regulators/src/manager.cpp`](https://github.com/openbmc/phosphor-power/blob/master/phosphor-regulators/src/manager.cpp) (Regulator Manager), [`phosphor-chassis-power/src/manager.cpp`](https://github.com/openbmc/phosphor-power/blob/master/phosphor-chassis-power/src/manager.cpp) (Chassis Manager), [`phosphor-power-sequencer/src/manager.cpp`](https://github.com/openbmc/phosphor-power/blob/master/phosphor-power-sequencer/src/manager.cpp) (Sequencer Manager), [`phosphor-chassis-power/src/main.cpp`](https://github.com/openbmc/phosphor-power/blob/master/phosphor-chassis-power/src/main.cpp) (Chassis Power App)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_chassis["Chassis Power"]
  node_chassis_app["Chassis Power App<br/>[main.cpp]"]
  node_chassis_manager["Chassis Manager<br/>[manager.cpp]"]
  node_chassis_config["Chassis Config Parser"]
  node_chassis_system["Chassis System<br/>[system.cpp]"]
  node_chassis_hardware["Chassis and GPIO<br/>[chassis.cpp]"]
  node_chassis_services["Chassis Services<br/>[services.cpp]"]
end

subgraph group_sequencing["Power Sequencing"]
  node_sequencer_app["Sequencer App<br/>[main.cpp]"]
  node_sequencer_manager["Sequencer Manager<br/>[manager.cpp]"]
  node_sequencer_config["Sequencer Config Parser"]
  node_sequencer_system["Sequencer System<br/>[system.cpp]"]
  node_sequencer_device["Sequencer Devices"]
end

subgraph group_supplies["Supply Monitoring"]
  node_power_supply_app["Supply Monitor App<br/>[main.cpp]"]
  node_psu_manager["PSU Manager<br/>[psu_manager.cpp]"]
  node_psu_devices["Supply Device Models<br/>[power_supply.cpp]"]
  node_chassis_supply["Chassis Supply Manager"]
end

subgraph group_regulators["Voltage Regulators"]
  node_regulator_app["Regulator App<br/>[main.cpp]"]
  node_regulator_manager["Regulator Manager<br/>[manager.cpp]"]
  node_regulator_config["Regulator Config Parser"]
  node_regulator_chassis["Regulator Chassis<br/>[chassis.cpp]"]
  node_regulator_actions["Regulator Actions"]
  node_regulator_sensors["Regulator Sensors"]
  node_regulator_faults["Fault Detection"]
end

subgraph group_shared["Shared and Utilities"]
  node_shared_monitor["Chassis Status Monitor"]
  node_shared_system_types["Compatible System Finder"]
  node_shared_power_utils["Power Utilities<br/>[utility.hpp]"]
  node_legacy_sequencer["Legacy Sequencer<br/>[main.cpp]"]
  node_legacy_supply["Legacy Supply Monitor<br/>[main.cpp]"]
  node_chassis_tool["Chassis Status Tool<br/>[pldm-fetcher.cpp]"]
  node_power_utils["PSU Utilities<br/>[main.cpp]"]
end

node_operator(("Operator"))

node_operator -->|"runs"| node_chassis_app
node_operator -->|"runs"| node_sequencer_app
node_operator -->|"runs"| node_power_supply_app
node_operator -->|"runs"| node_regulator_app
node_operator -->|"uses"| node_chassis_tool
node_operator -->|"uses"| node_power_utils
node_chassis_app -->|"starts"| node_chassis_manager
node_chassis_manager -->|"loads config"| node_chassis_config
node_chassis_manager -->|"creates"| node_chassis_system
node_chassis_manager -->|"finds system type"| node_shared_system_types
node_chassis_manager -->|"uses services"| node_chassis_services
node_chassis_services -->|"provides monitor"| node_shared_monitor
node_sequencer_app -->|"starts"| node_sequencer_manager
node_sequencer_manager -->|"loads config"| node_sequencer_config
node_sequencer_manager -->|"manages system"| node_sequencer_system
node_sequencer_manager -->|"finds system type"| node_shared_system_types
node_sequencer_system -.->|"uses devices"| node_sequencer_device
node_power_supply_app -.->|"starts"| node_psu_manager
node_psu_manager -->|"manages supplies"| node_psu_devices
node_chassis_supply -->|"uses supplies"| node_psu_devices
node_regulator_app -->|"starts"| node_regulator_manager
node_regulator_manager -->|"parses config"| node_regulator_config
node_regulator_manager -->|"creates chassis"| node_regulator_chassis
node_regulator_manager -.->|"executes rules"| node_regulator_actions
node_regulator_manager -->|"monitors sensors"| node_regulator_sensors
node_regulator_manager -.->|"runs detection"| node_regulator_faults
node_legacy_sequencer -->|"monitors power"| node_operator
node_legacy_supply -->|"monitors supplies"| node_operator

click node_chassis_app "https://github.com/openbmc/phosphor-power/blob/master/phosphor-chassis-power/src/main.cpp"
click node_chassis_manager "https://github.com/openbmc/phosphor-power/blob/master/phosphor-chassis-power/src/manager.cpp"
click node_chassis_config "https://github.com/openbmc/phosphor-power/blob/master/phosphor-chassis-power/src/config_file_parser.cpp"
click node_chassis_system "https://github.com/openbmc/phosphor-power/blob/master/phosphor-chassis-power/src/system.cpp"
click node_chassis_hardware "https://github.com/openbmc/phosphor-power/blob/master/phosphor-chassis-power/src/chassis.cpp"
click node_chassis_services "https://github.com/openbmc/phosphor-power/blob/master/phosphor-chassis-power/src/services.cpp"
click node_sequencer_app "https://github.com/openbmc/phosphor-power/blob/master/phosphor-power-sequencer/src/main.cpp"
click node_sequencer_manager "https://github.com/openbmc/phosphor-power/blob/master/phosphor-power-sequencer/src/manager.cpp"
click node_sequencer_config "https://github.com/openbmc/phosphor-power/blob/master/phosphor-power-sequencer/src/config_file_parser.cpp"
click node_sequencer_system "https://github.com/openbmc/phosphor-power/blob/master/phosphor-power-sequencer/src/system.cpp"
click node_sequencer_device "https://github.com/openbmc/phosphor-power/blob/master/phosphor-power-sequencer/src/standard_device.cpp"
click node_power_supply_app "https://github.com/openbmc/phosphor-power/blob/master/phosphor-power-supply/main.cpp"
click node_psu_manager "https://github.com/openbmc/phosphor-power/blob/master/phosphor-power-supply/psu_manager.cpp"
click node_psu_devices "https://github.com/openbmc/phosphor-power/blob/master/phosphor-power-supply/power_supply.cpp"
click node_chassis_supply "https://github.com/openbmc/phosphor-power/blob/master/phosphor-power-supply/chassis_manager.cpp"
click node_regulator_app "https://github.com/openbmc/phosphor-power/blob/master/phosphor-regulators/src/main.cpp"
click node_regulator_manager "https://github.com/openbmc/phosphor-power/blob/master/phosphor-regulators/src/manager.cpp"
click node_regulator_config "https://github.com/openbmc/phosphor-power/blob/master/phosphor-regulators/src/config_file_parser.cpp"
click node_regulator_chassis "https://github.com/openbmc/phosphor-power/blob/master/phosphor-regulators/src/chassis.cpp"
click node_regulator_actions "https://github.com/openbmc/phosphor-power/tree/master/phosphor-regulators/src/actions"
click node_regulator_sensors "https://github.com/openbmc/phosphor-power/blob/master/phosphor-regulators/src/sensor_monitoring.cpp"
click node_regulator_faults "https://github.com/openbmc/phosphor-power/blob/master/phosphor-regulators/src/phase_fault_detection.cpp"
click node_shared_monitor "https://github.com/openbmc/phosphor-power/blob/master/chassis_status_monitor.hpp"
click node_shared_system_types "https://github.com/openbmc/phosphor-power/blob/master/compatible_system_types_finder.hpp"
click node_shared_power_utils "https://github.com/openbmc/phosphor-power/blob/master/utility.hpp"
click node_legacy_sequencer "https://github.com/openbmc/phosphor-power/blob/master/power-sequencer/main.cpp"
click node_legacy_supply "https://github.com/openbmc/phosphor-power/blob/master/power-supply/main.cpp"
click node_chassis_tool "https://github.com/openbmc/phosphor-power/blob/master/tools/chassis-status-tool/pldm-fetcher.cpp"
click node_power_utils "https://github.com/openbmc/phosphor-power/blob/master/tools/power-utils/main.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_chassis_app,node_chassis_manager,node_chassis_config,node_chassis_system,node_chassis_hardware,node_chassis_services toneBlue
class node_sequencer_app,node_sequencer_manager,node_sequencer_config,node_sequencer_system,node_sequencer_device toneAmber
class node_power_supply_app,node_psu_manager,node_psu_devices,node_chassis_supply toneMint
class node_regulator_app,node_regulator_manager,node_regulator_config,node_regulator_chassis,node_regulator_actions,node_regulator_sensors,node_regulator_faults toneRose
class node_shared_monitor,node_shared_system_types,node_shared_power_utils,node_legacy_sequencer,node_legacy_supply,node_chassis_tool,node_power_utils,node_operator toneIndigo
```

## Components

### Chassis Power

- [Chassis Power App](https://github.com/openbmc/phosphor-power/blob/master/phosphor-chassis-power/src/main.cpp): `phosphor-chassis-power/src/main.cpp`
- [Chassis Manager](https://github.com/openbmc/phosphor-power/blob/master/phosphor-chassis-power/src/manager.cpp): `phosphor-chassis-power/src/manager.cpp`
- [Chassis Config Parser](https://github.com/openbmc/phosphor-power/blob/master/phosphor-chassis-power/src/config_file_parser.cpp): `phosphor-chassis-power/src/config_file_parser.cpp`
- [Chassis System](https://github.com/openbmc/phosphor-power/blob/master/phosphor-chassis-power/src/system.cpp): `phosphor-chassis-power/src/system.cpp`
- [Chassis and GPIO](https://github.com/openbmc/phosphor-power/blob/master/phosphor-chassis-power/src/chassis.cpp): `phosphor-chassis-power/src/chassis.cpp`
- [Chassis Services](https://github.com/openbmc/phosphor-power/blob/master/phosphor-chassis-power/src/services.cpp): `phosphor-chassis-power/src/services.cpp`

### Power Sequencing

- [Sequencer App](https://github.com/openbmc/phosphor-power/blob/master/phosphor-power-sequencer/src/main.cpp): `phosphor-power-sequencer/src/main.cpp`
- [Sequencer Manager](https://github.com/openbmc/phosphor-power/blob/master/phosphor-power-sequencer/src/manager.cpp): `phosphor-power-sequencer/src/manager.cpp`
- [Sequencer Config Parser](https://github.com/openbmc/phosphor-power/blob/master/phosphor-power-sequencer/src/config_file_parser.cpp): `phosphor-power-sequencer/src/config_file_parser.cpp`
- [Sequencer System](https://github.com/openbmc/phosphor-power/blob/master/phosphor-power-sequencer/src/system.cpp): `phosphor-power-sequencer/src/system.cpp`
- [Sequencer Devices](https://github.com/openbmc/phosphor-power/blob/master/phosphor-power-sequencer/src/standard_device.cpp): `phosphor-power-sequencer/src/standard_device.cpp`

### Supply Monitoring

- [Supply Monitor App](https://github.com/openbmc/phosphor-power/blob/master/phosphor-power-supply/main.cpp): `phosphor-power-supply/main.cpp`
- [PSU Manager](https://github.com/openbmc/phosphor-power/blob/master/phosphor-power-supply/psu_manager.cpp): `phosphor-power-supply/psu_manager.cpp`
- [Supply Device Models](https://github.com/openbmc/phosphor-power/blob/master/phosphor-power-supply/power_supply.cpp): `phosphor-power-supply/power_supply.cpp`
- [Chassis Supply Manager](https://github.com/openbmc/phosphor-power/blob/master/phosphor-power-supply/chassis_manager.cpp): `phosphor-power-supply/chassis_manager.cpp`

### Voltage Regulators

- [Regulator App](https://github.com/openbmc/phosphor-power/blob/master/phosphor-regulators/src/main.cpp): `phosphor-regulators/src/main.cpp`
- [Regulator Manager](https://github.com/openbmc/phosphor-power/blob/master/phosphor-regulators/src/manager.cpp): `phosphor-regulators/src/manager.cpp`
- [Regulator Config Parser](https://github.com/openbmc/phosphor-power/blob/master/phosphor-regulators/src/config_file_parser.cpp): `phosphor-regulators/src/config_file_parser.cpp`
- [Regulator Chassis](https://github.com/openbmc/phosphor-power/blob/master/phosphor-regulators/src/chassis.cpp): `phosphor-regulators/src/chassis.cpp`
- [Regulator Actions](https://github.com/openbmc/phosphor-power/tree/master/phosphor-regulators/src/actions): `phosphor-regulators/src/actions`
- [Regulator Sensors](https://github.com/openbmc/phosphor-power/blob/master/phosphor-regulators/src/sensor_monitoring.cpp): `phosphor-regulators/src/sensor_monitoring.cpp`
- [Fault Detection](https://github.com/openbmc/phosphor-power/blob/master/phosphor-regulators/src/phase_fault_detection.cpp): `phosphor-regulators/src/phase_fault_detection.cpp`

### Shared and Utilities

- [Chassis Status Monitor](https://github.com/openbmc/phosphor-power/blob/master/chassis_status_monitor.hpp): `chassis_status_monitor.hpp`
- [Compatible System Finder](https://github.com/openbmc/phosphor-power/blob/master/compatible_system_types_finder.hpp): `compatible_system_types_finder.hpp`
- [Power Utilities](https://github.com/openbmc/phosphor-power/blob/master/utility.hpp): `utility.hpp`
- [Legacy Sequencer](https://github.com/openbmc/phosphor-power/blob/master/power-sequencer/main.cpp): `power-sequencer/main.cpp`
- [Legacy Supply Monitor](https://github.com/openbmc/phosphor-power/blob/master/power-supply/main.cpp): `power-supply/main.cpp`
- [Chassis Status Tool](https://github.com/openbmc/phosphor-power/blob/master/tools/chassis-status-tool/pldm-fetcher.cpp): `tools/chassis-status-tool/pldm-fetcher.cpp`
- [PSU Utilities](https://github.com/openbmc/phosphor-power/blob/master/tools/power-utils/main.cpp): `tools/power-utils/main.cpp`

### Other components

- **Operator**

## Connections

- Operator → Chassis Power App: runs (evidence: `README.md`)
- Operator → Sequencer App: runs (evidence: `README.md`)
- Operator → Supply Monitor App: runs (evidence: `README.md`)
- Operator → Regulator App: runs (evidence: `README.md`)
- Operator → Chassis Status Tool: uses (evidence: `README.md`)
- Operator → PSU Utilities: uses (evidence: `README.md`)
- Chassis Power App → Chassis Manager: starts (evidence: `phosphor-chassis-power/src/main.cpp`)
- Chassis Manager → Chassis Config Parser: loads config (evidence: `phosphor-chassis-power/src/manager.cpp`)
- Chassis Manager → Chassis System: creates
- Chassis Manager → Compatible System Finder: finds system type
- Chassis Manager → Chassis Services: uses services
- Chassis Services → Chassis Status Monitor: provides monitor
- Sequencer App → Sequencer Manager: starts (evidence: `phosphor-power-sequencer/src/main.cpp`)
- Sequencer Manager → Sequencer Config Parser: loads config (evidence: `phosphor-power-sequencer/src/manager.cpp`)
- Sequencer Manager → Sequencer System: manages system
- Sequencer Manager → Compatible System Finder: finds system type
- Sequencer System → Sequencer Devices: uses devices
- Supply Monitor App → PSU Manager: starts
- PSU Manager → Supply Device Models: manages supplies
- Chassis Supply Manager → Supply Device Models: uses supplies
- Regulator App → Regulator Manager: starts (evidence: `phosphor-regulators/src/main.cpp`)
- Regulator Manager → Regulator Config Parser: parses config (evidence: `phosphor-regulators/src/manager.cpp`)
- Regulator Manager → Regulator Chassis: creates chassis (evidence: `phosphor-regulators/src/manager.cpp`)
- Regulator Manager → Regulator Actions: executes rules
- Regulator Manager → Regulator Sensors: monitors sensors (evidence: `phosphor-regulators/src/manager.cpp`)
- Regulator Manager → Fault Detection: runs detection
- Legacy Sequencer → Operator: monitors power (evidence: `README.md`)
- Legacy Supply Monitor → Operator: monitors supplies (evidence: `README.md`)
