Skip to content
Commit 1b743485 authored by Sreenath Vijayan's avatar Sreenath Vijayan Committed by Greg Kroah-Hartman
Browse files

tty/sysrq: Replay kernel log messages on consoles via sysrq



When terminal is unresponsive, one cannot use dmesg to view
the printk ring buffer messages. Also, syslog services may be
disabled, especially on embedded systems, to check the messages
after a reboot. In this scenario, replay the messages in printk
ring buffer on consoles via sysrq by pressing sysrq+R.

The console loglevel will determine which all kernel log messages
are displayed. The messages will be displayed only when
console_trylock() succeeds. Users could repeat the sysrq key when
it fails. If the owner of console subsystem lock is stuck,
repeating the key won't work.

Suggested-by: default avatarPetr Mladek <pmladek@suse.com>
Signed-off-by: default avatarShimoyashiki Taichi <taichi.shimoyashiki@sony.com>
Reviewed-by: default avatarJohn Ogness <john.ogness@linutronix.de>
Signed-off-by: default avatarSreenath Vijayan <sreenath.vijayan@sony.com>
Link: https://lore.kernel.org/r/cc3b9b1aae60a236c6aed1dc7b0ffa2c7cd1f183.1710220326.git.sreenath.vijayan@sony.com
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 693f75b9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment