From 2034d522d76923cf8e75e022ec8695aefb2a2eb8 Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Fri, 10 Jul 2026 15:48:05 +0200 Subject: [PATCH] Decode Linux kernel panic SEL records The Linux kernel ipmi panic logger stores panic strings in SEL records of type 0xf0, with a chunk sequence number in byte 4 and up to 11 characters of the message in bytes 5-15. ipmitool and freeipmi both recognize this convention; do the same rather than presenting such records as opaque non-timestamped OEM data. --- confluent_server/aiohmi/ipmi/events.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/confluent_server/aiohmi/ipmi/events.py b/confluent_server/aiohmi/ipmi/events.py index 2314128c..27e05a1b 100644 --- a/confluent_server/aiohmi/ipmi/events.py +++ b/confluent_server/aiohmi/ipmi/events.py @@ -541,6 +541,18 @@ class EventHandler(object): elif 0xc0 <= selentry[2] <= 0xdf: event['oemid'] = selentry[7:10] event['oemdata'] = selentry[10:] + elif selentry[2] == 0xf0: + # De facto standard from the Linux kernel ipmi panic logger, + # also recognized by ipmitool and freeipmi: byte 4 is a chunk + # sequence number and bytes 5-15 carry a piece of the panic + # string + event['event'] = 'Linux kernel panic: {0}'.format( + selentry[5:16].partition(b'\x00')[0].decode( + 'utf-8', 'replace')) + event['severity'] = pygconst.Health.Critical + # this layout is defined by the kernel convention rather than + # the BMC vendor, so bypass the OEM handler + return event elif selentry[2] >= 0xe0: # In this class of OEM message, all bytes are OEM, interpretation # is wholly left up to the OEM layer, using the OEM ID of the BMC