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

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux命令(23):demsg命令-显示开机信息相关的知识,希望对你有一定的参考价值。

demsg命令


功能说明

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

  dmesg [选项]

命令参数

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

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

示例

    使用tail查看最后10条信息

[[email protected] ~]# 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查看关于网卡设备的信息

[[email protected] ~]# 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命令-显示开机信息的主要内容,如果未能解决你的问题,请参考以下文章

dmesg命令

linux dmesg命令(显示开机信息)

android dmesg 在哪

linux设置开机服务自动启动/关闭自动启动命令

Ubuntu开机自动进入命令行,如何回到图形化界面?

linux基本内容显示命令