CentOS7查看CPU核数

1. 查看CPU型号

 cat /proc/cpuinfo | grep name | sort | uniq

2. 查看核数和逻辑CPU数目

# CPU 个数
cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l

# 核数
cat /proc/cpuinfo | grep "core id" | sort | uniq | wc -l

# 线程
cat /proc/cpuinfo | grep "processor" | sort | uniq | wc -l


3. 也可以直接lscpu

lscpu

```
![在这里插入图片描述](https://img-blog.csdnimg.cn/d661b9e334f54355beaae9ca83c37897.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBARnJleUZhbg==,size_15,color_FFFFFF,t_70,g_se,x_16)

    原文作者:FreyFan
    原文地址: https://blog.csdn.net/fanchw/article/details/122604613
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞