Linux常用命令
查看CPU个数
cat /proc/cpuinfo | grep "physical id" | uniq | wc -l
**uniq命令:删除重复行;wc –l命令:统计行数**
查看CPU核数
cat /proc/cpuinfo | grep "cpu cores" | uniq
cpu cores : 4
查看CPU型号
cat /proc/cpuinfo | grep 'model name' |uniq
model name : Intel(R) Xeon(R) CPU E5630 @ 2.53GHz
总结:该服务器有2个4核CPU,型号Intel(R) Xeon(R) CPU E5630 @ 2.53GHz
查看内存
查看内存总数
cat /proc/meminfo | grep MemTotal
MemTotal: 32941268 kB //内存32G
查看硬盘
查看硬盘大小
fdisk -l | grep Disk
Disk /dev/cciss/c0d0: 146.7 GB, 146778685440 bytes