- 具有相同core id的CPU是同一个core的超线程。 Any cpu with the same core id are hyper-threads in the same core.
- 具有相同physical id的cpu是同一个CPU封装的线程或核心。Any cpu with the same physical id are threads or cores in the same physical socket.
物理CPU个数如下所示:
cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l
每个物理CPU中core的个数(即核数):
cat /proc/cpuinfo | grep "cpu cores" | uniq
逻辑CPU的个数如下所示:
cat /proc/cpuinfo | grep "processor" | wc -l