Chinaunix首页 | 论坛 | 博客
  • 博客访问: 101015280
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: LINUX

2008-03-21 22:01:39

来源:赛迪网    作者:阳光

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。

阅读(188) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~