linux 硬件诊断命令 dmesg

1. dmesg 显示所有的硬件信息

    # dmesg|more 或者 #dmesg |less

2.如果要显示某一个硬件 如tty,usb ,eth0,cpu,spi,i2c,memory等

  #dmesg |grep spi

[    0.090000] rt2880-pinmux pinctrl: found group selector 13 for spis
[    0.290000] rt2880-pinmux pinctrl: found group selector 8 for spi
[    0.290000] rt2880-pinmux pinctrl: found group selector 12 for spi cs1
[    0.290000] rt2880-pinmux pinctrl: request pin 7 (io7) for 10000b00.spi
[    0.290000] rt2880-pinmux pinctrl: request pin 8 (io8) for 10000b00.spi
[    0.290000] rt2880-pinmux pinctrl: request pin 9 (io9) for 10000b00.spi
[    0.290000] rt2880-pinmux pinctrl: request pin 10 (io10) for 10000b00.spi
[    0.290000] rt2880-pinmux pinctrl: request pin 6 (io6) for 10000b00.spi
[    0.290000] spi-mt7621 10000b00.spi: sys_freq: 193333333
[    0.300000] m25p80 spi32766.0: w25q256 (32768 Kbytes)
[    0.300000] m25p80 spi32766.0: using chunked io
[    0.310000] 4 ofpart partitions found on MTD device spi32766.0
[    0.310000] Creating 4 MTD partitions on "spi32766.0":
 

#dmesg |grep i2c

root@Widora:~# dmesg | grep i2c
[   12.660000] i2c /dev entries driver
[   12.900000] rt2880-pinmux pinctrl: found group selector 4 for i2c
[   12.900000] rt2880-pinmux pinctrl: request pin 4 (io4) for 10000900.i2c
[   12.900000] rt2880-pinmux pinctrl: request pin 5 (io5) for 10000900.i2c
[   12.900000] i2c-mt7621 10000900.i2c: clock 100 kHz
[   13.000000] *******Enter codec_wm8960_i2c_probe********

root@Widora:~# dmesg | grep usb
[    0.220000] drivers/phy/phy-ralink-usb.c:ralink_usb_phy_probe[336]
[    0.220000] drivers/phy/phy-ralink-usb.c:ralink_usb_phy_probe[350]
[    4.100000] usbcore: registered new interface driver usbfs
[    4.100000] usbcore: registered new interface driver hub
[    4.110000] usbcore: registered new device driver usb
[    4.410000] usb usb1: no of_node; not parsing pinctrl DT
[    4.520000] usb usb2: no of_node; not parsing pinctrl DT
[    4.600000] usbcore: registered new interface driver usb-storage
[   13.600000] usbcore: registered new interface driver uvcvideo

root@Widora:~# dmesg | grep wifi
[   22.980000] |------------Widora wifi driver--version:1.4-------------|

root@Widora:~# dmesg | grep tty
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    0.240000] console [ttyS0] disabled
[    0.240000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 28, base_baud = 2500000) is a 16550A
[    0.250000] console [ttyS0] enabled
[    0.270000] 10000d00.uart1: ttyS1 at MMIO 0x10000d00 (irq = 29, base_baud = 2500000) is a 16550A
[    0.280000] 10000e00.uart2: ttyS2 at MMIO 0x10000e00 (irq = 30, base_baud = 2500000) is a 16550A

root@Widora:~# dmesg | grep memory
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Early memory node ranges
[    0.510000] Freeing unused kernel memory: 196K (8031f000 - 80350000)

root@Widora:~# dmesg | grep cpu
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0

你可能感兴趣的:(Linux,linux命令)