Reading
Pages Debugging by Printing (75-82), Debugging System Faults (93-98). Also read about the dev_* and pr_* functions (https://www.kernel.org/doc/html/latest/process/coding-style.html#printing-kernel-messages (only Section 13) and https://lwn.net/Articles/487437/).
Study Questions
-
How do you classify messages with printk?
-
(T or F) There is a comma between the log-level and the message.
-
(T or F) Changing the log-level of the console can change what messages are displayed.
-
(T or F) You can use dmesg to read console messages.
-
(T or F) printk writes messages into a stack.
-
(T or F) dmesg prints out only the most recent message written to the console.
-
(T or F) You can modify the size of the buffer used with printk.
-
How does printk_ratelimit work?
-
How can you use Oops messages to determine where in your code the problem is located?
-
When should you use the dev_* and pr_* functions?