- 论坛徽章:
- 0
|
原帖由 diyxyj 于 2008-10-31 22:38 发表
下面我们介绍如何通过各种命令检查系统中的物理cpu和逻辑cpu的个数。
1. smtctl
# smtctl
This system is SMT capable.
SMT is currently enabled.
SMT boot mode is not set.
SMT threads are bound to the same physical processor.
proc0 has 2 SMT threads.
Bind processor 0 is bound with proc0
Bind processor 1 is bound with proc0
proc2 has 2 SMT threads.
Bind processor 2 is bound with proc2
Bind processor 3 is bound with proc2
proc4 has 2 SMT threads.
Bind processor 4 is bound with proc4
Bind processor 5 is bound with proc4
proc6 has 2 SMT threads.
Bind processor 6 is bound with proc6
Bind processor 7 is bound with proc6
可以看到,该系统具有SMT能力且当前SMT功能已启用。4个物理cpu对应着8个逻辑cpu。
2. bindprocessor
# bindprocessor -q
The available processors are: 0 1 2 3 4 5 6 7
可以看到可用逻辑cpu个数是8个(0-7)。
3. prtconf
# prtconf
System Model: IBM,9131-52A
Machine Serial Number: 0677A5G
Processor Type: PowerPC_POWER5
Number Of Processors: 4 ==》物理cpu有4个
Processor Clock Speed: 1648 MHz
CPU Type: 64-bit
Kernel Type: 64-bit
LPAR Info: 1 06-77A5G
4.lsdev
# lsdev -Cc processor
proc0 Available 00-00 Processor
proc2 Available 00-02 Processor
proc4 Available 00-04 Processor
proc6 Available 00-06 Processor
可以看到系统中有4个物理cpu。
5.vmstat
# vmstat
System configuration: lcpu=8 mem=7936MB
kthr memory page faults cpu
----- ----------- ------------------------ ------------ -----------
r b avm fre re pi po fr sr cy in sy cs us sy id wa
1 1 428238 41599 0 0 0 13 25 0 40 1639 182 0 0 99
可以看到系统中有8个逻辑cpu。
很全啊 |
|