[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250504180831.4190860-1-max.kellermann@ionos.com>
Date: Sun, 4 May 2025 20:08:29 +0200
From: Max Kellermann <max.kellermann@...os.com>
To: akpm@...ux-foundation.org,
song@...nel.org,
joel.granados@...nel.org,
dianders@...omium.org,
cminyard@...sta.com,
linux-kernel@...r.kernel.org
Cc: Max Kellermann <max.kellermann@...os.com>
Subject: [PATCH v2 0/2] sysfs: add counters for lockups and stalls
Commits 9db89b411170 ("exit: Expose "oops_count" to sysfs") and
8b05aa263361 ("panic: Expose "warn_count" to sysfs") added counters
for oopses and warnings to sysfs, and these two patches do the same
for hard/soft lockups and RCU stalls.
All of these counters are useful for monitoring tools to detect
whether the machine is healthy. If the kernel has experienced a
lockup or a stall, it's probably due to a kernel bug, and I'd like to
detect that quickly and easily. There is currently no way to detect
that, other than parsing dmesg. Or observing indirect effects: such
as certain tasks not responding, but then I need to observe all tasks,
and it may take a while until these effects become visible/measurable.
I'd rather be able to detect the primary cause more quickly, possibly
before everything falls apart.
Max Kellermann (2):
kernel/watchdog: add /sys/kernel/{hard,soft}lockup_count
kernel/rcu/tree_stall: add /sys/kernel/rcu_stall_count
.../ABI/testing/sysfs-kernel-hardlockup_count | 7 +++
.../ABI/testing/sysfs-kernel-rcu_stall_count | 6 +++
.../ABI/testing/sysfs-kernel-softlockup_count | 7 +++
kernel/rcu/tree_stall.h | 26 +++++++++
kernel/watchdog.c | 53 +++++++++++++++++++
5 files changed, 99 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-kernel-hardlockup_count
create mode 100644 Documentation/ABI/testing/sysfs-kernel-rcu_stall_count
create mode 100644 Documentation/ABI/testing/sysfs-kernel-softlockup_count
--
2.47.2
Powered by blists - more mailing lists