Linux : total number of cores on a system

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
royjaydAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
rindiConnect With a Mentor Commented:
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
 
rindiCommented:
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
 
royjaydAuthor Commented:
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
A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

 
royjaydAuthor Commented:
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
 
rindiCommented:
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
 
royjaydAuthor Commented:
ok thanks
Any comments on my post : ID: 39266350
0
 
rindiCommented:
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
 
royjaydAuthor Commented:
>>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
 
rindiCommented:
That the x3675 has 6 cores is pure coincidence.
0
 
royjaydAuthor Commented:
>>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
 
rindiCommented:
The coincidence is that it has 6 cores and that lscpu mentions CPU family 6.
0
 
royjaydAuthor Commented:
ok.
so overall there are 2 CPUS with 6 cores in each
so 12 cores all together in my system,
am i correct ?
0
 
royjaydAuthor Commented:
$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
 
rindiCommented:
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
 
serialbandCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.