Linux系统如何判断CPU是双核还是单核
点击次数:29 次 发布日期:2008-11-21 23:26:29 作者:源代码网
|
但是对于双核的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. 源代码网供稿. |
