This discussion is archived
2 Replies Latest reply: Feb 19, 2013 2:39 AM by Dude! RSS

How do I find the number of physical CPUs , number of cores in OEL ?

Tom Newbie
Currently Being Moderated
In RHEL , it is easy to find the number of Physical CPUs and the number of cores within each CPU
-- Ouput from Red Hat Enterprise Linux 5.4
-- This a real machine. Not a VM

$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 46
model name      : Intel(R) Xeon(R) CPU           X7550  @ 2.00GHz
stepping        : 6
cpu MHz         : 1995.048
cache size      : 18432 KB
physical id     : 0              --------------> This will give info on the physical CPU
siblings        : 8
core id         : 0
cpu cores       : 8              --------------> This will give the number of cores within a CPU
apicid          : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
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 syscall nx rdtscp lm constant_tsc ida nonstop_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr popcnt lahf_lm
bogomips        : 3990.09
clflush size    : 64
cache_alignment : 64
address sizes   : 44 bits physical, 48 bits virtual
power management: [8]
Output from Oracle Linux . Physical CPU Id and Number of Cores info is missing.

-- Output from Oracle Enterprise Linux 6.3
-- This is a virtual machine created using Virtual Box
-- Processor ID , number of cores is missing

$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 42
model name      : Intel(R) Core(TM) i7-2760QM CPU @ 2.40GHz
stepping        : 7
cpu MHz         : 2298.627
cache size      : 6144 KB
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx rdtscp lm constant_tsc up rep_good nopl pni monitor ssse3 lahf_lm
bogomips        : 4597.25
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:
Is this the expected output in Oracle Enterprise Linux ? If so, how can I find the number of Physical CPUs and the number of cores within a Physical CPU in OEL?

Is this info missing because I am running OEL in a virtual machine ?
  • 1. Re: Processor ID , number of cores is missing in OEL
    Bjoern Rost Oracle ACE Director
    Currently Being Moderated
    Oracle Linux behaves exactly like Red Hat in this matter an /proc/cpuinfo can be used for that. I guess this is because you have set up VirtualBox to only assign one virtual CPU to your guest Linux.
    processor     : 0
    vendor_id     : AuthenticAMD
    cpu family     : 15
    model          : 33
    model name     : Dual Core AMD Opteron(tm) Processor 275
    stepping     : 2
    cpu MHz          : 1000.000
    cache size     : 1024 KB
    physical id     : 0
    siblings     : 2
    core id          : 0
    cpu cores     : 2
    apicid          : 0
    initial apicid     : 0
    fpu          : yes
    fpu_exception     : yes
    cpuid level     : 1
    wp          : yes
    flags          : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow rep_good extd_apicid pni lahf_lm cmp_legacy
    bogomips     : 1994.47
    TLB size     : 1024 4K pages
    clflush size     : 64
    cache_alignment     : 64
    address sizes     : 40 bits physical, 48 bits virtual
    power management: ts fid vid ttp
    Another example is this one, OEL 5.6 inside of VirtualBox but with 2 virtual CPUs assigned:
    [root@oel56proxy ~]# cat /proc/cpuinfo 
    processor       : 0
    vendor_id       : GenuineIntel
    cpu family      : 6
    model           : 23
    model name      : Intel(R) Core(TM)2 Duo CPU     P8600  @ 2.40GHz
    stepping        : 10
    cpu MHz         : 2064.652
    cache size      : 6144 KB
    physical id     : 0
    siblings        : 2
    core id         : 0
    cpu cores       : 2
    apicid          : 0
    fdiv_bug        : no
    hlt_bug         : no
    f00f_bug        : no
    coma_bug        : no
    fpu             : yes
    fpu_exception   : yes
    cpuid level     : 5
    wp              : yes
    flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc pni ssse3 lahf_lm
    bogomips        : 4129.30
    
    processor       : 1
    vendor_id       : GenuineIntel
    cpu family      : 6
    model           : 23
    model name      : Intel(R) Core(TM)2 Duo CPU     P8600  @ 2.40GHz
    stepping        : 10
    cpu MHz         : 2064.652
    cache size      : 6144 KB
    physical id     : 0
    siblings        : 2
    core id         : 1
    cpu cores       : 2
    apicid          : 1
    fdiv_bug        : no
    hlt_bug         : no
    f00f_bug        : no
    coma_bug        : no
    fpu             : yes
    fpu_exception   : yes
    cpuid level     : 5
    wp              : yes
    flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc pni ssse3 lahf_lm
    bogomips        : 7494.15
    I have not tried to replicate this with a VM that only has one vCPU assigned but I guess that is why you only see one CPU and no processor_id and so on.

    Bjoern
  • 2. Re: How do I find the number of physical CPUs , number of cores in OEL ?
    Dude! Guru
    Currently Being Moderated
    Access to hardware resources are controlled by VirtualBox. You can modify the number of CPU's VirtualBox should provide to a virtual machine in the SYSTEM Processor settings of the virtual machine. The guest OS will then report accordingly as the previous post outlined.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points