commit | 9252b7e3f0c80e20d648d95b0fd22f8e6ae80322 | [log] [tgz] |
---|---|---|
author | Shawn McCarney <shawnmm@us.ibm.com> | Fri Jun 10 12:47:38 2022 -0500 |
committer | Shawn McCarney <shawnmm@us.ibm.com> | Tue Jun 14 00:04:04 2022 -0500 |
tree | 158c1861839987aa2774464f159217adb7110a28 | |
parent | 64e9775d13e265380d7eb55d4ea96d4feb7168cb [diff] |
psu-ng: Only log missing errors for required PSUs If a power supply unit (PSU) is missing, only log an error if it is required by the current SupportedConfiguration. EntityManager provides one or more D-Bus objects that implement the SupportedConfiguration interface. This interface specifies a PSU model, input voltage, and required number of PSUs. EntityManager also provides one or more D-Bus objects that represent possible PSU devices that could exist in the system. If the number of required PSUs is less than the number of possible PSUs, it is not an error for the extra PSUs to be missing. Add logic to the power supply monitoring application to determine if a missing PSU is required before logging an error. Tested: * Test plan documented at https://gist.github.com/smccarney/ba99ac808503b477aa056e7f4afe2ae1 Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I2e8d147ad88461077da497b26fcc309966e04b45
This repository contains applications for configuring and monitoring devices that deliver power to the system.
To build all applications in this repository:
meson build ninja -C build
To clean the repository and remove all build output:
rm -rf build
You can specify meson options to customize the build process. For example, you can specify:
Several applications in this repository require a PSU JSON config to run. The JSON config file provides information for:
There is an example psu.json to describe the necessary configurations.
inventoryPMBusAccessType
defines the pmbus access type, which tells the service which sysfs type to use to read the attributes. The possible values are:/sys/bus/i2c/devices/3-0069/
/sys/bus/i2c/devices/3-0069/hwmon/hwmonX/
/sys/kernel/debug/pmbus/hwmonX/
/sys/kernel/debug/pmbus/hwmonX/cffps1/
fruConfigs
defines the mapping between the attribute file and the FRU inventory interface and property. The configuration example below indicates that the service will read part_number
attribute file from a directory specified by the above pmbus access type, and assign to PartNumber
property in xyz.openbmc_project.Inventory.Decorator.Asset
interface."fruConfigs": [ { "propertyName": "PartNumber", "fileName": "part_number", "interface": "xyz.openbmc_project.Inventory.Decorator.Asset" } ]
psuDevices
defines the kernel device dir for each PSU in inventory. The configuration example below indicates that powersupply0
's device is located in /sys/bus/i2c/devices/3-0069
."psuDevices": { "/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0" : "/sys/bus/i2c/devices/3-0069", }