AIX 查看服务器CPU个数

简介: 系统中有很多命令可以查看cpu的个数,但是哪个命令输出的是逻辑cpu个数,哪个又是物理cpu个数呢?      从AIX5.3起,系统引入了SMT(Simultaneous multi-threading:同步多线程)的功能,其允许两个处理线程在同一颗处理器上运行,对操作系统而言,一颗物理处理器逻辑上会成为两个处理单元(逻辑处理器)。

系统中有很多命令可以查看cpu的个数,但是哪个命令输出的是逻辑cpu个数,哪个又是物理cpu个数呢?
      从AIX5.3起,系统引入了SMT(Simultaneous multi-threading:同步多线程)的功能,其允许两个处理线程在同一颗处理器上运行,对操作系统而言,一颗物理处理器逻辑上会成为两个处理单元(逻辑处理器)。也就是说,在SMT功能启用的情况下,逻辑cpu个数是物理cpu个数的两倍,而在SMT功能禁用的情况下,逻辑cpu个数与物理cpu个数相等。
      下面我们介绍如何通过各种命令检查系统中的物理cpu和逻辑cpu的个数。
1. smtctl
        # smtctl 

This system is SMT capable.
This system supports up to 4 SMT threads per processor.
SMT is currently enabled.
SMT boot mode is not set.
SMT threads are bound to the same physical processor.

proc0 has 4 SMT threads.
Bind processor 0 is bound with proc0
Bind processor 1 is bound with proc0
Bind processor 2 is bound with proc0
Bind processor 3 is bound with proc0

proc4 has 4 SMT threads.
Bind processor 4 is bound with proc4
Bind processor 5 is bound with proc4
Bind processor 6 is bound with proc4
Bind processor 7 is bound with proc4

proc8 has 4 SMT threads.
Bind processor 8 is bound with proc8
Bind processor 9 is bound with proc8
Bind processor 10 is bound with proc8
Bind processor 11 is bound with proc8

proc12 has 4 SMT threads.
Bind processor 12 is bound with proc12
Bind processor 13 is bound with proc12
Bind processor 14 is bound with proc12
Bind processor 15 is bound with proc12

proc16 has 4 SMT threads.
Bind processor 16 is bound with proc16
Bind processor 17 is bound with proc16
Bind processor 18 is bound with proc16
Bind processor 19 is bound with proc16

proc20 has 4 SMT threads.
Bind processor 20 is bound with proc20
Bind processor 21 is bound with proc20
Bind processor 22 is bound with proc20
Bind processor 23 is bound with proc20

proc24 has 4 SMT threads.
Bind processor 24 is bound with proc24
Bind processor 25 is bound with proc24
Bind processor 26 is bound with proc24
Bind processor 27 is bound with proc24

proc28 has 4 SMT threads.
Bind processor 28 is bound with proc28
Bind processor 29 is bound with proc28
Bind processor 30 is bound with proc28
Bind processor 31 is bound with proc28

proc32 has 4 SMT threads.
Bind processor 32 is bound with proc32
Bind processor 33 is bound with proc32
Bind processor 34 is bound with proc32
Bind processor 35 is bound with proc32

proc36 has 4 SMT threads.
Bind processor 36 is bound with proc36
Bind processor 37 is bound with proc36
Bind processor 38 is bound with proc36
Bind processor 39 is bound with proc36

proc40 has 4 SMT threads.
Bind processor 40 is bound with proc40
Bind processor 41 is bound with proc40
Bind processor 42 is bound with proc40
Bind processor 43 is bound with proc40

proc44 has 4 SMT threads.
Bind processor 44 is bound with proc44
Bind processor 45 is bound with proc44
Bind processor 46 is bound with proc44
Bind processor 47 is bound with proc44

proc48 has 4 SMT threads.
Bind processor 48 is bound with proc48
Bind processor 49 is bound with proc48
Bind processor 50 is bound with proc48
Bind processor 51 is bound with proc48

proc52 has 4 SMT threads.
Bind processor 52 is bound with proc52
Bind processor 53 is bound with proc52
Bind processor 54 is bound with proc52
Bind processor 55 is bound with proc52

proc56 has 4 SMT threads.
Bind processor 56 is bound with proc56
Bind processor 57 is bound with proc56
Bind processor 58 is bound with proc56
Bind processor 59 is bound with proc56

proc60 has 4 SMT threads.
Bind processor 60 is bound with proc60
Bind processor 61 is bound with proc60
Bind processor 62 is bound with proc60
Bind processor 63 is bound with proc60
可以看到,该系统具有SMT能力且当前SMT功能已启用。16个物理cpu对应着64个逻辑cpu。
      
2. bindprocessor
        # bindprocessor -q
        The available processors are:  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
      可以看到可用逻辑cpu个数是64个(0-63)。
3. prtconf
        # prtconf

System Model: IBM,8205-E6C
Machine Serial Number: ******
Processor Type: PowerPC_POWER7
Processor Implementation Mode: POWER 7
Processor Version: PV_7_Compat
Number Of Processors: 16
             ——16个物理cpu
Processor Clock Speed: 3550 MHz
CPU Type: 64-bit
Kernel Type: 64-bit
LPAR Info: 1 02-8EE62
Memory Size: 31488 MB
Good Memory Size: 31488 MB
Platform Firmware level: AL740_126
Firmware Version: IBM,AL740_126
Console Login: enable
Auto Restart: true
Full Core: false
NX Crypto Acceleration: Not Capable
 
Network Information
        Host Name: autochinaebs
        IP Address: 192.168.1.123
        Sub Netmask: 255.255.255.0
        Gateway: 192.168.1.1
        Name Server: 192.168.1.221
        Domain Name: hand-china.com
 
Paging Space Information
        Total Paging Space: 32768MB
        Percent Used: 1%
 
Volume Groups Information
============================================================================== 
Active VGs
============================================================================== 
appvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk2            active            1999        38          00..00..00..00..38
============================================================================== 
 
rootvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk0            active            558         412         111..41..37..111..112
hdisk1            active            558         418         111..47..37..111..112
============================================================================== 
 
INSTALLED RESOURCE LIST


The following resources are installed on the machine.
+/- = Added or deleted from Resource List.
*   = Diagnostic support not available.
        
  Model Architecture: chrp
  Model Implementation: Multiple Processor, PCI bus
        
+ sys0                                                              System Object
+ sysplanar0                                                        System Planar
* vio0                                                              Virtual I/O Bus
* vsa0             U8205.E6C.028EE62-V1-C0                          LPAR Virtual Serial Adapter
* vty0             U8205.E6C.028EE62-V1-C0-L0                       Asynchronous Terminal
* pci8             U78AA.001.WZSKF78-P1                             PCI Express Bus
+ fcs2             U78AA.001.WZSKF78-P1-C6-T1                       8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
* fcnet2           U78AA.001.WZSKF78-P1-C6-T1                       Fibre Channel Network Protocol Device
+ fscsi2           U78AA.001.WZSKF78-P1-C6-T1                       FC SCSI I/O Controller Protocol Device
* sfwcomm2         U78AA.001.WZSKF78-P1-C6-T1-W0-L0                 Fibre Channel Storage Framework Comm
+ fcs3             U78AA.001.WZSKF78-P1-C6-T2                       8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
* fcnet3           U78AA.001.WZSKF78-P1-C6-T2                       Fibre Channel Network Protocol Device
+ fscsi3           U78AA.001.WZSKF78-P1-C6-T2                       FC SCSI I/O Controller Protocol Device
* sfwcomm3         U78AA.001.WZSKF78-P1-C6-T2-W0-L0                 Fibre Channel Storage Framework Comm
* pci7             U78AA.001.WZSKF78-P1                             PCI Express Bus
* pci6             U78AA.001.WZSKF78-P1                             PCI Express Bus
+ fcs0             U78AA.001.WZSKF78-P1-C4-T1                       8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
* fcnet0           U78AA.001.WZSKF78-P1-C4-T1                       Fibre Channel Network Protocol Device
+ fscsi0           U78AA.001.WZSKF78-P1-C4-T1                       FC SCSI I/O Controller Protocol Device
* hdisk2           U78AA.001.WZSKF78-P1-C4-T1-W50050768030474FC-L0  MPIO IBM 2076 FC Disk
* sfwcomm0         U78AA.001.WZSKF78-P1-C4-T1-W0-L0                 Fibre Channel Storage Framework Comm
+ fcs1             U78AA.001.WZSKF78-P1-C4-T2                       8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
* fcnet1           U78AA.001.WZSKF78-P1-C4-T2                       Fibre Channel Network Protocol Device
+ fscsi1           U78AA.001.WZSKF78-P1-C4-T2                       FC SCSI I/O Controller Protocol Device
* sfwcomm1         U78AA.001.WZSKF78-P1-C4-T2-W0-L0                 Fibre Channel Storage Framework Comm
* pci5             U78AA.001.WZSKF78-P1                             PCI Express Bus
* pci4             U78AA.001.WZSKF78-P1                             PCI Express Bus
+ ent0             U78AA.001.WZSKF78-P1-C2-T1                       4-Port Gigabit Ethernet PCI-Express Adapter (e414571614102004)
+ ent1             U78AA.001.WZSKF78-P1-C2-T2                       4-Port Gigabit Ethernet PCI-Express Adapter (e414571614102004)
+ ent2             U78AA.001.WZSKF78-P1-C2-T3                       4-Port Gigabit Ethernet PCI-Express Adapter (e414571614102004)
+ ent3             U78AA.001.WZSKF78-P1-C2-T4                       4-Port Gigabit Ethernet PCI-Express Adapter (e414571614102004)
* pci3             U78AA.001.WZSKF78-P1                             PCI Express Bus
* pci2             U78AA.001.WZSKF78-P1                             PCI Express Bus
* pci1             U78AA.001.WZSKF78-P1                             PCI Express Bus
* pci9             U78AA.001.WZSKF78-P1                             PCI Bus
+ usbhc0           U78AA.001.WZSKF78-P1                             USB Host Controller (33103500)
+ usbhc1           U78AA.001.WZSKF78-P1                             USB Host Controller (33103500)
+ usbhc2           U78AA.001.WZSKF78-P1                             USB Enhanced Host Controller (3310e000)
* pci0             U78AA.001.WZSKF78-P1                             PCI Express Bus
+ sissas0          U78AA.001.WZSKF78-P1-T9                          PCIe x4 Planar 3Gb SAS Adapter
* sas0             U78AA.001.WZSKF78-P1-T9                          Controller SAS Protocol
* sfwcomm4                                                          SAS Storage Framework Comm
+ hdisk0           U78AA.001.WZSKF78-P2-D1                          SAS Disk Drive (300000 MB)
+ hdisk1           U78AA.001.WZSKF78-P2-D2                          SAS Disk Drive (300000 MB)
+ ses0             U78AA.001.WZSKF78-P2-Y1                          SAS Enclosure Services Device
+ ses1             U78AA.001.WZSKF78-P2-Y1                          SAS Enclosure Services Device
* sata0            U78AA.001.WZSKF78-P1-T9                          Controller SATA Protocol
* cd0              U78AA.001.WZSKF78-P2-D9                          SATA Optical Drive
+ L2cache0                                                          L2 Cache
+ mem0                                                              Memory
+ proc0                                                             Processor
+ proc4                                                             Processor
+ proc8                                                             Processor
+ proc12                                                            Processor
+ proc16                                                            Processor
+ proc20                                                            Processor
+ proc24                                                            Processor
+ proc28                                                            Processor
+ proc32                                                            Processor
+ proc36                                                            Processor
+ proc40                                                            Processor
+ proc44                                                            Processor
+ proc48                                                            Processor
+ proc52                                                            Processor
+ proc56                                                            Processor
+ proc60                                                            Processor


可以看到系统中有8个逻辑cpu。




查看cpu是几个核心的:

A:物理逻辑个数 A=pmcycles -m

B:CPU物理个数  B=prtconf|grep Processors

C:核数         C=A/B



相关文章
|
4月前
|
弹性计算 ice
阿里云4核8G云服务器配置价格:热门ECS实例及CPU处理器型号说明
阿里云2025年4核8G服务器配置价格汇总,涵盖经济型e实例、计算型c9i等热门ECS实例,CPU含Intel Xeon及AMD EPYC系列,月费159元起,年付低至1578元,按小时计费0.45元起,实际购买享折扣优惠。
1332 1
|
4月前
|
弹性计算 定位技术 数据中心
阿里云服务器配置选择方法:付费类型、地域及CPU内存配置全解析
阿里云服务器怎么选?2025最新指南:就近选择地域,降低延迟;长期使用选包年包月,短期灵活选按量付费;企业选2核4G5M仅199元/年,个人选2核2G3M低至99元/年,高性价比爆款推荐,轻松上云。
452 11
|
4月前
|
弹性计算
阿里云ECS云服务器8核16G配置收费价格,多种ECS实例CPU及费用清单
阿里云8核16G云服务器价格因实例类型而异。计算型c9i约743元/月,一年6450元(7折);通用算力型u1仅673元/月,一年4225元(5.1折)。实际价格享时长折扣,详情见ECS官网。
|
5月前
|
存储 缓存 数据挖掘
阿里云轻量应用服务器“CPU优化型”配置介绍、费用价格说明
阿里云轻量应用服务器推出CPU优化型,提供更强计算性能,2核4GB起,最高16核64GB,全系支持200Mbps带宽。适用于企业级应用、数据库、游戏服务器等高算力场景,保障稳定高效运行。
666 1
|
4月前
|
弹性计算 运维 安全
阿里云轻量应用服务器与云服务器ECS啥区别?新手帮助教程
阿里云轻量应用服务器适合个人开发者搭建博客、测试环境等低流量场景,操作简单、成本低;ECS适用于企业级高负载业务,功能强大、灵活可扩展。二者在性能、网络、镜像及运维管理上差异显著,用户应根据实际需求选择。
399 10
|
4月前
|
运维 安全 Ubuntu
阿里云渠道商:服务器操作系统怎么选?
阿里云提供丰富操作系统镜像,涵盖Windows与主流Linux发行版。选型需综合技术兼容性、运维成本、安全稳定等因素。推荐Alibaba Cloud Linux、Ubuntu等用于Web与容器场景,Windows Server支撑.NET应用。建议优先选用LTS版本并进行测试验证,通过标准化镜像管理提升部署效率与一致性。
|
4月前
|
弹性计算 ice
阿里云4核8g服务器多少钱一年?1个月和1小时价格,省钱购买方法分享
阿里云4核8G服务器价格因实例类型而异,经济型e实例约159元/月,计算型c9i约371元/月,按小时计费最低0.45元。实际购买享折扣,1年最高可省至1578元,附主流ECS实例及CPU型号参考。
572 8
|
4月前
|
存储 监控 安全
阿里云渠道商:云服务器价格有什么变动?
阿里云带宽与存储费用呈基础资源降价、增值服务差异化趋势。企业应结合业务特点,通过阶梯计价、智能分层、弹性带宽等策略优化成本,借助云监控与预算预警机制,实现高效、可控的云资源管理。
|
4月前
|
弹性计算 运维 安全
区别及选择指南:阿里云轻量应用服务器与ECS云服务器有什么区别?
阿里云轻量应用服务器适合个人开发者、学生搭建博客、测试环境,易用且性价比高;ECS功能更强大,适合企业级应用如大数据、高流量网站。根据需求选择:轻量入门首选,ECS专业之选。
346 2

热门文章

最新文章