Walker News

How To Differentiate Between Single And Multi-core CPU In Linux

With the advanced of processor technology, not only the CPU size is getting smaller and compact, so as the processing power has increased tremendously.

After the Intel Core Duo processor came into the market in earlier 2006, now you could also easily find a Intel Core 2 Quad processor in the multi-core arsenal!
Now, suppose that you’ve a Intel server running Red Hat Enterprise Linux, how could you differentiate or detect the multi-core processors and single core processors are installed?

(Rebooting is of course one of the effective way, but what if there is NO window time to reboot the Linux server or there is no server profile that you could rely on?) Thus, here are the two ways that I’ve personally tested:

Using the dmesg Linux command

At the Linux command prompt, enter dmesg | less and then search for “Physical Processor ID”.
  • RHEL4 U5 (kernel 2.6.9-42.ELsmp) differentiates or detects the multi-core CPU by reporting the “Physical Processor ID” and “Processor Core ID”, i.e. Physical Processor ID refers to the physical processor seated in CPU slot of a motherboard and Processor Core ID refers to the embedded CPU cores.

For example, the following dmesg reports first unit of Intel Core 2 Duo CPU as
  • CPU0: Physical Processor ID: 0 – CPU0: Processor Core ID: 0
  • CPU1: Physical Processor ID: 0 – CPU1: Processor Core ID: 1
CPU0: Physical Processor ID: 0
CPU0: Processor Core ID: 0
CPU0: Initial APIC ID: 0
CPU: After all inits, caps:        bfebf3ff 20000000 00000000 00000040
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... OK.
CPU0: Intel(R) Xeon(R) CPU            5160  @ 3.00GHz stepping 06
per-CPU timeslice cutoff: 3519.22 usecs.
task migration cache decay timeout: 4 msecs.
Booting processor 1/1 eip 3000
CPU 1 irqstacks, hard=c03ef000 soft=c03cf000
Initializing CPU#1
Calibrating delay using timer specific routine.. 5999.99 BogoMIPS (lpj=2999999)
CPU: After generic identify, caps: bfebfbff 20000000 00000000 00000000
CPU: After vendor identify, caps:  bfebfbff 20000000 00000000 00000000
monitor/mwait feature present.
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L2 cache: 4096K
CPU1: Physical Processor ID: 0
CPU1: Processor Core ID: 1
CPU1: Initial APIC ID: 1
CPU: After all inits, caps:        bfebf3ff 20000000 00000000 00000040
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#1.
CPU1: Intel(R) Xeon(R) CPU            5160  @ 3.00GHz stepping 06
Booting processor 2/6 eip 3000
CPU 2 irqstacks, hard=c03f0000 soft=c03d0000
Initializing CPU#2
Calibrating delay using timer specific routine.. 6000.14 BogoMIPS (lpj=3000070)
CPU: After generic identify, caps: bfebfbff 20000000 00000000 00000000
CPU: After vendor identify, caps:  bfebfbff 20000000 00000000 00000000
monitor/mwait feature present.
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L2 cache: 4096K
CPU2: Physical Processor ID: 3
CPU2: Processor Core ID: 6
CPU2: Initial APIC ID: 6
CPU: After all inits, caps:        bfebf3ff 20000000 00000000 00000040
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#2.
CPU2: Intel(R) Xeon(R) CPU            5160  @ 3.00GHz stepping 06
Booting processor 3/7 eip 3000
CPU 3 irqstacks, hard=c03f1000 soft=c03d1000
Initializing CPU#3
Calibrating delay using timer specific routine.. 6000.09 BogoMIPS (lpj=3000045)
CPU: After generic identify, caps: bfebfbff 20000000 00000000 00000000
CPU: After vendor identify, caps:  bfebfbff 20000000 00000000 00000000
monitor/mwait feature present.
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L2 cache: 4096K
CPU3: Physical Processor ID: 3
CPU3: Processor Core ID: 7
CPU3: Initial APIC ID: 7
CPU: After all inits, caps:        bfebf3ff 20000000 00000000 00000040
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#3.
CPU3: Intel(R) Xeon(R) CPU            5160  @ 3.00GHz stepping 06
Total of 4 processors activated (24003.76 BogoMIPS).

Using the server management console
Most of the branded Intel servers come with server management toolkits to monitor server health/performance and reports the basic system information. For example, the HP NetServer used to have an small LCD module for such purpose.

How to install RHEL4 on HP NetServer LH3000?

If you’re away from the physical server, the HP Integrated Lights-Out (iLO) is another way to draft basic server profile, such as number of processors installed, multi-core or single core processor, server serial number, number of RAM slots, total RAM installed, etc.

HP Integrated Lights-out or iLO is kind of Remote Server Management toolkits.


Custom Search

2017  •  Privacy Policy