您的位置:首页 > 运维架构 > Linux

linux之dmesg命令

2013-12-10 14:27 375 查看
显示内核消息

dmesg [options]

dmesg 可以用来显示存储在内核环缓冲区中的消息

系统启动时,内核会用硬件和模块初始化的相关消息填充其环缓冲区。内核环缓冲区中的消息常常用于诊断系统问题

选项

-c 运行dmesg后情况内核环缓冲区

示例

dmesg >

复制代码

[root@localhost ~]# dmesg > message

[root@localhost ~]# head -4 message

Initializing cgroup subsys cpuset

Initializing cgroup subsys cpu

Linux version 2.6.32-279.el6.i686 (mockbuild@c6b9.bsys.dev.centos.org) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Fri Jun 22 10:59:55 UTC 2012

KERNEL supported cpus:

复制代码

将系统启动的情况重定向到某一文件

dmesg | grep

[root@localhost ~]# dmesg | grep eth0

e1000 0000:00:03.0: eth0: (PCI:33MHz:32-bit) 08:00:27:14:99:a3

e1000 0000:00:03.0: eth0: Intel(R) PRO/1000 Network Connection

e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX

8021q: adding VLAN 0 to HW filter on device eth0

eth0: no IPv6 routers present

过滤dmesg中的信息
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: