CompTIA Linux+ Certification Guide
上QQ阅读APP看书,第一时间看更新

DMESG

Now, when the system is booting, there are a number of messages relating to various aspects of our system, ranging from hardware to services that fly across the screen quickly. It would be useful to be able to view those messages while troubleshooting. It's always useful to gather as much information as possible to aid troubleshooting.

We can leverage yet another powerful command, the dmesg command:

philip@ubuntu:~$ dmesg
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 4.4.0-128-generic (buildd@lcy01-amd64-019) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9) ) #154-Ubuntu SMP Fri May 25 14:15:18 UTC 2018 (Ubuntu 4.4.0-128.154-generic 4.4.131)
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.4.0-128-generic root=UUID=adb5d090-3400-4411-aee2-dd871c39db38 ro find_preseed=/preseed.cfg auto noprompt priority=critical locale=en_US quiet

Some of the following output is omitted for the sake of brevity:

[ 13.001702] audit: type=1400 audit(1529517046.911:8): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/evince" pid=645 comm="apparmor_parser"
[ 19.155619] e1000: ens33 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
[ 19.156584] IPv6: ADDRCONF(NETDEV_CHANGE): ens33: link becomes ready
[ 105.095992] do_trap: 33 callbacks suppressed
[ 105.095996] traps: pool[2056] trap int3 ip:7f778e83c9eb sp:7f776b1eb6f0 error:0
philip@ubuntu:~$

From the preceding output, we can see various pieces of information, including CPU detection, PCI drivers, and Ethernet, to name a few.