Linux查看系统cpu个数、核心数、线程数
1.查看物理cpu个数 grep 'physical id' /proc/cpuinfo | sort -u | wc -l 1 2.查看核心数量 grep 'core id' /proc/cpuinfo | sort -u | wc -l 1 3.查看线程数 grep 'processor' /proc/cpuinfo | sort -u | wc -l 1 实例: [root@test1 ~]# grep 'physical id' /proc/cpuinfo | sort -u | wc -l 2 [root@test1 ~]# grep 'core id' /proc/cpuinfo | sort -u | wc -l 8 [root@test1 ~]# grep 'processor' /proc/cpuinfo | sort -u | wc -l 32 此服务器有2个CPU,每个CPU有8个核心,每个核心4线程,共32线程。 通过dmidecode可以查看cpu型号,根据型号也可以查到这个CPU的具体参数。 [root@qtrac1 ~]# dmidecode -s processor-version Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz
相关推荐
bluecarrot 2020-11-23
Attend 2020-11-17
ZHAICAN 2020-11-16
codedecode 2020-11-14
zhangbingb 2020-11-12
ykmail 2020-11-11
futurezone 2020-11-06
rikeyone 2020-11-04
橄榄 2020-11-04
WenCoo 2020-10-31
liuyuchen 2020-10-27
ROES 2020-10-24
Gexrior 2020-10-22
ZHAICAN 2020-10-20
风语者 2020-10-16
zhongguomin 2020-10-16
净无邪 2020-10-15