Home > Operation and Maintenance > Linux Operation and Maintenance > How to check how many cores a CPU has in Linux

How to check how many cores a CPU has in Linux

王林
Release: 2020-05-16 13:21:10
Original
4132 people have browsed it

How to check how many cores a CPU has in Linux

We can use the cat command to view it. The cat command is used to connect files and print to the standard output device.

To check how many cores the CPU has, the command is as follows:

#cat /proc/cpuinfo |grep "cores"|uniq
Copy after login

Extension:

Check the number of physical CPUs

#cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc -l
Copy after login

Check the number of logical CPUs Number

#cat /proc/cpuinfo |grep "processor"|wc -l
Copy after login

Recommended tutorial: linux tutorial

The above is the detailed content of How to check how many cores a CPU has in Linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template