First, we will introduce a script that yahoo once used to collect hardware information. You can view and download hwconfig here. It is executed on one of my systems as follows:
View Code BASH
12345678910111213141516171819
[root@jay-linux test-programs]# ./hwconfig Summary: QCI QSSC-S4R, 1 x 000 2.27GHz, 47.1GB / 48GB 1067MHz DDR3System: QCI QSSC-S4RProcessors: 1(of 4) x 000 2.27GHz 133MHz FSB (HT enabled, 10 cores, 80 threads)Memory: 47.1GB / 48GB 1067MHz DDR3 == 12 x 4GB, 52 x emptyDisk: sda (host4): 1.0TB (44%) JBOD == 1 x WDC-WD1002FAEX-00Z3A0Disk-Control: host0: Disk-Control: host1: Disk-Control: host2: Disk-Control: host3: Disk-Control: host4: Disk-Control: host5: Network: eth7 (igb): 60:eb:69:21:29:b7, 1000Mb/s <full-duplex>Network: eth8 (igb): 60:eb:69:21:29:b4, no carrierNetwork: eth9 (igb): 60:eb:69:21:29:b6, no carrierNetwork: eth10 (igb): 60:eb:69:21:29:b5, no carrierOS: RHEL Server 6.3(Santiago), Linux 3.5.0-rc6+ x86_64, 64-bitBIOS: Intel QSSC-S4R.QCI.01.00.W008.111120102041 11/11/2010Hostname: jay-linux
This script is very good and is highly recommended for use! The only drawback is that the hardware is changing with each other. This script has not found the latest update, and some of the latest hardware may not be mentioned in the script.
Because it is often at the underlying level of the Linux system and sometimes closely related to the hardware, the following Linux commands are collected to view the hardware information of the system. These commands have been tested and used on my RHEL6.3 system.
View CPU information: cat/proc/cpuinfo
View memory information: cat/proc/meminfo
View Board information: cat/proc/pci
View PCI information: lspci (more intuitive than cat/proc/pci)
View USB device: lsusb
View the keyboard and mouse: cat/proc/bus/input/devices
View system hard disk information and usage: fdisk-l and df-h
View interrupt requests of each device (IRQ): cat/proc/interrupts
View system architecture and kernel version: uname-
View hardware information, including bios, cpu, memory, and other information: dmidecode
View hardware information/print kernel information: dmesg | less
For the proc file system (/proc/), there are many records of the specific information of the system:
CPU info host CPU Information
Dma host DMA channel information
Filesystems File System Information
Interrupts host interruption Information
Ioprots host I/O port number information
Meminfo host memory information
Version Linux memory version