在Debian系统中,dmesg命令用于显示内核环缓冲区的消息。这些消息通常包含系统启动时的硬件检测信息、驱动程序加载信息以及运行时的内核消息。以下是一些常见的dmesg日志关键提示及其含义:
硬件检测信息
ACPI: Added _OSI(Module Device)ACPI: Added _OSI(Processor Device)ACPI: Added _OSI(3.0 _SCP Extensions)ACPI: Added _OSI(Processor Aggregator Device)驱动程序加载信息
usbcore: registered new interface driver usbfsusbcore: registered new interface driver hubusbcore: registered new device driver usbi8042: PNP: No PS/2 controller found.硬件初始化
sda: sda1 sda2ata1: SATA max UDMA/133 abar m2048@0xf6000000 port 0xf780 irq 42eth0: no IPv6 routers present内存管理
Page fault in non-paged area (pc=0xXXXXXXXX)VMalloc: allocated 0xXXXXXXXX bytesCPU相关
CPU: Core i7-870 @ 2.93GHzCPU: Hyper-Threading enabled on physical core 0, logical core 0磁盘I/O
sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OKEXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)网络相关
eth0: link upwlan0: associated with AP XXXX at frequency 2.412 GHz (Channel 1)系统事件
Kernel panic - not syncing: Fatal exception in interruptinit: at-spi2-registryd main process ended, respawning硬件故障
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0i8042: Can't read CTR while initializing i8042安全相关
SELinux: Security Policy Enforcement DisabledAppArmor: AppArmor enabled内核模块加载
module 'example' loaded successfullymodule 'example' failed to load: No such file or directory系统调用
syscall 1234 returned -1 with errno 22 (Invalid argument)syscall 5678 succeeded时间戳
Oct 10 14:23:45 hostname kernel: [ 123.456789] ...日志级别
[ 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 2020dmesg日志可能会非常详细,建议使用dmesg | less或dmesg | grep <keyword>来过滤感兴趣的信息。dmesg日志有助于及时发现和解决系统问题。通过理解这些关键提示,你可以更好地监控和调试Debian系统的运行状态。