wq242424

linux查看cpu个数,线程数及cpu型号

2018-07-10 16:27  丨o聽乄雨o丨  阅读(8260)  评论(0编辑  收藏  举报

1.查看CPU逻辑id

grep \'physical id\' /proc/cpuinfo | sort -u

physical id : 0
physical id : 1

2.查看物理CPU个数

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

2

3.查看每个物理CPU中core的个数

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

cpu cores : 10

4.查看逻辑CPU的个数

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

40

5.查看总线程数量

$ grep \'processor\' /proc/cpuinfo | sort -u | wc -l

40

6.查看CPU信息(型号)

$ cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c

40  Intel(R) Xeon(R) CPU E5-2640 v4 @ 2.40GHz

 

引用自https://blog.csdn.net/qq_20641565/article/details/72832273

分类:

技术点:

相关文章:

  • 2022-01-02
  • 2021-12-28
  • 2021-12-05
  • 2021-09-27
  • 2021-12-20
  • 2021-11-11
  • 2021-10-12
猜你喜欢
  • 2021-11-23
  • 2021-10-06
  • 2021-11-17
  • 2021-12-23
  • 2021-11-29
  • 2021-11-30
  • 2021-11-27
相关资源
相似解决方案