archive mirror
 help / color / mirror / Atom feed
From: Lei Yu <>
To: openbmc <>
Subject: ipmi sel log revisited
Date: Mon, 28 Jun 2021 17:42:14 +0800	[thread overview]
Message-ID: <> (raw)

This email is to describe the current status and issues related ipmi
sel log in OpenBMC, and propose a possible solution.

# Background
There are two backends of the ipmi sel log:
* The logging entry on DBus
* The ipmi_sel log stored in "/var/log/ipmi_sel"

The configuration option `SEL_LOGGER_SEND_TO_LOGGING_SERVICE` in
phosphor-sel-logger is used to control which way to use.

## The logging entry on DBus
The logging entries on DBus in /xyz/openbmc_project/logging/entry/
will be parsed and converted to IPMI sel logs.
This includes two types of logs:
* The logging entries with a CALLOUT path in the associations.
* The logging entries with SEL metadata[1] in the "AdditionalData".
For the both logging entries, the ipmid will parse the entry and
convert it to a SEL entry.

## The ipmi_sel log stored in "/var/log/ipmi_sel"
The log is sent to the journal log with specific MESSAGE_ID and properties.
rsyslog filters such logs and save the "/var/log/ipmi_sel" [2]

## Comparison
Both methods have pros and cons:

| Method        | Pros                              | Cons
| ------        | ----                              | ----
| Logging entry | Use DBus data model               | Complicate and
slow to parse      |
|               | Support both ipmi sel and redfish |
|               |                                   |
| ipmi_sel      | Easy and quick to parse           | Data is
separated from DBus       |
|               |                                   | ipmi sel and
redfish is separated |

# The proposed solution
The openbmc usually uses the DBus as the data model and all the
services consume data from DBus, and the upstream phosphor-host-ipmid
already supports the logging entries, the proposal is to re-use the
logging entry on DBus as the data source, and improve the cons: to
make it faster to parse in ipmid.

The idea is:
1. On BMC startup, let ipmid parse all the logging entries in the
background and generate the SEL entries in RAM;
2. Use a match to get a callback on logging entries' add/delete
events, and update the SEL entries in RAM when a logging entry is
added or deleted;
3. Use the SEL entries in RAM directly when `ipmi sel list|elist` is called.

This way improves `ipmitool sel list` speed and possibly resolve the
issue of the current logging entry model.

Comments are welcome.


Lei YU

             reply	other threads:[~2021-06-28  9:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28  9:42 Lei Yu [this message]
2021-09-15  9:08 ` ipmi sel log revisited Lei Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).