openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Lei Yu <yulei.sh@bytedance.com>
To: openbmc <openbmc@lists.ozlabs.org>
Subject: Re: ipmi sel log revisited
Date: Wed, 15 Sep 2021 17:08:06 +0800	[thread overview]
Message-ID: <CAGm54UE5gb+S0WWYGbbr0Nsif6tJ2j+-U1awrAeyJbrj=kf0oQ@mail.gmail.com> (raw)
In-Reply-To: <CAGm54UHdTyPh0hGiatA44whg2PdRzJFg0gBnVHA4moYRr=aT=g@mail.gmail.com>

On Mon, Jun 28, 2021 at 5:42 PM Lei Yu <yulei.sh@bytedance.com> wrote:
>
> 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.

The above idea is now implemented by the below series of patches.
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-host-ipmid/+/46893


-- 
BRs,
Lei YU

      reply	other threads:[~2021-09-15  9:09 UTC|newest]

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

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to='CAGm54UE5gb+S0WWYGbbr0Nsif6tJ2j+-U1awrAeyJbrj=kf0oQ@mail.gmail.com' \
    --to=yulei.sh@bytedance.com \
    --cc=openbmc@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).