Search notes:

printk log buffer

The printk log buffer is also referred as kernel ring buffer or kernel log buffer.
The kernel ring buffer is a cyclic buffer whose size is controlled by LOG_BUF_LEN.

printk

printk (defined in kernel/printk/printk.c) fills the kernel log buffer with messages. The size of the log buffer is (1<<CONFIG_LOG_BUF_SHIFT)

Log levels

Each message is associated with a log level:

Console log level

Messages with a log level less than the console log level are printed to the console.
The console log level corresponds to the first number in /proc/sys/kernel/printk.

Message format

Linux' kernel coding style has some notes on the preferred message format, such as

TODO

It seems as though printk can only be used when PDA is initialized.

See also

/proc/sys/kernel/printk
CONFIG_LOG_BUF_SHIFT
dmesg can be used to examine the kernel ring buffer.

Index