"Share" How to view the CPU physical number, number of cores, and number of hyper-threads of a Linux host

Source: Internet
Author: User

1. CPUs with the same core ID are Hyper-threading of the same core. (Physical ID and core ID is not necessarily consecutive but they is unique.) Any CPUs with the same core ID is hyperthreads in the same core.)2. CPUs with the same physical ID are the same CPU-encapsulated thread or cores. (Any CPU with the same physical ID is threads or cores in the same physical socket.)
① Number of physical CPUs:
    • [Email protected] ~]# Cat/proc/cpuinfo | grep "Physical ID" | Sort | Uniq | Wc-l

② the number of cores per physical CPU (that is, the number of nuclei)
    • [Email protected] ~]# Cat/proc/cpuinfo | grep "CPU Cores" | Uniq CPU Cores:4

This can figure out the logical CPU of your server is the number of physical * cores, and if your server is server2003, you can graphically see the number of logical CPUs in your resource manager.
    • /proc/cpuinfo description with 6 Entries apply to multi-core and Hyper-Threading (HT) Technical checks: processor, vendor ID, physical ID, siblings, core ID, and CPU cores.
    • * Processor Entry includes a unique identifier for this logical processor.
    • * Physical ID The entry includes a unique identifier for each physical package.
    • * Core ID The entry holds a unique identifier for each kernel.
    • * Siblings Entry lists the number of logical processors in the same physical package.
    • * CPU Cores The entry contains the number of cores in the same physical package.
    • * If the processor is an Intel processor, The string in the vendor ID entry is Genuineintel.

Share how to view the number of CPUs, cores, and hyper-threads of a Linux host

Related Article

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.