I did a google search and came up with this command: cat /proc/cpuinfo | egrep "core id|physical id" | tr -d "\n" | sed s/physical/\\nphysical/g | grep -v ^$ | sort | uniq | wc -l
2
but it looks like more than 2 cores here
[root@root]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.60GHz
stepping : 3
cpu MHz : 3591.356
cache size : 2048 KB
physical id : 0
siblings : 2
runqueue : 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 sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm nx lm
bogomips : 7156.53
processor : 1
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.60GHz
stepping : 3
cpu MHz : 3591.356
cache size : 2048 KB
physical id : 0
siblings : 2
runqueue : 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 sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm nx lm
bogomips : 7156.53
processor : 2
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.60GHz
stepping : 3
cpu MHz : 3591.356
cache size : 2048 KB
physical id : 3
siblings : 2
runqueue : 2
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 sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm nx lm
bogomips : 7156.53
processor : 3
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Xeon(TM) CPU 3.60GHz
stepping : 3
cpu MHz : 3591.356
cache size : 2048 KB
physical id : 3
siblings : 2
runqueue : 2
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 sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm nx lm
bogomips : 7156.53
I dio
How do I find out the number of cores I have
How do I find out the number of cores I have
You have 2 physical cores - count the number of distinct "physical id" numbers you have. Each one of those physical cores has 2 HT threads - from "siblings: 2". So, 2 physical cores, 4 logical ones.
-
- Posts: 87
- Joined: 2011/10/07 11:32:23
Re: How do I find out the number of cores I have
So I have two physical sockets and 4 cores? This is required for Oracle database licensing.
Re: How do I find out the number of cores I have
Actually, I cannot tell what you have! I'm not sure I was correct before about two cores, 4 threads.
Re: How do I find out the number of cores I have
Looking at the cpu info here is what I see:
There are physical id 0 and 3 telling me that there are 2 physical CPU Sockets.
There is no core id field so the CPU is not a multi core CPU.
It lists siblings 2 and there is the ht flag so you have a hyper-threading CPU.
This link has good info on the cpuinfo file but it is not have everything: http://www.richweb.com/cpu_info
There are physical id 0 and 3 telling me that there are 2 physical CPU Sockets.
There is no core id field so the CPU is not a multi core CPU.
It lists siblings 2 and there is the ht flag so you have a hyper-threading CPU.
This link has good info on the cpuinfo file but it is not have everything: http://www.richweb.com/cpu_info