查看cpu核数

查看有几个物理CPU

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

查看cpu核数(物理核)

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

查看CPU线程

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

查看CPU总核数(逻辑核)

grep 'model name' /proc/cpuinfo | wc -l

posted @ 2020-12-29 16:52  风儿飘  阅读(316)  评论(0编辑  收藏  举报