commit | 3f23da94c959b1e46aae8931d59863211bcd3ee1 | [log] [tgz] |
---|---|---|
author | Konstantin Aladyshev <aladyshev22@gmail.com> | Wed Apr 19 08:58:42 2023 +0000 |
committer | Konstantin Aladyshev <aladyshev22@gmail.com> | Mon May 15 14:09:44 2023 +0000 |
tree | 7bc22ba5f50981beaf0d0b421006b8c14c00e805 | |
parent | 69f7fa321895573be8286348dce28da6ddcd10c5 [diff] |
Change IpmiSelAdd/IpmiSelAddOem return type to void Currently IpmiSelAdd/IpmiSelAddOem functions return SEL recordID. Since the recordID is not returned from the 'xyz.openbmc_project.Logging.Create' call directly it makes it very hard to perform log entry creation without a wrapper function 'report' from the phosphor-logging repo. The problem is that function always returns a static message for the SEL entry, and there is no option for customization based on the incoming arguments since it is based on YAML. Change the IpmiSelAdd/IpmiSelAddOem functions return type to void to make futher SEL message customizations possible. This is an API change, but from the OpenBMC codebase investigation it looks like nobody is using the returned recordID value anyway. Change-Id: I31290cb9affe8130b169b6c5249148789637f0a9 Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
The SEL Logger daemon handles all requests to add new IPMI SEL records to the journal. SEL records stored in the journal are identified by the standard MESSAGE_ID metadata. Other metadata fields are used to store event-specific information for each record.
SEL records are identified in the journal using the MESSAGE_ID field.
The MESSAGE_ID for SEL records is "b370836ccf2f4850ac5bee185b77893a".
The additional metadata fields for a SEL record are
IPMI_SEL_RECORD_ID = Two byte unique SEL Record ID IPMI_SEL_RECORD_TYPE = The type of SEL entry (system or OEM) which determines the definition of the remaining bytes IPMI_SEL_GENERATOR_ID = The IPMI Generator ID (usually the IPMB Slave Address) of the requester IPMI_SEL_SENSOR_PATH = D-Bus path of the sensor in the event IPMI_SEL_EVENT_DIR = Direction of the event (assert or deassert) IPMI_SEL_DATA = Raw binary data included in the SEL record
The SEL Logger daemon exposes an interface for manually adding System and OEM type SEL events, and provides the capability to monitor for types of events and log them automatically.
The interface for System type events requires
The interface for OEM type events requires
The MESSAGE_ID and IPMI_SEL_RECORD_ID metadata fields are added by the daemon.
The SEL Logger daemon can be configured to watch for specific types of events and automatically log SEL records for them.
As an example, the SEL Logger has a "threshold event monitor" which implements a D-Bus match for any "PropertiesChanged" event on the xyz.openbmc_project.Sensor.Threshold
interface. The handler then checks for any new threshold events and logs SEL records accordingly.