Ubuntu 拾忆二,cpu

cpu基本信息查询

1 cpu数量

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

1.1 查看物理cpu的个数

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

1.2 查看逻辑cpu的个数

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

2 每个cpu是几核

more /proc/cpuinfo |grep "physical id"|grep "0"|wc -l

2.1 查看cpu是几核

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

3 查看cpu的主频

cat /proc/cpuinfo |grep MHz|uniq

    原文作者:一曲广陵散
    原文地址: https://www.jianshu.com/p/113532430d7a
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞