当前位置:   article > 正文

Ubuntu 查看CPU信息

ubuntu 查看cpu

Ubuntu 查看cpu个数及核心数

总核数 = 物理CPU个数 X 每颗物理CPU的核数
总逻辑CPU数 = 物理CPU个数 X 每颗物理CPU的核数 X 超线程数
  • 1
  • 2

查看CPU型号

cat /proc/cpuinfo | grep 'model name' |uniq
# model name	: Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz

grep "model name" /proc/cpuinfo |awk -F ':' '{print $NF}'
# 输出如下
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25

查看物理CPU个数

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

查看每个物理CPU中core的个数(即核数)

cat /proc/cpuinfo| grep "cpu cores"| uniq
  • 1

查看逻辑CPU的个数

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

查看线程数

grep 'processor' /proc/cpuinfo | sort -u | wc -l
  • 1

注意,此处查看的线程数是总的线程数,可以理解为逻辑cpu的数量

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/330493
推荐阅读
相关标签
  

闽ICP备14008679号