zoukankan      html  css  js  c++  java
  • linux查看CPU内核信息

    linux查看CPU内核信息命令:cat /proc/cpuinfo

    processor    : 0
    vendor_id    : GenuineIntel
    cpu family    : 6
    model        : 62
    model name    : Intel(R) Xeon(R) CPU E5-2609 v2 @ 2.50GHz
    stepping    : 4
    cpu MHz        : 2493.953
    cache size    : 10240 KB
    physical id    : 0
    siblings    : 4
    core id        : 0
    cpu cores    : 4
    apicid        : 0
    initial apicid    : 0
    fpu        : yes
    fpu_exception    : yes
    cpuid level    : 13
    wp        : yes
    flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
    bogomips    : 4987.90
    clflush size    : 64
    cache_alignment    : 64
    address sizes    : 46 bits physical, 48 bits virtual
    power management:
    
    processor    : 1
    vendor_id    : GenuineIntel
    cpu family    : 6
    model        : 62
    model name    : Intel(R) Xeon(R) CPU E5-2609 v2 @ 2.50GHz
    stepping    : 4
    cpu MHz        : 2493.953
    cache size    : 10240 KB
    physical id    : 0
    siblings    : 4
    core id        : 1
    cpu cores    : 4
    apicid        : 2
    initial apicid    : 2
    fpu        : yes
    fpu_exception    : yes
    cpuid level    : 13
    wp        : yes
    flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
    bogomips    : 4987.90
    clflush size    : 64
    cache_alignment    : 64
    address sizes    : 46 bits physical, 48 bits virtual
    power management:
    ......

    属性说明:

    physical id:物理CPU的唯一标识ID
    core id:每个物理CPU中内核的唯一标识ID
    processor:当前逻辑CPU的唯一标识
    siblings:同一个物理CPU中逻辑CPU数量
    cpu cores:同一个物理CPU中内核数量
    #如果有两个逻辑CPU具有相同的”core id”,那么超线程是打开的(所有带有相同core id的逻辑CPU均位于同一个处理器内核上)
    model name:CPU型号

    # 总核数 = 物理CPU个数 * 每颗物理CPU的核数 
    # 总逻辑CPU数 = 物理CPU个数 * 每颗物理CPU的核数 * 超线程数

    简单命令:
    # 查看物理CPU个数
    cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l
    
    # 查看每个物理CPU中core的个数(即核数)
    cat /proc/cpuinfo| grep "cpu cores"| uniq
    
    # 查看逻辑CPU的个数
    cat /proc/cpuinfo| grep "processor"| wc -l


     
  • 相关阅读:
    System.BadImageFormatException: 未能加载文件或程序集""或它的某一个依赖项。试图加载格式不正确的程序。
    Win10中解决SYSTEM权限获取,删Windows old
    Jenkins配置MSBuild编译.net4.6的项目
    TeamViewer11的安全设置
    Jenkins配置的邮件无法发送的问题
    Jenkins 2.x版本修改启动端口号(Windows)
    Jenkins 2.x版本的安装步骤(Windows)
    CruiseControl.NET/CCNET安装包下载
    Jenkins+CCNET的另类部署图
    VisualSVN Server和Subversion的联系
  • 原文地址:https://www.cnblogs.com/mr-long/p/5841416.html
Copyright © 2011-2022 走看看