用以下命令可以查机器型号和CPU信息:
$ sudo dmidecode | grep "Product Name"
Product Name: ProLiant DL380 G6
$ sudo dmidecode | grep CPU
Version: Intel(R) Xeon(R) CPU E5540 @ 2.53GHz
Version: Intel(R) Xeon(R) CPU E5540 @ 2.53GHz
$ sudo dmidecode | grep Proc
Processor Information
Socket Designation: Proc 2
Type: Central Processor
Socket Designation: Processor 1 Internal L1 Cache
Socket Designation: Processor 2 Internal L1 Cache
Socket Designation: Processor 1 Internal L2 Cache
Socket Designation: Processor 2 Internal L2 Cache
Socket Designation: Processor 1 Internal L3 Cache
Socket Designation: Processor 2 Internal L3 Cache
$ sudo more /proc/cpuinfo | grep -i "model name"
model name : Intel(R) Xeon(R) CPU E5540 @ 2.53GHz
$ sudo more /proc/cpuinfo | grep -i "cpu cores"
cpu cores : 4
$ more /proc/cpuinfo | grep -i "cache size"
cache size : 8192 KB
$ more /proc/meminfo | grep -i memtotalMemTotal: 33003200 kB