View the number of Linux physical CPUs

Source: Internet
Author: User

View Kernel version
Lsb_release-a
View the number of physical CPUs, cores, and logical CPUs

(1) CPUs with the same core ID are Hyper-threading of the same core.

(2) A CPU with the same physical ID is a thread or core encapsulated by the same CPU.

(3) Total physical number of cores = number of physical CPUs X number of cores per physical CPU

(4) Total Logical CPU = number of physical CPUs x number of cores per physical CPU X number of hyper-threads

(5) Therefore, comparing the total physical number of cores and the total number of logical CPUs, if not equal, indicates that the server CPU turns on Hyper-threading.

#查看CPU信息 (model)awk-F':' '/model Name/{print}'/proc/cpuinfo |Uniq# View the number of physical CPUsawk-F':' '/physical Id/{print}'/proc/cpuinfo |Sort|Uniq|WC-l# View the number of cores in each physical CPU (that is, the number of nuclei)awk-F':' '/cpu Cores/{print}'/proc/cpuinfo |Uniq# View the number of logical CPUsawk-F':' '/processor/{print}'/proc/cpuinfo |WC-L
References

1, 1190000007469655

View the number of Linux physical CPUs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.