2017年5月17日 星期三

查詢Linux主機CPU(實體CPU與Core數量)和RAM(插了幾修記憶體)

//CPU Core數量(包含Hyper Thread, HT)
cat /proc/cpuinfo|grep "model name"|wc -l

//實體CPU型號與數量
dmidecode -t processor|grep "Version:"

//Memory總容量(此方法不適用有裝Xen且有VM佔用Memory的情況)
cat /proc/meminfo |grep "Total"

//有幾條實體Memory(此方法可以看出實際Memory數量)
dmidecode -t memory|grep "Size:"

//Memory 詳細資訊:
dmidecode -t 17  | more   // 等同 dmidecode --type memory、 dmidecode --type 17

沒有留言: