Portal Home > Knowledgebase > Articles Database > Linux: How to tell how many processors/cores my server has?


Linux: How to tell how many processors/cores my server has?




Posted by Max Renn, 01-06-2008, 02:39 PM
Hello I have a new server. Is there any way, from the command line if possible, to tell how many processors and cores my new server has? Thank you

Posted by uberhostNET, 01-06-2008, 02:47 PM
cat /proc/cpuinfo Cheers, Rick

Posted by dexxtreme, 01-06-2008, 02:48 PM
You can get a lot of information by typing "cat /proc/cpuinfo".

Posted by Max Renn, 01-06-2008, 02:52 PM
Thanks! I am supposed to have two processors and four cores. From the following does this look like it's not the case? [root@server ~]# cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Xeon(R) CPU 5140 @ 2.33GHz stepping : 8 cpu MHz : 2331.151 cache size : 4096 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss constant_tsc pni ds_cpl bogomips : 4670.30

Posted by HoundOfTheSmith, 01-06-2008, 05:00 PM
If that's the entire output then you only have a single processor/core. With multiple processors/cores you should see something like (4 processor/core box): processor : 0 vendor_id : GenuineIntel <---SNIP---> processor : 1 vendor_id : GenuineIntel <---SNIP---> processor : 2 vendor_id : GenuineIntel <---SNIP---> processor : 3 <---SNIP--->

Posted by Max Renn, 01-06-2008, 05:04 PM
Thanks HoundOFTheSmith

Posted by whmcsguru, 01-07-2008, 01:13 AM
Not necessarily if you're not running a proper kernel, you will ONLY see one core/processor on a multi-processor server, and it will only USE one processor/core. To determine what kernel you're using, as root: It should look something like If you see SMP at the end of that kernel version, you should see the full processor usage, and should be fine. Otherwise, this would be your problem. Only SMP kernels can handle multi core processors, and multi-processors (including HT AFAIK), others will register single core, single processor

Posted by dexxtreme, 01-07-2008, 10:57 AM
With just about any Xeon made within the past 5 years will show up as at least 2 processors, whether it be due to Hyperthreading or due to multiple cores. (The 5140 is a dual-core chip.) As linux-tech said, the correct kernel must be installed in order to take advantage of multiple processors/cores. Since all recent linux distros support multiple processors out of the box, I'm not even sure how the server was installed with the wrong kernel (unless it was done from an improperly configured pre-built image).

Posted by Max Renn, 01-07-2008, 11:02 AM
Thanks for your reply. I would be pretty confident they have simply given me an incorrect server. They're quite incompetent...

Posted by derek.bodner, 01-07-2008, 11:35 AM
I wouldn't. A Xeon 5140 is most definitely a dual core chip. what's the output of uname?

Posted by Bilco105, 01-07-2008, 12:09 PM
The 5140 is a dual core chip, as your install is only showing one physical/logical processor, you are running the non-SMP kernel. Upgrade to an SMP grade kernel and your second CPU will be utilised. However, you do not have 2 physical processor chips as promised by your host

Posted by Max Renn, 01-07-2008, 12:19 PM
Thanks for the replies. The output of uname is "Linux".

Posted by FHDave, 01-07-2008, 12:31 PM
uname -a" is what you want.

Posted by Max Renn, 01-07-2008, 12:34 PM
Apologies, there is the full output - Linux server.hostago.com 2.6.9-67.ELsmp #1 SMP Fri Nov 16 12:48:03 EST 2007 i686 i686 i386 GNU/Linux

Posted by fog, 01-07-2008, 03:02 PM
So you do have SMP support... That's odd. What's also odd is that you've got 2.6.9 as a kernel version... We're up to 2.6.23, so that's quite old.

Posted by dexxtreme, 01-07-2008, 04:16 PM
That's a RedHat Enterprise 5 kernel, so that is the most recent version with all of RedHat's patches. However, I don't know why there is only one processor showing up. The only other possibility I can think of is possibly a BIOS setting.

Posted by domainworldaccess, 01-07-2008, 04:37 PM
I believe it is also possible that you are on a VM rather than dedicated system, which has only been allocated 1 CPU of the machine. Not sure that would trick the cat /proc/cpuinfo output though. You could install and run lshw and see what you wind up with... cd /tmp wget http://dag.wieers.com/rpm/packages/l...l4.rf.i386.rpm rpm -i lshw* rm -rf lshw* lshw | more Usually the first page of output has all of the relevant CPU data including both installed, and max possible configurations. Good luck! Joe

Posted by domainworldaccess, 01-07-2008, 04:41 PM
2.6.9.x is also running in RHEL / CentOS 4.6

Posted by Bilco105, 01-08-2008, 05:34 AM
Check /var/log/dmesg Does your kernel stack show it recognising more than 1 CPU?

Posted by Max Renn, 01-08-2008, 10:35 AM
Thanks for all the replies. It turns out I was only given one processor. A couple of things this host has done has been unacceptable, so I'm moving host. Thanks again for the help.

Posted by uberhostNET, 01-08-2008, 03:11 PM
Please do let us know where you move to and how your experience goes.

Posted by whmcsguru, 01-08-2008, 03:44 PM
Even better would be knowing WHO you're moving from, as this kind of stuff is something that should be avoided at all prices.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
***************.net (Views: 678)
Linux reseller needed (Views: 652)

Language: