Kernel log buffer - How to refresh it?

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Mon Feb 23 11:32:28 EST 2015


On Mon, 23 Feb 2015 20:17:55 +0900, manty kuma said:

> 1. At the time of panic, many of pr_info prints are not flushed onto serial
> console. What can I do to get them(considering making them emerg is not an
> option)?
>
> 2. Is there a way I can flush the kernel buffer? I mean all the pending
> prints, if any, should be copied into kernel ring buffer.

In general, if your kernel is panic'ing, there really isn't much you can do,
because your kernel is so messed up that it has declared any continued safe
operation impossible. Even if the kernel oops'es, you still have a fighting
chance of doing something, as long as it doesn't use a lock that the oopsed
code was holding.  With a panic, you don't even have that.

If you're running with a EFI boot, you can enable saving the panic messages
and the last bit of dmesg output to EFI nvram, and then recover it after
rebooting from /sys/fs/pstore


% zgrep PSTO /proc/config.gz
CONFIG_EFI_VARS_PSTORE=y
# CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE is not set
CONFIG_PSTORE=y
CONFIG_PSTORE_CONSOLE=y
CONFIG_PSTORE_PMSG=y
# CONFIG_PSTORE_FTRACE is not set
CONFIG_PSTORE_RAM=y


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150223/159f367d/attachment-0001.bin 


More information about the Kernelnewbies mailing list