码迷,mamicode.com
首页 > 系统相关 > 详细

Linux命令(23):demsg命令-显示开机信息

时间:2016-11-18 19:30:38      阅读:598      评论:0      收藏:0      [点我收藏+]

标签:demsg命令

demsg命令


功能说明

    demsg命令用于显示开机信息,内核会将开机信息存储在系统缓冲区(ring buffer)中,开机后可用dmesg命令查看,也可以在/var/log/目录中查看dmesg文件。用法如下:

  dmesg [选项]

命令参数

选项含义
-c显示开机信息后,清除ring buffer信息
-s设置缓冲区大小,默认设置为8192
-n设置记录信息的层级

    内核缓冲区的信息对于诊断系统非常有用。在查看时可以配合grep使用。

示例

    使用tail查看最后10条信息

[root@c7 ~]# dmesg | tail

[   14.173511] Ebtables v2.0 registered

[   14.211151] Bridge firewalling registered

[   15.018274] IPv6: ADDRCONF(NETDEV_UP): eno16777736: link is not ready

[   15.023187] e1000: eno16777736 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None

[   15.027562] IPv6: ADDRCONF(NETDEV_UP): eno16777736: link is not ready

[   15.027571] IPv6: ADDRCONF(NETDEV_CHANGE): eno16777736: link becomes ready

[73937.594566] e1000: eno16777736 NIC Link is Down

[74082.150628] e1000: eno16777736 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None

[74082.153014] IPv6: ADDRCONF(NETDEV_CHANGE): eno16777736: link becomes ready

[102547.555629] perf interrupt took too long (2547 > 2500), lowering kernel.perf_event_max_sample_rate to 50000

    使用grep查看关于网卡设备的信息

[root@c7 ~]# dmesg | grep eno16

[    2.834942] systemd-udevd[497]: renamed network interface eth0 to eno16777736

[   15.018274] IPv6: ADDRCONF(NETDEV_UP): eno16777736: link is not ready

[   15.023187] e1000: eno16777736 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None

[   15.027562] IPv6: ADDRCONF(NETDEV_UP): eno16777736: link is not ready

[   15.027571] IPv6: ADDRCONF(NETDEV_CHANGE): eno16777736: link becomes ready

[73937.594566] e1000: eno16777736 NIC Link is Down

[74082.150628] e1000: eno16777736 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None

[74082.153014] IPv6: ADDRCONF(NETDEV_CHANGE): eno16777736: link becomes ready


学习自:

高俊峰《循序渐进Linux》

本文出自 “赵东伟的博客” 博客,请务必保留此出处http://zhaodongwei.blog.51cto.com/4233742/1874169

Linux命令(23):demsg命令-显示开机信息

标签:demsg命令

原文地址:http://zhaodongwei.blog.51cto.com/4233742/1874169

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!