Centos7查看系统 CPU 核数

1、查看 CPU  型号

dmidecode -s processor-version

2、查看 CPU 的详细信息

cat /proc/cpuinfo

3、查看逻辑cpu的个数

cat /proc/cpuinfo | grep "processor" |wc -l

注意:一般我们说服务器是几核CPU说的是逻辑CPU个数。

4、查看cpu是几核

cat /proc/cpuinfo | grep "cores"|uniq

5、查看物理cpu个数

cat /proc/cpuinfo | grep "physical id" | sort | uniq|wc -l

转自:https://www.cnblogs.com/zhangmingcheng/p/8334406.html

原文地址:https://www.cnblogs.com/longchengruoxi/p/12765362.html