1. 查看cpu型号
cat /proc/cpuinfo | grep "model name" | uniq
2. 查看cpu物理个数
cat /proc/cpuinfo | grep "physical id" | uniq | wc -l
3.使用PyCPUID模块
import pycpuid print "has SSE2:", pycpuid.HAS_SSE2 print "all availabe features:", pycpuid.features() print pycpuid.vendor(1) print "brand string:", pycpuid.brand_string()
4. 查看内存信息(显示插槽个数和每个插槽里内存条的大小)
dmidecode -t memory | grep Size
5. 查看内存条厂家
dmidecode -t memory | grep Manufacturer
6、 查看硬盘信息
fdisk -l | grep "Disk /dev/sd"
命令查看: hdparm
hdparm -i /dev/sda
另一个命令: apt-get install smartmontools
smartctl -a /dev/sda
7. 查看主板信息
dmidecode |grep -A16 "System Information$"