linux开机启动信息dmesg命令的了解

dmesg命令介绍

dmesg命令用于打印Linux系统开机启动信息,kernel会将开机信息存储在ring buffer中。您若是开机时来不及查看信息,可利用dmesg来查看(print or control the kernel ring buffer)。开机信息亦保存在/var/log/dmesg的文件里。某些硬件设备(比如七号信令卡、语音卡之类)在安装的时候,通常会安装驱动程序(内核模块),会打印一些信息,就可以通过dmesg命令来查看。

查看CPU信息

[root@localhost ~]# dmesg | grep CPU
[    0.000000] smpboot: Allowing 128 CPUs, 127 hotplug CPUs
[    0.000000] setup_percpu: NR_CPUS:5120 nr_cpumask_bits:128 nr_cpu_ids:128 nr_node_ids:1
[    0.000000] PERCPU: Embedded 33 pages/cpu @ffff88003c600000 s97048 r8192 d29928 u262144
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=128, Nodes=1
[    0.000000] 	RCU restricting CPUs from NR_CPUS=5120 to nr_cpu_ids=128.
[    0.000378] CPU: Physical Processor ID: 0
[    0.000993] mce: CPU supports 8 MCE banks
[    0.025533] smpboot: CPU0: Intel(R) Core(TM) i3-7100 CPU @ 3.90GHz (fam: 06, model: 9e, stepping: 09)
[    0.025593] core: CPUID marked event: 'cpu cycles' unavailable
[    0.025594] core: CPUID marked event: 'instructions' unavailable
[    0.025595] core: CPUID marked event: 'bus cycles' unavailable
[    0.025595] core: CPUID marked event: 'cache references' unavailable
[    0.025596] core: CPUID marked event: 'cache misses' unavailable
[    0.025597] core: CPUID marked event: 'branch instructions' unavailable
[    0.025597] core: CPUID marked event: 'branch misses' unavailable
[    0.033382] Brought up 1 CPUs
[    0.538216] microcode: CPU0 sig=0x906e9, pf=0x1, revision=0x3a

查看网卡信息

[root@localhost ~]# dmesg | grep eth0
[    1.232618] e1000 0000:02:01.0 eth0: (PCI:66MHz:32-bit) 00:0c:29:4c:d0:26
[    1.232623] e1000 0000:02:01.0 eth0: Intel(R) PRO/1000 Network Connection

查看硬盘信息

[root@localhost ~]# dmesg | grep sda
[    1.019060] sd 0:0:0:0: [sda] 41943040 512-byte logical blocks: (21.4 GB/20.0 GiB)
[    1.019080] sd 0:0:0:0: [sda] Write Protect is off
[    1.019082] sd 0:0:0:0: [sda] Mode Sense: 61 00 00 00
[    1.019102] sd 0:0:0:0: [sda] Cache data unavailable
[    1.019103] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    1.019549]  sda: sda1 sda2
[    1.019695] sd 0:0:0:0: [sda] Attached SCSI disk
[    2.918955] XFS (sda1): Mounting V5 Filesystem
[    3.024957] XFS (sda1): Ending clean mount
发布了44 篇原创文章 · 获赞 6 · 访问量 6324

猜你喜欢

转载自blog.csdn.net/annita2019/article/details/104270562