commit | 9ea66a672c5f1a9a27f854500e4dfefd074b36fc | [log] [tgz] |
---|---|---|
author | Adriana Kobylak <anoo@us.ibm.com> | Wed Mar 24 17:54:14 2021 +0000 |
committer | Shawn McCarney <shawnmm@us.ibm.com> | Mon Apr 05 16:29:30 2021 +0000 |
tree | 99f7395908f3d540a991a7742d5be81c6a54cf36 | |
parent | 81a2f90b9c205068b0700a2bda35fb2b3d2ede00 [diff] |
psu-ng: Created map of supported PS configurations The supported configutation entity manager object provides at a minimum the supported type and model for the system. Check for "PowerSupply" type, and PSU model. Then store the rest of the properties if present such as max count and input voltage. Replace MaxCount with RedundantCount since that's the property to be used with power supplies. Use a multimap since there may be mutiple supported configurations for the same model, example, the system could support 2 PSU model 51E9 with input voltage 220, or 4 PSU of the same model 51E9 with input voltage 110. The multimap would then look like: 51E9: 2, 220 51E9: 4, 110 The monitor app can then read the PSU model that's present, and search for all the supported combinations that the system supports for that model. Tested: Verified that multiple supported configuration objects in Rainier populated the multimap as expected. Change-Id: I44283f56f9e5defb37f42c5149cec63d902efd76 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
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", }