There are just too many kinds of panic types are categorized under the same Oops: xxxx, this is really ambiguous and makes it not so useful PANIC: "Oops: 0000 [#1] SMP " (check log for details) this patch separated two kinds out, as two most happening cases among the machines managed by me; the match string are copied from kernel source code exactly, after applied, I got panicmsg like: include/linux/kernel.h:#define HW_ERR panicmsg: "[Hardware Error]: CPU 7: Machine Check Exception: 5 Bank 11: f200003f000100b2" arch/x86/mm/fault.c:show_fault_oops panicmsg: "BUG: unable to handle kernel paging request at 00001248a68eb328" Signed-off-by: Derek Che <drc@xxxxxxxxxxxxx> --- task.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/task.c b/task.c index 4214d7f..26b6728 100644 --- a/task.c +++ b/task.c @@ -5509,8 +5509,14 @@ get_panicmsg(char *buf) } rewind(pc->tmpfile); while (!msg_found && fgets(buf, BUFSIZE, pc->tmpfile)) { - if (strstr(buf, "Oops: ") || - strstr(buf, "kernel BUG at")) + if (strstr(buf, "[Hardware Error]: ")) + msg_found = TRUE; + } + rewind(pc->tmpfile); + while (!msg_found && fgets(buf, BUFSIZE, pc->tmpfile)) { + if (strstr(buf, "Oops: ") || + strstr(buf, "kernel BUG at") || + strstr(buf, "BUG: unable to handle kernel ")) msg_found = TRUE; } rewind(pc->tmpfile); -- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/crash-utility