linux操作系统 dmesg命令手册

介绍

名称: dmesg

描述: 开机后可以使用dmesg命令查看开机设备信息,在接触不到硬件的情况下可以使用该命令查看开机时硬件报错信息。

说明:内核会将开机信息存储在ring buffer和日志文件/var/log/dmesg中

常用选项

-c 显示后清除ring buffer中的内容 
-n 设置记录信息分层
-s 设置ring buffer(缓冲区)大小,一般默认值为8196字节

示例

[root@linux-man.cn ~]# dmesg | tail -n 100 | head -n 10
[    0.766051] usb usb1: Product: UHCI Host Controller
[    0.766053] usb usb1: Manufacturer: Linux 2.6.32-220.23.2.al.ali1.2.alios6.x86_64 uhci_hcd
[    0.766054] usb usb1: SerialNumber: 0000:00:01.2
[    0.766111] usb usb1: configuration #1 chosen from 1 choice
[    0.766138] hub 1-0:1.0: USB hub found
[    0.766141] hub 1-0:1.0: 2 ports detected
[    0.766401] PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:PS2M] at 0x60,0x64 irq 1,12
[    0.768779] serio: i8042 KBD port at 0x60,0x64 irq 1
[    0.768783] serio: i8042 AUX port at 0x60,0x64 irq 12
[    0.768858] mice: PS/2 mouse device common for all mice
[root@linux-man.cn ~]#

相关命令

  • 暂无收录