7 commands to check and collect Linux hardware information

  

On Linux systems, there are a number of commands that can be used to query the hardware information of the host. Some commands are only for specific hardware components, such as CPU, memory, and some commands can query multiple hardware information.

This article is simply to let everyone understand the basic command to use to query hardware information, including lscpu, hwinfo, lshw, lspci, lsblk, lsusb and so on.

1. lscpu is used to query CPU information

  1. [root@devops ~]# lscpu
  2. Architecture: x86_64
  3. CPU Op-mode(s): 32-bit, 64-bit
  4. Byte Order: Little Endian
  5. CPU(s): 1
  6. On-line CPU(s) List: 0
  7. Thread(s) per core: 1
  8. Core(s) per socket: 1
  9. CPU socket(s): 1
  10. NUMA node(s): 1
  11. Vendor ID: GenuineIntel
  12. CPU family: 6
  13. Model: 45
  14. Stepping: 7
  15. CPU MHz: 2194.842
  16. BogoMIPS: 4389.68
  17. Hypervisor vendor: Xen
  18. Virtualization type: full
  19. L1d cache: 32K
  20. L1i cache: 32K
  21. L2 cache: 256K
  22. L3 cache: 15360K
  23. NUMA node0 CPU(s): 0

    2. lshw Display hardware information table

    this Make the application universal, it can list a variety of different hardware parameters through personal needs: CPU, memory, hard disk, USB controller, lshw card, etc., essentially extract the corresponding hardware information from different files in the /proc directory. .

    Follow the steps below to install the lshw tool, and then you can use it.

    1. wget http://ezix.org/software/files/lshw-B.02.14.tar.gz
    2. tar -zxvf lshw-B.02.14.tar .gz
    3. cd lshw-B.02.14
    4. make && make install
    5. Example:
    6. [root@devops lshw-B.02.14 ]# lshw -short
    7. H/W path Device Class Description
    8. =========================== ===========================
    9. system HVM domU
    10. /0 bus Motherboard
      < Li> /0/0 memory 96KiB BIOS
    11. /0/1 processor Intel(R) Xeon(R) CPU E5-2430 0 @ 2.20GHz
    12. /0/2 memory System Memory < Br>
    13. /0/2/0 memory 512MiB DIMM RAM
    14. /0/2/1 memory 512MiB DIMM RAM
    15. /0/3 memory 96KiB BIOS
    16. /0/4 processor CPU
    17. /0/5 Memory System Memory
    18. /0/6 memory
    19. /0/7 memory
Copyright © Windows knowledge All Rights Reserved