In this demonstration, we're going to go over
how to monitor some of the kernel modules.
We're going to primarily be focusing on the D message command.
This will give us a lot of information about what's going on
beneath the surface at the kernel level
'cause every kernel module, drivers and other devices
send messages back and forth to the kernel
and now we can see you in real time what's happening there.
Now, a key file that we can use
to get some information about this kernel
it's going to be on the proc folder
under the version directory.
And here we'll see that it gives us
the Linux version information,
as well as the GCC or the GNU compiler collection.
That's going to be useful for troubleshooting.
For example, if there's some out-of-date software
or incompatible software,
we'll know by getting this information from this file.
Next, we're going to go ahead and examine
the kernel message buffer.
Okay, this is that D message command
I was speaking about earlier.
So first we're just going to look at the help command
and we're just going to read through some of the information
that's presented to us.
It talks about the different type of facilities,
talks about the different type of log levels.
And we're going to use the warning as an example
of how to key in on some of that information.
So we're going to go ahead and get right to it.
We're going to do the D message command
and we're going to use the H option.
So if you see, H is a lot of information
going back and forth from different drivers,
other parts of the system, hardware, software,
anything that pertains to the kernel,
system resource allocation, errors, starts, stops,
pretty much anything that you need to know
relative to information going back and forth to the kernel.
You're going to get that here.
Now, for the average system administrator
this isn't going to be something that you use
quite often and you might do a lot more research
to understand exactly what these messages are going for,
but this is the location that you go to to get it.
All the way down to the bottom.
Now, as for a filter, we're going to look for only messages
that are giving us a warning about something.
So again, we're going to go to D message
and do the H for human readable.
And this L option gives us a level.
It's going to let us specify the levels
that we would like to view.
For example, if we want to view errors or warning.
So the first one we want to do is a warning.
So here it keys in on all the information
that's deemed as a warning that's being sent
back and forth to the kernel.
Now, we're going to do this one more time,
but this time we're going to do it with an error message.
I only have two error messages thus far,
but we can see it here.
So we love to use a pipe operator
because again it is a powerful filter for us.
And so we're going to use a D message again
and we're going to pipe it and we're going to search
for the USB that we installed earlier.
Okay now, we look at the screen we can see
pretty much from start to finish
anything pretty much kind of relating to USB device drivers,
core drivers, registration,
gives us information about the manufacturer, serial number.
All this information that's being sent
back and forth to the kernel.
Now, we're going to do it one more time,
but this time I'm going to use it with the Bluetooth USB.
And the most important thing that we're looking for
is that it's being registered as a new interface driver.
So I registered and de-registered earlier,
and so I'll re-register it for this example.
So we can see all the information here
and it's clear, and of course, when we use the grip,
it highlights it, so it's nice, clean, readable for us.
All right, that was just a quick walkthrough
on the D message command.
Pretty much, again, that's the message buffer
for the kernel.
And we'll see a lot of key information that we need
from kernel modules, device drivers,
and just the order of operations
that's happening beneath the hood.
Again, thank you for sticking me with this walkthrough
and I'll see you in the next lesson.