查看服务器型号、序列号:

1
dmidecode | grep "System Information" -A9 | egrep "Manufacturer|Product|Serial"

查看内存使用情况:

1
free -h

Linux 查看内存的插槽数,已经使用多少插槽.每条内存多大

1
dmidecode|grep -A5 "Memory Device"|grep Size|grep -v Range

Linux 查看内存的频率

1
dmidecode|grep -A16 "Memory Device"|grep 'Speed'

查看内存厂家:

1
dmidecode -t memory | grep Manufacturer

查看CPU型号

1
cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c

查看物理CPU个数

1
cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l

查看CPU核心数

1
cat /proc/cpuinfo| grep "cpu cores"| uniq

查看逻辑CPU个数

1
cat /proc/cpuinfo| grep "processor"| wc -l

查看硬盘和分区分布

1
lsblk

查看硬盘和分区的详细信息

1
fdisk -l

查询主板

1
dmidecode |grep -A16 "System Information$"