commit | 14572cf45978ef61b0fe2627b0d4e1173893e612 | [log] [tgz] |
---|---|---|
author | Shawn McCarney <shawnmm@us.ibm.com> | Wed Nov 06 12:17:57 2024 -0600 |
committer | Shawn McCarney <shawnmm@us.ibm.com> | Mon Nov 11 11:09:49 2024 -0600 |
tree | a857f02dce6302c4f43c5fc6906483d25837322d | |
parent | ec61bbd7e8e689c8df9af4dd89c988d335a379a8 [diff] |
psutils: Move utility functions to utils.*pp The files named version.hpp and version.cpp implement the --get-version option of the psutils tool. However, the files also contain some utility functions that would be helpful for implementing other command line options, such as --update or the planned new option --get-model. Move the utility functions into new files named utils.hpp and utils.cpp. The functions will be defined within a namespace named 'utils'. Tested: * Verified automated testcases ran successfully * Verified --get-version option worked correctly * When using a psu.json file * When using D-Bus information Change-Id: If902ee4581fce000af37073ac2e7a7b0ade01f78 Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
This repository contains applications for configuring and monitoring devices that deliver power to the system.
Actively-maintained applications:
Legacy applications:
To build all applications in this repository:
meson setup 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/<driver>.<instance>/
/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", }