Debian dmesg中硬件检测信息有哪些

在Debian系统中,dmesg命令用于显示内核环缓冲区的消息,这些消息包括硬件检测信息、驱动程序加载信息、系统启动信息等。以下是一些常见的硬件检测信息类别:

1. CPU信息

  • CPU型号和频率
    [    0.000000] Linux version 5.10.0-14-amd64 (debian-kernel@lists.debian.org) (gcc version 11.2.0 (Debian 11.2.0-10)) #1 SMP Debian 5.10.82-1 (2022-01-30)
    [    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.10.0-14-amd64 root=UUID=your-uuid ro quiet
    [    0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
    [    0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
    [    0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
    [    0.000000] x86/fpu: xstate_offset[2]:  576, xstate_sizes[2]:  256
    [    0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'compacted' format.
    

2. 内存信息

  • 内存大小和类型
    [    0.000000] Memory: 16388M/17408M available (8M kernel code, 1356M rwdata, 336M rodata, 256M init, 447M bss, 2288M reserved, 0K highmem)
    [    0.000000] SLUB: HWalign=64, Size=1.00MB, MinObjects=12, CPUs=8, Nodes=1
    

3. 硬盘和存储设备

  • 硬盘型号和分区信息
    [    0.000000] scsi host0: uas
    [    0.000000] sd 0:0:0:0: [sda] Attached SCSI disk
    [    0.000000] sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500GB/466GiB)
    [    0.000000] sd 0:0:0:0: [sda] Write Protect is off
    [    0.000000] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
    [    0.000000] sd 0:0:0:0: [sda] Assuming drive cache: write through
    

4. 网络设备

  • 网卡型号和驱动信息
    [    0.000000] e1000e: Intel Corporation 82574L Gigabit Network Connection (rev 02)
    [    0.000000] e1000e 0000:00:19.0 eth0: registered PHB Device 0000:00:19.0
    [    0.000000] e1000e 0000:00:19.0 eth0: enabling device (0000 -> 0002)
    [    0.000000] e1000e 0000:00:19.0 eth0: (PCI Express:2.5GT/s:Width:x1) 00:1c:29:xx:xx:xx
    [    0.000000] e1000e 0000:00:19.0 eth0: Intel(R) PRO/1000 Network Connection
    [    0.000000] e1000e 0000:00:19.0 eth0: MAC Address: xx:xx:xx:xx:xx:xx
    

5. 显示设备

  • 显卡型号和驱动信息
    [    0.000000] [drm] Initializing kms for intel_device@pci:0000:00:02.0
    [    0.000000] i915 0000:00:02.0: enabling device (0000 -> 0002)
    [    0.000000] i915 0000:00:02.0: stepping 9, 144MHz, Revision 0x000a
    [    0.000000] i915 0000:00:02.0: Register space opened by pid 1
    

6. 其他硬件设备

  • USB设备、声卡、键盘等
    [    0.000000] usbcore: registered new interface driver usbfs
    [    0.000000] usbcore: registered new interface driver hub
    [    0.000000] usbcore: registered new device driver usb
    [    0.000000] usb 1-1: new full-speed USB device number 2 using xhci_hcd
    [    0.000000] usb 1-1: New USB device found, idVendor=046d, idProduct=c52b
    [    0.000000] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [    0.000000] usb 1-1: Product: M-Flex Mouse
    [    0.000000] usb 1-1: Manufacturer: Logitech
    

查看dmesg信息

你可以使用以下命令来查看dmesg的输出:

dmesg

或者使用lessmore来分页查看:

dmesg | less

或者使用grep来过滤特定信息:

dmesg | grep -i "usb"

通过这些信息,你可以了解系统的硬件配置和状态,有助于故障排查和系统优化。