Skip to content

common: Filter dmesg on failure to warnings and errors#3957

Open
zhijianli88 wants to merge 1 commit intoflatcar:mainfrom
zhijianli88:dmesg
Open

common: Filter dmesg on failure to warnings and errors#3957
zhijianli88 wants to merge 1 commit intoflatcar:mainfrom
zhijianli88:dmesg

Conversation

@zhijianli88
Copy link
Copy Markdown
Contributor

When a script fails, the die_notrace function dumps the entire dmesg buffer for debugging purposes. On a busy system, this log can be excessively long, making it difficult to locate the actual kernel-level warnings or errors that may have caused the failure. The important messages are often buried in a flood of unrelated informational output.

Modify the dmesg call in the error handler to make debugging easier. Use the --level=err,warn option to limit the output to only warning and error messages, which significantly reduces noise and focuses on potential problems.

In addition, add the --ctime option to print human-readable timestamps for better event correlation and --color=never to ensure clean, parseable output in log files. The debug section header is also updated to reflect this change.

When a script fails, the die_notrace function dumps the entire dmesg
buffer for debugging purposes. On a busy system, this log can be
excessively long, making it difficult to locate the actual kernel-level
warnings or errors that may have caused the failure. The important
messages are often buried in a flood of unrelated informational output.

Modify the dmesg call in the error handler to make debugging easier.
Use the --level=err,warn option to limit the output to only warning
and error messages, which significantly reduces noise and focuses on
potential problems.

In addition, add the --ctime option to print human-readable timestamps
for better event correlation and --color=never to ensure clean,
parseable output in log files. The debug section header is also updated
to reflect this change.

Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
@zhijianli88 zhijianli88 requested a review from a team as a code owner April 22, 2026 03:57
@chewi
Copy link
Copy Markdown
Contributor

chewi commented Apr 22, 2026

@krnowak, @t-lo, you were talking about this recently, so I'll leave this with you.

@krnowak
Copy link
Copy Markdown
Member

krnowak commented Apr 22, 2026

I have a branch that drops this stuff altogether, among other things - it turned out to be never of any use. I'll file a PR eventually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants