Identify Number of Processors on a Linux Box

Windows Articles

How to Update to MIUI 12 via Fastboot

Greetings friends. The new version of the Android-based operating system MIUI 12 released this year, is still being deployed with some devices missing. On...

How to use modprobe command?

The modprobe command is a Linux administration system created for management, visualization, inclusion and exclusion. From loadable modules to kernel. Also, the Module is...

Install Virtualmin on CentOS 8

Hello, friends. In this post, you will learn how to install Virtualmin on CentOS 8. In addition to that, we will leave it ready...

Different ways to open File Explorer in Windows 10

Hello! Certainly the archive scan is an essential element when it comes to controlling the contents. It is even so important, that there are...

How to setup WireGuard VPN with ubuntu 20.04

Here, we will learn today how to configure WireGuard VPN with Ubuntu 20.04. Wireguard® is an amazingly straightforward yet quick and present-day VPN that...

Linux box is a computer that is running with the power of a Linux operating system. As a part of the machine, the processor is a very important part as it enables performing all the tasks possible. In fact, the processor is one of the major components of a computer that you need to keep your eye on.

Today’s modern processors come up with multiple cores and hyper-threading that allows the processor to perform parallel tasks simultaneously. The more cores, the better performance at heavy load works. Check out the comparison between Intel and AMD processors.

Willing to find out how many cores are present in your system? Let’s find out!

Finding out processor core number

The simplest method for figuring out your processor number is by using a tool “nproc”. It’s a part of the Linux coreutils. Run the following command –

nproc --all

There’s another way to obtain the same result. This one will also allow you some additional information on your processor.

lscpu | grep 'CPU(s)'

You can also examine the “cpuinfo” file from “/proc” filesystem.

grep processor /proc/cpuinfo | wc -l

There are also a number of other information on the processor in the “cpuinfo” file.

cat /proc/cpuinfo | grep "model name"
cat /proc/cpuinfo | grep "cpu cores"

In the present world of hyper-threading, the number of actual cores (physical cores) and threads (logical cores) can also be separated.

# Get number of physical core(s)
lscpu -p | egrep -v '^#' | sort -u -t, -k 2,4 | wc -l

# Get number of logical core(s)
lscpu -p | egrep -v '^#' | wc -l

If your Linux system doesn’t have the above tools, you can also use this following command for getting the same result –

getconf _NPROCESSORS_ONLN

With root privilege, you can directly get processor information using “dmidecode”.

dmidecode -t 4 | egrep 'Socket Designation|Count'

If you’re interested in getting a full, system-wide specification, you should use other tools like Superfetch or Neofetch.

Enjoy!

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to Update to MIUI 12 via Fastboot

Greetings friends. The new version of the Android-based operating system MIUI 12 released this year, is still being deployed with some devices missing. On...

How to use modprobe command?

The modprobe command is a Linux administration system created for management, visualization, inclusion and exclusion. From loadable modules to kernel. Also, the Module is...

Install Virtualmin on CentOS 8

Hello, friends. In this post, you will learn how to install Virtualmin on CentOS 8. In addition to that, we will leave it ready...

Different ways to open File Explorer in Windows 10

Hello! Certainly the archive scan is an essential element when it comes to controlling the contents. It is even so important, that there are...

How to setup WireGuard VPN with ubuntu 20.04

Here, we will learn today how to configure WireGuard VPN with Ubuntu 20.04. Wireguard® is an amazingly straightforward yet quick and present-day VPN that...
x