How to find the number of cores in a Red Hat Linux box?

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat How to find the number of cores in a Red Hat Linux box?
# 1  
Old 12-04-2012
RedHat How to find the number of cores in a Red Hat Linux box?

Hi,

Could you please Tell me the command to find the number of cores in red hat box?

I have tried cat cat /proc/cpuinfo | grep processor | wc -l command to find the number of processers.

But need to fond the number of cores.

Is there any difference between core and processor?

Please help on this.

Regards,
Vikas.
# 2  
Old 12-04-2012
Yes - a lot of difference.

Try this command

Code:
 egrep 'core id|physical id' /proc/cpuinfo | tr -d "\n" | sed s/physical/\\nphysical/g | grep -v '^$' | sort | uniq | wc -l

This User Gave Thanks to jim mcnamara For This Post:
# 3  
Old 12-04-2012
Hi Jim,

Thanks for the help.
# 4  
Old 01-04-2013
cat /proc/stat will show more specific info ... Smilie
This User Gave Thanks to Rashid Mahmood For This Post:
# 5  
Old 01-04-2013
I'd also like to point out that the techniques in the newer kernels that actually have the fairly good core reporting for x86 style CPUs still won't work well for really old dubious x86 processors with their stranger "core" handling. It's a small subset of processors... most desktop users will have never seen these.

And of course, core reporting outside of x86 is a mixed bag (what a core "is" varies for some of those as well).
This User Gave Thanks to cjcox For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

How to download Red Hat Linux 7?

Pls help me where i can download linux 7 installations (7 Replies)
Discussion started by: ded325
7 Replies

2. Fedora

Which is the better platform to learn UNIX/Linux (Kali Linux Vs. Red Hat or other)?

I just started a new semester and I started my UNIX class yesterday. I've already decided to use python along with my learning process but what I really want to use with it is Kali as my UNIX/Linux platform to learn off of since I already wanted to learn Cyber Sec. anyways. I just wanted to know if... (12 Replies)
Discussion started by: ApacheOmega
12 Replies

3. Red Hat

Help with Linux Red Hat Enterprise 5.4

I installed Red Hat Enterprise Linux version 5.4 on a desktop in work. I am stuck on the following 1. I have to ensure that Syslogd options in the /etc/sysconfig/syslog file read SYSLOGD_OPTIONS="-r -m 0". After making this execute service syslog restart the syslog and make this change... (0 Replies)
Discussion started by: thomas.colgan
0 Replies

4. UNIX for Dummies Questions & Answers

how to know if i use "Red Hat Enterprise Linux" or "Red Hat Desktop" ?

how to know if i use "Red Hat Enterprise Linux" or "Red Hat Desktop" ? (2 Replies)
Discussion started by: ahmedamer12
2 Replies

5. Virtualization and Cloud Computing

Red Hat Linux Serial Number using non-root user

Hi All, Is there any way to find out the Serial Numbers in Red Hat Linux machines with a non-root user? I know we can find using the dmidecode command, but it needs root privilege. I want to access this information using a non-root user. Any help will be greatly appreciated. :) Many... (2 Replies)
Discussion started by: vineetd
2 Replies

6. Linux

Red Hat Linux 9

Hello there! Will anybody please tell me some good links to online eBooks on Red Hat Linux 9 user experiences and the like. If the books are in PDF Format, it will be nice to read. Thanks for cooperation in advance. Enjoy using open source and breathe freely! JAM (5 Replies)
Discussion started by: Jawwad
5 Replies

7. UNIX for Dummies Questions & Answers

XP to Linux (Red Hat)

I have a PC running XP, and I have a PC that dual boots W2K and Red Hat Linux 7.3. I have the two connected via crossover cable, and the two can access each other when both are running windows. If I were to boot up Linux, can my XP PC telnet to the Linux PC? Any pointers or websites to... (3 Replies)
Discussion started by: lawadm1
3 Replies

8. UNIX for Dummies Questions & Answers

Red Hat Linux - FreeBSD

Is there a major difference between this two flavours? I have read from the forums that Red Hat is ideal for newbies, but how about FreeBSD? In case of stability and usefulness/compatibility to hardware and third party software which one is the best bet? (3 Replies)
Discussion started by: charlie499
3 Replies

9. UNIX for Dummies Questions & Answers

Slackware's Linux 3.0 VS Red Hat Linux 7.x

Hello guys, I got overzealous (I Think). I got the book Linux Unleashed that comes with the Slackware 3.0 Version of Linux for $2.00.I also have Red Hat Linux 7.2 (No book, just the OS).What I wanted to know was,other than the bells and whistles of Red Hat is there any significant difference... (2 Replies)
Discussion started by: perrylx
2 Replies

10. UNIX for Dummies Questions & Answers

Red Hat Linux 6.0

Ok here is my problem i do not know the command to load a driver for my network card in Ted hat linux 6.0 could sombody give me a hand. and if there is anyone that has a list of commands for red hat that would be great also (2 Replies)
Discussion started by: bbutler3295
2 Replies
Login or Register to Ask a Question