Commands Linux CentOS
Linux Centos Command: How to see Processor Core & Processor Number
September 12, 2016
0

How to Get Number of Physical Core:
# grep “cpu cores” /proc/cpuinfo |sort -u |cut -d”:” -f2 | awk ‘{s+=$1} END {print s}’

To Get the Number of CPU Core:
# nproc
# cat /proc/cpuinfo| grep processor| wc -l
# grep -c processor /proc/cpuinfo

lscpu gathers CPU architecture information form /proc/cpuinfon in human-read-able format
# lscpu

 

The /proc/cpuinfo and sysfs stores info about your CPU architecture ike number of CPUs, threads, cores, sockets, NUMA nodes, information about CPU caches, CPU family, model, bogoMIPS, yte order and much more:
# less /proc/cpuinfo

Count the number of Physical processor(s):
# grep "physical id" /proc/cpuinfo | sort -u | wc -l
Count the number of Physical cores per CPU:
# grep "cpu cores" /proc/cpuinfo |sort -u |cut -d":" -f2

To Get the CPU Usage Information:
# sar -P ALL 1 3

About author

ZERIN

CEO & Founder (BdBooking.com - Online Hotel Booking System), CEO & Founder (TaskGum.com - Task Managment Software), CEO & Founder (InnKeyPro.com - Hotel ERP), Software Engineer & Solution Architect

How To Setup a Subdomain with SSL on Amazon Linux 2 AMI

I assume that you can login to Amazon Linux 2 AMI ...

Read more

MySQL “Order By Clause” Not Working with “SELECT DISTINCT and ORDER BY” after MySQL Update to 5.7

I have recently updated our MySQL server to MySQL ...

Read more

WHM:: PHP Mail is Not Working-Showing Its Disable

When your mail does not work, one example could be...

Read more

There are 0 comments

Leave a Reply

Your email address will not be published. Required fields are marked *