在Debian系统中,dmesg命令用于显示内核环缓冲区的消息。这些消息通常包含硬件检测、驱动程序加载、系统启动过程中的信息以及运行时的警告和错误。以下是一些关键信息的解读:
[ 0.000000] Linux version 5.4.0-42-generic (buildd@lgw01-amd64-039) (gcc version 9.3.0 (Debian 9.3.0-10)) #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.4.0-42-generic root=UUID=... ro quiet splash vt.handoff=7
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] i8042: PNP: No PS/2 controller found.
[ 0.000000] i8042: Probing ports directly.
[ 0.000000] i8042: Can't read CTR while initializing i8042
[ 0.000000] rtc_cmos 00:02: RTC can wake from S4
[ 0.000000] rtc_cmos 00:02: registered as rtc0
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux memory allocation debug: rseq: kernel rseq API support enabled.
[ 0.200000] pci 0000:00:1f.3: BAR 6: assigned [mem 0x90000000-0x9fffffff pref]
[ 0.200000] ata1: SATA max UDMA/133 abar m2048@0x1f080000 port 0x1f08 [ehci0]
内存错误:如ECC内存错误。
[ 2.345678] EDAC sbridge MC0: HANDLING MCE MEMORY ERROR
[ 2.345678] EDAC sbridge MC0: CPU 0: Machine Check: 0 Bank 7: cea3990000000924
[ 2.345678] EDAC sbridge MC0: TSC 0 addr fe8b000000 misc 0 time 1609455678 socket 0 apicid 0 cpu 0
硬件故障:如硬盘故障。
[ 10.123456] ata1.00: exception Emask 0x0 SAct 0x1000000 SErr 0x0 action 0x6 frozen
[ 10.123456] ata1.00: irq_stat 0x40000008
[ 10.123456] ata1.00: failed command: READ FPDMA QUEUED
[ 10.123456] ata1.00: cmd 60/08:00:10:00:00/00:00:00:00:00/e0 tag 0 ncq dma 4096 in
[ 10.123456] res 41/40:00:10:00:00/00:00:00:00:00/e0 Emask 0x409 (media error) <F>
[ 0.000000] usbcore: registered new interface driver usbfs
[ 0.000000] usbcore: registered new interface driver hub
[ 0.000000] usbcore: registered new device driver usb
[ 3.456789] systemd-udevd[123]: starting version 240
[ 3.456789] systemd-udevd[123]: adding interface socket /org/freedesktop/udev
[ 3.456789] systemd-udevd[123]: adding interface socket /org/freedesktop/udev/rules.d/70-persistent-net.rules
[ 0.000000])表示消息的重要性和紧急程度。ERROR、WARNING、FAILED等,这些通常指示潜在问题。通过这些信息,你可以更好地了解系统的运行状态和潜在问题。如果遇到问题,可以结合这些日志信息进行故障排查。