commit | 3c20846483a0c2cfdb53d562efe4b9d639b1556b | [log] [tgz] |
---|---|---|
author | Brandon Wyman <bjwyman@gmail.com> | Wed May 13 16:25:58 2020 -0500 |
committer | Shawn McCarney <shawnmm@us.ibm.com> | Mon May 18 22:14:32 2020 +0000 |
tree | 5d14fe03f9301308a16aa4e5fa513cd08b77e813 | |
parent | 84614882e7b15f97c6de899506f3be827c67748f [diff] |
psu-ng: Updates for clearFaults It was discovered that the power supplies may not always have the in1_crit "file" available in the HWMON directory. This file may be missing if certain commands are not supported. It was also discovered that it can be missing if the power supply falsely indicates it supports PEC, but actually does not. Changing the readString call to read from the in1_input file, which typically should be present (READ_VIN). Move the clearFaults function from the hpp file to the cpp file, as: 1. It is getting a bit lengthy. 2. Adding a try/catch for ReadFailure to avoid crashing the application if there is a ReadFailure, which is in the phosphor::logging namespace already used in the cpp file. Update the test case to expect a read from in1_input, and return a value that more closely resembles an actual READ_VIN value. Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: I9747317c68040cdce6bb80922e3928be55376c44
Code for detecting and analyzing power faults on Witherspoon.
To build this package, do the following steps: 1. meson build 2. ninja -C build To clean the repository again run `rm -rf build`.
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", }