Adding support for custom SEL records

Lei Yu at
Wed Oct 19 13:05:52 AEDT 2022

On Wed, Oct 19, 2022 at 4:09 AM Brad Bishop <bradleyb at> wrote:
> Thanks Lei YU for adding the support desribed below.  Sorry for the
> necropost but I had a couple questions (below) for anyone that feels
> like indulging me with answers.
> On Mon, 2020-12-07 at 15:35 +0800, Lei Yu wrote:
> > This mail is to propose some changes in openbmc to support custom SEL
> > records.
> >
> > * Background
> > The phosphor-sel-logger is the service to provide methods (IpmiSelAdd,
> > IpmiSelAddOem) to add custom SEL records.
> > However:
> > 1. It only sends the log into the journal;
> > 2. It depends on
> > meta-intel/meta-common/recipes-extended/rsyslog/rsyslog/rsyslog.conf
> > to filter the journal log and write to "/var/log/ipmi_sel"
> > 3. It depends on intel-ipmi-oem to parse the "/var/log/ipmi_sel" to
> > provide the SEL entries.
> >
> > In short, phosphor-sel-logger only works with the meta-intel layer and
> > intel-ipmi-oem.
> >
> > To make it support general usage, several changes are submitted to
> > gerrit:
> >
> To make it support general usage, I think we could have just moved the
> rsyslog.conf to meta-phosphor and moved the handlers from intel-ipmi-oem
> to phosphor-host-ipmid, correct?  Instead, we invented something
> completely new.  My question is, why?

There are several reasons:
1. The rsyslog way is undocumented and the handler is not in upstream OpenBMC.
2. The rsyslog way puts the SEL in a file and thus there are no DBus
objects, which makes it harder to work with other services.
3. The above SEL file needs extra configs to preserve, otherwise it's
lost after BMC reboot. (In upstream, the /var/log points to
/var/volatile/log, Intel's fork makes it persistent)

> Whatever the reason, OpenBMC now has two ways of doing SELs, and I am
> tasked with picking one.  Knowing what was wrong with the rsyslog
> approach that led you to invent something new to replace it would help
> me, (and others I suspect), make that decision.

Indeed, but the rsyslog way is not really (and fully) upstream.
With `SEL.errors.yaml` interface and the
SEL_LOGGER_SEND_TO_LOGGING_SERVICE option, in phosphor-sel-logger, we
have the ability to add logging entries to phosphor-logging, and let
ipmid to parse it as SEL.
There is one drawback though, the logging entries that are not
"SEL.error" could not be parsed as normal SEL, the current behavior of
ipmid parses it as an "undetermined system error".

Lei YU

More information about the openbmc mailing list