Skip to content

sysfs: add counters for lockups and stalls

Max Kellermann lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 3 repliesIn review 1 of 2 applied
  2. v12 patches 5 repliesSuperseded

Patches in v2 1 of 2 applied

#Subject and filesSizeRepliesApplied
1/2kernel/watchdog: add /sys/kernel/{hard,soft}lockup_countDocumentation/ABI/testing/sysfs-kernel-hardlockup_count Documentation/ABI/testing/sysfs-kernel-softlockup_count kernel/watchdog.c+67 -00 replies
2/2kernel/rcu/tree_stall: add /sys/kernel/rcu_stall_countDocumentation/ABI/testing/sysfs-kernel-rcu_stall_count kernel/rcu/tree_stall.h+32 -03 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [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
Signature · 1 line
2.47.2