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:
Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 16 On-line CPU(s) list: 0-15 Thread(s) per core: 2 Core(s) per socket: 8 Socket(s): 1 NUMA node(s): 1 Vendor ID: AuthenticAMD CPU family: 23 Model: 1 Model name: AMD Ryzen 7 1700 Eight-Core Processor Stepping: 1 CPU MHz: 1546.617 CPU max MHz: 3000.0000 CPU min MHz: 1550.0000 BogoMIPS: 5988.15 Virtualization: AMD-V L1d cache: 32K L1i cache: 64K L2 cache: 512K L3 cache: 8192K NUMA node0 CPU(s): 0-15 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb hw_pstate sme ssbd sev ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero irperf xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov succor smca
Red Hat display CPU information
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)"
RHEL determine number of CPU sockets on my server or desktop
Conclusion
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.
🐧 2 comments so far... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
All you need is lscpu on RHEL 6 or 7:
lscpu
Yes, updated page with images and more commands such as lscpu. Please use our forum if you need further help.