Solved

Linux : total number of cores on a system

Posted on 2013-06-21
15
341 Views
Last Modified: 2013-07-08
hi experts

My requirment is to find the total number of 'cores' in my system.

when i do
$ lscpu

This is what i see ::

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                2
On-line CPU(s) list:   0,1
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             2
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 44
Stepping:              2
CPU MHz:               3059.000
BogoMIPS:              6118.00
Hypervisor vendor:     VMware
Virtualization type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              12288K
NUMA node0 CPU(s):     0,1

Does this mean 2 cpus with each CPU having 6 cores ?
Does the 'cpu family' mean cores ?

Any help will be greatly appreciated
thanks
0
Comment
Question by:royjayd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 7
15 Comments
 
LVL 88

Expert Comment

by:rindi
ID: 39266272
No. It means 2 CPU's, each with one core. But as this is in VMware this is virtual and doesn't reflect the true hardware. CPU family is "stepping", something similar to CPU version.
0
 

Author Comment

by:royjayd
ID: 39266306
ok thanks

>>But as this is in VMware this is virtual and doesn't reflect the true hardware

So are you saying that it may or may not be 2 cores ?
0
 

Author Comment

by:royjayd
ID: 39266350
also you said
>>It means 2 CPU's, each with one core

Here is why i think each cpu has 6 cores

$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 44
model name      : Intel(R) Xeon(R) CPU           X5675  @ 3.07GHz
stepping        : 2
cpu MHz         : 3059.000
cache size      : 12288 KB
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse t...
bogomips        : 6118.00
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 44
model name      : Intel(R) Xeon(R) CPU           X5675  @ 3.07GHz
stepping        : 2
cpu MHz         : 3059.000
cache size      : 12288 KB
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse t...
bogomips        : 6118.00
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:

Open in new window


Next search for the model name

Intel(R) Xeon(R) CPU           X5675  @ 3.07GHz


its points you to the model webpage ::
http://ark.intel.com/products/52577/

and it does say # of Cores  = 6


Is my understanding correct ?


thanks.
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 88

Expert Comment

by:rindi
ID: 39266400
What the real CPU is in your PC I can't say. VMware, like the other hypervisors, simulates a PC to your guest OS, and that simulated PC can look completely different from the original.

If your PC's CPU has 2 cores the hypervisor is now presenting those 2 cores as 2 separate CPU's , and not as a single 2 core CPU.
0
 

Author Comment

by:royjayd
ID: 39266415
ok thanks
Any comments on my post : ID: 39266350
0
 
LVL 88

Expert Comment

by:rindi
ID: 39266455
No. The 6 is just the version of the CPU. It hasn't got anything to do with the number of cores.Within VMware you can assign how many cores or virtual CPU's should be presented to the VM.
0
 

Author Comment

by:royjayd
ID: 39266470
>>The 6 is just the version of the CPU
Yes i got that.

what i mean is
i took the model of the CPU which is
"Intel(R) Xeon(R) CPU           X5675  @ 3.07GHz "

and searched in google and this is what i found
http://ark.intel.com/products/52577/

Its the Intel website and in that page it says
# of Cores  6
# of Threads  12
thx.
0
 
LVL 88

Expert Comment

by:rindi
ID: 39266498
That the x3675 has 6 cores is pure coincidence.
0
 

Author Comment

by:royjayd
ID: 39266527
>>That the x3675 has 6 cores is pure coincidence.

Dint understand what you meant there.

The model X5675  does have 6 cores right ?
Thats what the website says.
0
 
LVL 88

Expert Comment

by:rindi
ID: 39266696
The coincidence is that it has 6 cores and that lscpu mentions CPU family 6.
0
 

Author Comment

by:royjayd
ID: 39266789
ok.
so overall there are 2 CPUS with 6 cores in each
so 12 cores all together in my system,
am i correct ?
0
 
LVL 88

Accepted Solution

by:
rindi earned 375 total points
ID: 39266850
I don't know. To get the actual hardware of your PC you'll have to look at the Host OS, and not the VM's running within that host. Many servers also include a management module (iDRAC if it is a Dell, or ILO on HP's) that will also give you that info.
0
 

Author Comment

by:royjayd
ID: 39267075
$uname -a
Linux r01022 2.6.32-358.2.1.el6.x86_64 #1 SMP Wed Feb 20 12:17:37 EST 2013 x86_64 x86_64 x86_64 GNU/Linux

>>. To get the actual hardware of your PC you'll have to look at the Host OS

Is there a command  which i can do to find that?


thanks
0
 
LVL 88

Expert Comment

by:rindi
ID: 39267148
What is your host OS? If it is VMware vSphere HyperVisor (ESXi), you should see that info from within the utility which you use to create VM's. There should be an option that shows you the hardware ESXi is running on somewhere there. Probably also the the VMware Console shows you the hardware. I can't give details as I myself don't have an ESXi server at hand.
0
 
LVL 29

Expert Comment

by:serialband
ID: 39267175
Try:
nproc

If you have an older system without nproc, try

cat /proc/cpuinfo | grep “^processor” | wc -l

That should tell you how many CPU cores your system sees.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question