+ -
当前位置:首页 → 问答吧 → 如何判断CPU是双核还是单核

如何判断CPU是双核还是单核

时间:2007-12-27

来源:互联网

Linux下可以在/proc/cpuinfo中看到每个cpu的详细信息。

但是对于双核的cpu,在cpuinfo中会看到两个cpu。常常会让人误以为是两个单核的cpu。

其实应该通过Physical Processor ID来区分单核和双核。而Physical Processor ID可以从cpuinfo或者dmesg中找到

例如
root@debian:~:0# dmesg | grep CPU | grep ID
CPU0: Initial APIC ID: 0, Physical Processor ID: 0
CPU1: Initial APIC ID: 1, Physical Processor ID: 0
CPU2: Initial APIC ID: 6, Physical Processor ID: 3
CPU3: Initial APIC ID: 7, Physical Processor ID: 3

可以看到,这台机器有两个双核的CPU,ID分别是0和3。

作者: redking   发布时间: 2007-12-27

[root@workstation rhel6]# dmesg | grep CPU | grep ID
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 0
这个是我4核的CPU,求解?

作者: FlyingDuan   发布时间: 2011-07-22