一、檢視伺服器硬體資訊
dmidecode|grep "System Information" -A9|egrep "Manufacturer|Product|Serial" //檢視伺服器型号、序列号
dmidecode |grep -A16 "System Information$" //檢視主機闆型号
dmidecode -t bios //檢視BIOS資訊
dmidecode -t memory | head -45 | tail -23 //檢視記憶體槽及記憶體條
dmesg | grep -i Ethernet //檢視網卡資訊
lspci | head -10 //檢視pci資訊,即主機闆所有硬體槽資訊
二、檢視CPU資訊
cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c //檢視cpu型号
grep 'physical id' /proc/cpuinfo | sort | uniq | wc -l //檢視系統中實際實體CPU的數量(實體)
cat /proc/cpuinfo |grep 'processor'|wc -l //系統中實際實體CPU的數量(核數)
cat /proc/cpuinfo |grep "cores"|uniq //檢視每個實體CPU中core的個數(即核數)
cat /proc/cpuinfo |grep MHz|uniq //檢視CPU的主頻
cat /proc/cpuinfo | head -20 //檢視CPU的詳細資訊
getconf LONG_BIT //檢視cpu運作模式
cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l //結果大于0, 說明支援64bit計算. lm指long mode, 支援lm則是64bit
三、檢視記憶體資訊
dmidecode -t memory | head -45 | tail -24 //檢視記憶體硬體資訊
dmidecode|grep -P 'Maximum\s+Capacity' //最大支援多少記憶體
dmidecode |grep -A 5 "Memory Device"|grep "Size"|grep -v "Range" //檢視記憶體的插槽數,已經使用多少插槽.每條記憶體多大
dmidecode|grep -A16 "Memory Device"|grep 'Speed' //檢視記憶體的頻率
轉載于:https://www.cnblogs.com/reaperhero/p/10250881.html