From the course: Advanced Linux: The Linux Kernel
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Read messages from the kernel - CentOS Tutorial
From the course: Advanced Linux: The Linux Kernel
Read messages from the kernel
- So more about surveying the Linux kernel. Now, let's look at messages from the kernel, reading those messages. How can we find out the messages that kernel printed at us? Well, big function in the Linux kernel is the function called printK, print for kernel. It's a lot like C's, printf function, right? Takes an argument list and formatting characters like percent D and all that stuff and it prints messages. This is really common in the Linux kernel. I once counted how many times printK was called in the kernel and I counted over 50000. I didn't count those by hand, by the way, but printK is used a lot, right? Just like a lot of people C programs, it's the most common way of doing debug and just printing some messages. And those messages can be pretty important sometimes, so it's nice to know how to look at 'em. That's what we're talking about here. So, when you do printK and the kernel, then that message is put into a…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.