How to find out CPU information on Red Hat Linux (RHEL)
I am a new RHEL (RedHat Enterprise Linux) system administrator. How do I find out information about my CPU like the number of cores, sockets, CPU type, make and other features provided by Intel or AMD using the command line options on RHEL 5.x/6.x/7.x?
CPU is an acronym for the central processing unit. It is an essential part of your desktop or server. The CPU controls the other parts of the computer by sending or reading instructions. Your CPU reads the list of instructions from a computer program. Most CPUs used in RHEL servers or desktops/ laptops made by either AMD or Intel. But you may have a server that is powered by IBM, ARM and other CPUs too. Hence, it is vital to find out information about your CPU on RHEL.
Find out CPU information on Red Hat Enterprise Linux (RHEL)
To find information about the CPU architecture of RHEL based system, run: lscpu Sample outputs:
Another option is to type cat command: cat /proc/cpuinfo
RHEL show information about my CPU
Let us find out number of physical CPUs in your server, run: grep physical.id /proc/cpuinfo | sort -u | wc -l List number of cores per CPU for Red Hat Linux: grep cpu.cores /proc/cpuinfo | sort -u Finally, let us print number of logical processors for RHEL: grep processor /proc/cpuinfo | wc -l Another option is to run dmidecode command sudo dmidecode -t4
How to determine number of CPU sockets on my Red Hat Linux
Use the grep command along with wc command and sort command as follows: grep physical.id /proc/cpuinfo | sort -u | wc -l OR use the lscpu command: lscpu | grep -i "socket(s)"
This page explained how to find out CPUs, sockets and other information on Red Hat Enterprise Linux (RHEL) using the command line. For more information please see this URL.
The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.