LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-08-2015, 10:13 AM   #1
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Rep: Reputation: 49
How to get physical CPU count, cores per CPU, and CPU type on RHEL and CentOS


Hello everyone. What commands would I run on RHEL and CentOS servers to get
1) physical CPU count
2) cores per CPU
3) CPU type

Thanks in advance.
 
Old 01-08-2015, 10:26 AM   #2
sudowtf
Member
 
Registered: Nov 2013
Posts: 205

Rep: Reputation: 46
Code:
lscpu
 
1 members found this post helpful.
Old 01-08-2015, 10:29 AM   #3
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
Thanks. So I'm guessing, and correct me if i'm wrong, the Sockets output is #1, Cores per CPU is #2, but for #3 I see the Vendor ID line, but is there a way to have it tell me something like "Intel Xeon L1234 @ 3GHz" or something like that, maybe with another command?
 
Old 01-08-2015, 10:32 AM   #4
sudowtf
Member
 
Registered: Nov 2013
Posts: 205

Rep: Reputation: 46
Well my debian (lscpu v2.25.2) tells me this on line "Model Name" (next under "Model"), but my CentOS (lscpu v2.17.2) does not provide me this line at all. So i suppose it's a version issue.
 
Old 01-08-2015, 10:35 AM   #5
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
My model line just gives me a double digit number. Is there a different command I could run to give me the full processor model?
 
Old 01-08-2015, 10:39 AM   #6
sudowtf
Member
 
Registered: Nov 2013
Posts: 205

Rep: Reputation: 46
how about
Code:
grep 'model name' /proc/cpuinfo
also, don't assume the number "names" reported equals number of cores. I have a 4-core i7, but it shows 8 results, because each of the 4 cores are hyper-threaded.

Last edited by sudowtf; 01-08-2015 at 10:41 AM.
 
1 members found this post helpful.
Old 01-08-2015, 10:55 AM   #7
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
Thanks. I see the output from that shows the full model name. So sounds like I use lscpu for #1 and #2, then for #3 I can run that and just use the name it repeats, right?
 
Old 01-08-2015, 10:57 AM   #8
sudowtf
Member
 
Registered: Nov 2013
Posts: 205

Rep: Reputation: 46
sure.

or see if you can find an updated .rpm version of lscpu that does the job.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] High CPU load, but low CPU usage (high idle CPU) baffy Linux - Newbie 5 03-13-2013 09:24 AM
LXer: CPU Scaling On DragonFlyBSD, Ubuntu, CentOS/RHEL LXer Syndicated Linux News 0 12-12-2012 10:21 AM
[SOLVED] Control of CPU cores utilization on centos server, is it possible? Alan_SP Linux - Server 15 11-13-2012 05:17 AM
How do I get the physical CPU socket count in RHEL? youngnastyman Linux - General 2 06-30-2011 10:42 AM
How many CPU, cores/CPU? pcotten Linux - General 5 01-20-2011 09:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration