0

We're managing 2 production server. One is RHEL4 and other one is CentOS5.

In order to find the load average, I need to determine how many cores the server has got. I used the command $ grep cores /proc/cpuinfo to find the no. of cores available.

Output from RHEL4:

cpu cores       : 2
cpu cores       : 2
cpu cores       : 2
cpu cores       : 2

Output from CentOS5:

cpu cores       : 1
cpu cores       : 1
cpu cores       : 1
cpu cores       : 1

My question is, from the output of RHEL4 above, I could see cpu cores : 2 with 4 entries. So, is it 8 cores or 4 cores? What does 2 mean here?

In case of CentOS5, it is evident that it is 4 cores.

I also referred this link: Howto: Linux detect or find out a dual-core cpu

Gnanam
  • 1,439
  • 13
  • 26
  • 32

2 Answers2

1

if see in #cat /proc/cpuinfo the count start from 0,1,2,3,4. In you RHEL 4 box you have 4 core and your Cent OS 2 core from the value.

Rajat
  • 3,329
  • 21
  • 29
  • I believe, by *count*, you mean the `processor` here, which appears as the first element. In both servers, I can see entries for 0,1,2,3. How do you say CentOS has got 2 core? Can you explain little bit about how would you find? Am little confused, when you say CentOS has got only 2 cores here. I thought it is 4 cores. – Gnanam Dec 10 '10 at 06:54
  • hi Gnanam, it show 2 time entry of you core so on that base :) – Rajat Dec 10 '10 at 07:20
0

[root@example ~]# grep cores /proc/cpuinfo cpu cores : 2 cpu cores : 2 [root@example ~]#

[root@example ~]# cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Core(TM)2 Duo CPU E8335 @ 2.66GHz stepping : 6 cpu MHz : 415.293 cache size : 6144 KB physical id : 0 siblings : 2 core id : 0 cpu cores : 2 apicid : 0 initial 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 mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht constant_tsc pni ssse3 bogomips : 830.58 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management:

processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Core(TM)2 Duo CPU E8335 @ 2.66GHz stepping : 6 cpu MHz : 415.293 cache size : 6144 KB physical id : 0 siblings : 2 core id : 1 cpu cores : 2 apicid : 1 initial 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 mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht constant_tsc pni ssse3 bogomips : 1070.73 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management:

Rajat
  • 3,329
  • 21
  • 29