Linux dmesg命令

Linux dmesg命令:显示或控制内核环形(ring)缓冲区。

Linux dmesg命令 功能描述

使用dmesg命令可以显示系统开机启动信息。内核会将开机启动信息存储在ring buffer(环形缓冲区)中。如果开机时来不及查看信息,可利用dmesg命令来查看。开机信息也保存在/var/log/dmesg日志文件里。某些硬件设备在安装的时候,通常会安装驱动程序(内核模块),会打印一些信息,也可以通过dmesg命令来查看。

Linux dmesg命令 语法

dmesg [选项]

命令中各选项的含义如表所示。

dmesg命令选项含义

Linux dmesg命令 示例

显示系统开机启动信息

[root@rhel ~]# dmesg
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Linux version 2.6.32-358.el6.x86_64(mockbuild@x86-022.build.eng.bos.redhat.com)(gcc version 4.4.720120313(Red Hat 4.4.7-3)(GCC))
 #1 SMP Tue Jan 29 11:47:41 EST 2013
Command line: ro root=UUID=2ac36994-5a18-4741-8118-96fe2c57a6c6 rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD crashkernel=auto LANG
=zh_CN.UTF-8 rd_NO_LVM rd_NO_DM rhgb quiet
KERNEL supported cpus:
  Intel GenuineIntel
  AMD AuthenticAMD
  Centaur CentaurHauls
Disabled fast string operations
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000-000000000009f000 (usable)
BIOS-e820: 000000000009f000-00000000000a0000 (reserved)
BIOS-e820: 00000000000ca000-00000000000cc000 (reserved)
BIOS-e820: 00000000000dc000-0000000000100000 (reserved)
BIOS-e820: 0000000000100000-000000003fee0000 (usable)
BIOS-e820: 000000003fee0000-000000003feff000 (ACPI data)
BIOS-e820: 000000003feff000-000000003ff00000 (ACPI NVS)
BIOS-e820: 000000003ff00000-0000000040000000 (usable)
BIOS-e820: 00000000e0000000-00000000f0000000 (reserved)
BIOS-e820: 00000000fec00000-00000000fec10000 (reserved)
BIOS-e820: 00000000fee00000-00000000fee01000 (reserved)
BIOS-e820: 00000000fffe0000-0000000100000000 (reserved)
DMI present.
SMBIOS version 2.4 @ 0xF6B30
DMI: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 07/02/2012
Phoenix BIOS detected: BIOS may corrupt low RAM, working around it.
e820 update range: 0000000000000000-0000000000010000 (usable) ==> (reserved)
Hypervisor detected: VMware
e820 update range: 0000000000000000-0000000000001000 (usable) ==> (reserved)
e820 remove range: 00000000000a0000-0000000000100000 (usable)
last_pfn = 0x40000 max_arch_pfn = 0x400000000
MTRR default type: uncachable
MTRR fixed ranges enabled:
  00000-9FFFF write-back
  A0000-BFFFF uncachable
  C0000-CBFFF write-protect
........................(省略)

清除系统开机启动信息

[root@rhel ~]# dmesg -c

Camera课程

Python教程

Java教程

Web教程

数据库教程

图形图像教程

办公软件教程

Linux教程

计算机教程

大数据教程

开发工具教程