Inspect feature logs in dmesg
In this step, we'll learn how to inspect feature logs using the dmesg
command. dmesg
displays the kernel's message buffer, which contains information about hardware detection, driver initialization, and other system events. It's a valuable tool for troubleshooting hardware-related issues.
To view the kernel message buffer, open your terminal.
Now, type the following command and press Enter:
dmesg
This command will output a lot of information. The output is a chronological log of kernel messages.
The output will look something like this (the exact details will vary depending on your system):
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 5.15.0-76-generic (buildd@lcy02-amd64-078) (gcc (Ubuntu 9.4.0-1ubuntu1) 9.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #83-Ubuntu SMP Thu Jun 15 19:16:42 UTC 2023
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.15.0-76-generic root=UUID=... ro
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Hygon HygonGenuine
[ 0.000000] Centaur CentaurHauls
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x1: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x2: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x4: 'AVX registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0xd: 'AVX-512 opmask, upper bytes of ZMM0-ZMM15, EVEX encoded data ZMM0-ZMM15'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0xe: 'AVX-512 hi256 zmm, opmask registers ZMM16-ZMM31'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x12: 'Tile registers'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 832
[ 0.000000] x86/fpu: xstate_offset[d]: 1408, xstate_sizes[d]: 512
[ 0.000000] x86/fpu: xstate_offset[e]: 1920, xstate_sizes[e]: 512
[ 0.000000] x86/fpu: xstate_offset[12]: 2432, xstate_sizes[12]: 1664
[ 0.000000] x86/fpu: Enabled xstate features 0x13, context size is 4096 bytes, using 'compacted' format.
[ 0.000000] signal: max sigframe size: 9216
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009d7ff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009d800-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
...
You can filter the output using grep
to search for specific keywords. For example, to search for messages related to USB devices, you can use the following command:
dmesg | grep USB
This will show you only the lines that contain the word "USB".
You can also use dmesg
to check for error messages. For example, to search for messages containing the word "error", you can use the following command:
dmesg | grep error
By inspecting the dmesg
output, you can gain valuable insights into your system's hardware and driver behavior.