CPU型号
grep "model name" /proc/cpuinfo |awk -F ':' '{print $NF}'
数量
lscpu |grep "CPU socket" |awk '{print $NF}' 或
lscpu |grep "Socket" |awk '{print $NF}'
每个CPU的核数
lscpu |grep "Core(s) per socket" |awk '{print $NF}'
内存卡槽数量
dmidecode -t memory |grep "Number Of Devices" |awk '{print $NF} 或
dmidecode -t memory |grep "Associated Memory Slots" |awk '{print $NF}'
内存数量
dmidecode -t memory |grep -A16 "Memory Device$" |grep 'Size:.*MB' |wc –l
内存支持类型dmidecode -t memory |grep -A16 "Memory Device$" |grep "Type:"
每个内存频率dmidecode -t memory |grep -A16 "Memory Device$" |grep "Speed:"
每个内存大小dmidecode -t memory |grep -A16 "Memory Device$" |grep "Size:"
硬盘硬盘数量、大小
fdisk -l |grep "Disk /dev/sd"
硬盘型号hdparm -i /dev/sda |grep "Model"
————————————————
版权声明:本文为CSDN博主「zhengchaooo」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/zhengchaooo/article/details/79500055