In order to display the messages loaded into a kernel module, I can use the command
dmesg
Is there any alternatives for this command? How this function gets all these kernel messages?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityIn order to display the messages loaded into a kernel module, I can use the command
dmesg
Is there any alternatives for this command? How this function gets all these kernel messages?
All messages you can see with dmesg
are by default written to var/log/syslog
as well. So you can look through this log file with any tool you like.
I use less var/log/syslog
for reading it later or tailf var/log/syslog
for "just in time" purposes.
As zwets has just pointed out: /var/log/dmesg
contains the dmesg output collected during system boot.
As I know, there are two another ways. The first one is
cat /proc/kmsg
And the second is using
'Ctrl + Alt + Fn'
to switch to virtual console.
Then every kernel message(include inserting kmod) will be printed on the screen.