commit | a528a28156a129486a917ac6d9849223ecef15c8 | [log] [tgz] |
---|---|---|
author | Shawn McCarney <shawnmm@us.ibm.com> | Mon Feb 15 18:07:07 2021 -0600 |
committer | Shawn McCarney <shawnmm@us.ibm.com> | Fri Feb 19 15:56:21 2021 +0000 |
tree | 8863c5c0a328637f2b3bdc4432d92d57d466c578 | |
parent | 10d9405574bc9ae4b7253e145e999202c47f6b99 [diff] |
regulators: Enhance SystemdJournal::getMessages() Enhance the SystemdJournal::getMessages() method that obtains systemd journal entries with a specified field value: * Handle journal entries that do not have expected fields. All journal fields are optional, so if a field is missing this is not an error condition. * Use built-in filtering support provided by the systemd journal API. This will likely provide better performance. * Use C++ std::string methods to perform field data parsing. * Add short sleep before acquiring journal messages. Otherwise recently added messages are sometimes not available. Tested: * Tested where journal entry is missing expected fields. * Tested that built-in filtering support results in the desired set of journal entries. * Tested field data parsing. Tested where value has expected format and when it does not. * Verified all journal entries, including the most recently added ones, are obtained. * Tested error handling when each sd_journal_*() function fails. * For complete test plan, see https://gist.github.com/smccarney/bd4e546a76ee05e4df939eb69e23daee Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com> Change-Id: I066492edc05691b240d768c5b99cfa6f07d83ddf
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", }