commit | d9c8be577d0479b12a7eb5ffe624b5f22605e4e0 | [log] [tgz] |
---|---|---|
author | Shawn McCarney <shawnmm@us.ibm.com> | Tue May 18 10:07:53 2021 -0500 |
committer | Shawn McCarney <shawnmm@us.ibm.com> | Fri May 21 01:59:02 2021 -0500 |
tree | 6d91a179d0a8ce22a7c4cce28172ec7cefba4826 | |
parent | ce540f3c9fb61f9711726cbbe86f42f55e768d42 [diff] |
regulators: Enable sensor monitoring Enable sensor monitoring in the phosphor-regulators application. Previous commits implemented the majority of the sensor monitoring support. This commit contains the last set of changes needed to enable monitoring for the entire application. Modify the top level Manager class to enable or disable monitoring based on the D-Bus 'monitor' method. This method is called by the regsctl command line tool. Service files use regsctl to enable monitoring during power on and disable monitoring during power off. When monitoring is enabled, set a repeating, one-second timer. When the timer expires, execute one sensor monitoring cycle for all voltage regulator sensors. When monitoring is disabled, turn off the timer. Put all the sensors in an inactive state, indicating they are no longer being updated. They will remain in this state until the system is powered on again. Tested: * Verified sensor monitoring is enabled when chassis is powered on. * Verified sensor monitoring is disabled when chassis is powered off. * Verified voltage regulator sensors are read once per second while monitoring is enabled. * Verified sensors are published on D-Bus when monitoring is enabled. * Verified sensors remain on D-Bus but are put in an inactive state when monitoring is disabled. * Verified sensors are not read when monitoring is disabled. * Tested where D-Bus queries to obtain current power state fail with a D-Bus exception. * Verified sensor monitoring is enabled if BMC is reset while chassis is powered on. * Verified sensor monitoring is enabled if regulators application is stopped and re-started while chassis is powered on. * For complete test plan, see https://gist.github.com/smccarney/0afa4a50afcf9f0d47e1a21ebe33dbfc Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: Ic85d4baa0a53e57bd2a494611d70a76ae7b135f7
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", }