From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Shuai Xue <xueshuai@linux.alibaba.com>
Cc: Borislav Petkov <bp@alien8.de>, Breno Leitao <leitao@debian.org>,
Alexander Graf <graf@amazon.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Peter Gonda <pgonda@google.com>,
"Luck, Tony" <tony.luck@intel.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>, James Morse <james.morse@arm.com>,
"Moore, Robert" <robert.moore@intel.com>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"acpica-devel@lists.linux.dev" <acpica-devel@lists.linux.dev>,
"kernel-team@meta.com" <kernel-team@meta.com>
Subject: Re: [PATCH] ghes: Track number of recovered hardware errors
Date: Wed, 16 Jul 2025 08:30:26 +0200 [thread overview]
Message-ID: <20250716083026.1737fdb4@foz.lan> (raw)
In-Reply-To: <564e0deb-73f0-449f-9d0f-181311d3a348@linux.alibaba.com>
Em Wed, 16 Jul 2025 10:05:27 +0800
Shuai Xue <xueshuai@linux.alibaba.com> escreveu:
> 在 2025/7/15 23:09, Borislav Petkov 写道:
> > On Tue, Jul 15, 2025 at 09:46:03PM +0800, Shuai Xue wrote:
> >> For the purpose of counting, how about using the cmdline of rasdaemon?
> >
> > That would mean you have to run rasdaemon on those machines before they
> > explode and then carve out the rasdaemon db from the coredump (this is
> > post-mortem analysis).
>
> Rasdaemon is a userspace tool that will collect all hardware error
> events reported by the Linux Kernel from several sources (EDAC, MCE,
> PCI, ...) into one common framework. And it has been a standard tools
> in Alibaba. As far as I know, twitter also use Rasdaemon in its production.
There are several others using rasdaemon, afaikt. It was originally
implemented due to a demand from supercomputer customers with thousands
of nodes in US, and have been shipped on major distros for quite a while.
>
> >
> > I would love for rasdaemon to log over the network and then other tools can
> > query those centralized logs but that has its own challenges...
> >
>
> I also prefer collecting rasdaemon data in a centralized data center, as
> this is more beneficial for using big data analytics to analyze and
> predict errors. At the same time, the centralized side also uses
> rasdaemon logs as one of the references for machine operations and
> maintenance.
>
> As for rasdaemon itself, it is just a single-node event collector and
> database, although it does also print logs. In practice, we use SLS [1]
> to collect rasdaemon text logs from individual nodes and parse them on
> the central side.
Well, rasdaemon already uses SQL commands to store on its SQLite database.
It shouldn't be hard to add a patch series to optionally use a centralized
database directly. My only concern is that delivering logs to an external
database on a machine that has hardware errors can be problematic and
eventually end losing events.
Also, supporting different databases can be problematic due to the
libraries they require. Last time I wrote a code to write to an Oracle
DB (a life-long time ago), the number of the libraries that were required
were huge. Also, changing the order with "-l" caused ld to not find the
right objects. It was messy. Ok, supporting MySQL and PostgreSQL is not
that hard.
Perhaps a good compromise would be to add a logic there to open a local
socket or a tcp socket with a logger daemon, sending the events asynchronously
after storing locally at SQLite. Then, write a Python script using SQLAlchemy.
This way, we gain for free support for several different databases.
Thanks,
Mauro
next prev parent reply other threads:[~2025-07-16 6:30 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-14 16:57 Breno Leitao
2025-07-14 17:10 ` Luck, Tony
2025-07-14 17:10 ` Borislav Petkov
2025-07-14 17:33 ` Luck, Tony
2025-07-14 17:35 ` Borislav Petkov
2025-07-14 22:21 ` Luck, Tony
2025-07-15 8:29 ` Borislav Petkov
2025-07-15 10:20 ` Breno Leitao
2025-07-15 10:31 ` Borislav Petkov
2025-07-15 12:02 ` Breno Leitao
2025-07-15 12:53 ` Borislav Petkov
2025-07-15 13:46 ` Shuai Xue
2025-07-15 15:09 ` Borislav Petkov
2025-07-16 2:05 ` Shuai Xue
2025-07-16 6:30 ` Mauro Carvalho Chehab [this message]
2025-07-15 17:25 ` Breno Leitao
2025-07-16 3:04 ` Shuai Xue
2025-07-16 12:42 ` Breno Leitao
2025-07-17 3:03 ` Shuai Xue
2025-07-17 12:06 ` Breno Leitao
2025-07-17 17:19 ` Luck, Tony
2025-07-17 17:39 ` Breno Leitao
2025-07-17 17:54 ` Luck, Tony
2025-07-15 10:07 ` Breno Leitao
2025-07-15 10:18 ` Borislav Petkov
2025-07-17 16:06 ` Breno Leitao
2025-07-17 17:29 ` Luck, Tony
2025-07-18 16:11 ` Breno Leitao
2025-07-18 17:36 ` Luck, Tony
2025-07-21 8:56 ` Breno Leitao
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=20250716083026.1737fdb4@foz.lan \
--to=mchehab+huawei@kernel.org \
--cc=acpica-devel@lists.linux.dev \
--cc=bp@alien8.de \
--cc=graf@amazon.com \
--cc=james.morse@arm.com \
--cc=kernel-team@meta.com \
--cc=konrad.wilk@oracle.com \
--cc=leitao@debian.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pgonda@google.com \
--cc=rafael@kernel.org \
--cc=robert.moore@intel.com \
--cc=tony.luck@intel.com \
--cc=xueshuai@linux.alibaba.com \
/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
all inboxes | Powered by JetHome®