Re: [PATCH] RAS: Fix the trace_show() function to output trace_count
From: Borislav Petkov
Date: Wed Oct 05 2022 - 14:17:37 EST
On Wed, Oct 05, 2022 at 09:16:45AM -0700, Tony Luck wrote:
> The /sys/kernel/debug/ras/daemon_active is used to indicate to some
> kernel code whether there is a user mode consumer of RAS trace events
> to decide whether to print to the console.
> The intent was that reading daemon_active would give the same indication
> to users. But the code is broken and does not display anything.
Huh, looking at that Fixes commit, it says:
"One can track which daemon opens it via "lsof
# lsof /sys/kernel/debug/ras/daemon_active
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
tail 13339 root 3r REG 0,6 0 27 /sys/kernel/debug/ras/daemon_active
So it works as advertized I'd say.
> Add a seq_printf() to output the current value of the trace_count.
Now, if you want to cat that file, that's a different story.