linux查看硬件信息
dmidecode | grep -i 'serial number'//查看主板序列号
dmesg |grep -i MADT //查看主板芯片
cpu信息
dmidecode -t processor
cat /proc/cpuinfo
dmesg | grep -i 'cpu'
内存信息
dmidecode | grep -i mem
vmstat
dmesg | grep mem
cat /proc/meminfo
free -m
网卡信息
dmesg | grep -i 'eth'
cat /etc/sysconfig/hwconf | grep -i eth
lspci | grep -i 'eth'
显卡信息
lspci |grep -i 'VGA'
dmesg | grep -i 'VGA'
cat /proc/bus/input/devices //查看键盘和鼠标
cat /proc/bus/usb/devices //查看USB设
cat /proc/interrupts //查看各设备的中断请求(IRQ)
du -chs * //查看当前文件大小及文件总大小
hdparm /dev/sda //显示硬盘的柱面、磁头、扇区数
/dev/sda:
readonly = 0 (off)
readahead = 256 (on)
geometry = 3916/255/63, sectors = 62914560, start = 0
hdparm -t /dev/sda //评估硬盘的读取效率
/dev/sda:
Timing buffered disk reads: 194 MB in 3.04 seconds = 63.76 MB/sec
hdparm -T /dev/sda //评估硬盘快取的读取效率
/dev/sda:
Timing cached reads: 6940 MB in 2.00 seconds = 3473.79 MB/sec
hdparm -C /dev/sda //检测IDE硬盘的电源管理模式
/dev/sda:
drive state is: standby
hdparm -I /dev/hdc //检测硬盘的硬件规格
/dev/hdc:
Model=WDC WD3202ABYS-01B7A0, FwRev=02.03B02, SerialNo=WD-WCAT1A093500
Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=50
BuffType=unknown, BuffSize=16384kB, MaxMultSect=16, MultSect=16
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2
AdvancedPM=no WriteCache=enabled
Drive conforms to: Unspecified: ATA/ATAPI-1 ATA/ATAPI-2 ATA/ATAPI-3 ATA/ATAPI-4 ATA/ATAPI-5 ATA/ATAPI-6 ATA/ATAPI-7
* signifies the current active mode