1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| //查看内存插槽数 dmidecode|grep 'Memory Device'|wc -l
//查看内存插槽上有几条内存 dmidecode|grep -P -A5 "Memory\s+Device"|grep Size|grep -v Installed|wc -l
//查看插槽上的内存大小 dmidecode|grep -P -A5 "Memory\s+Device"|grep Size|grep -v Installed
//查看最大支持内存数 dmidecode|grep -P 'Maximum\s+Capacity'
//查看槽位上内存的速率,没插就是unknown dmidecode|grep -A16 "Memory Device"|grep 'Speed'|grep -v Unknown
//查看服务器机型 dmidecode |grep -A 5 "System Information" |grep "Product Name"
|