See the number of physical CPUs, cores, and logical CPUs under Linux

Source: Internet
Author: User

information in the Cat/proc/cpuinfo

processor The ID of the logical processor.
ID of the processor that physical ID physically encapsulates.
the ID of the core ID for each key.
CPU Cores The number of cores in the same physically encapsulated processor.
siblings the number of logical processors in the same physically encapsulated processor.

1 Viewing the number of physical CPUs
#cat/proc/cpuinfo |grep "Physical id" |sort |uniq|wc–l
2. View the number of logical CPUs
#cat/proc/cpuinfo |grep "Processor" |wc–l
3. View CPU is a few cores
#cat/proc/cpuinfo |grep "Cores" |uniq
4, check the CPU frequency
#cat/proc/cpuinfo |grep mhz|uniq
5. # uname-a
6. Linux euis1 2.6.9-55.elsmp #1 SMP Fri Apr 17:03:35 EDT i686 i686 i386 gnu/linux
(view current operating system kernel information)
7. # Cat/etc/issue | grep Linux
8. Red Hat Enterprise Linux as Release 4 (Nahant Update 5 (view current operating system release information)
9, # Cat/proc/cpuinfo | grep name | cut-f2-d: | uniq-c
8 Intel (R) Xeon (r) CPU E5410 @ 2.33GHz
(see 8 logical CPUs, also know the CPU model)
9 # Cat/proc/cpuinfo | grep Physical | Uniq-c
4 Physical id:0
4 Physical Id:1
(Description is actually two 4-core CPUs)

10. # getconf Long_bit
32
(indicates that the current CPU is running in 32bit mode, but does not mean that the CPU does not support 64bit)

11, # Cat/proc/cpuinfo | grep Flags | grep ' LM ' | Wc–l
8 (results greater than 0, description support 64bit calculation.) LM means long mode, support LM is 64bit)

12. How to get CPU details:
Linux command: Cat/proc/cpuinfo
13, with the command to determine several physical CPUs, several cores, etc.:
Number of logical CPUs:
# Cat/proc/cpuinfo | grep "Processor" | Wc-l
Number of physical CPUs:
# Cat/proc/cpuinfo | grep "Physical ID" | Sort | Uniq | Wc-l
14. The number of cores per physical CPU:
# Cat/proc/cpuinfo | grep "CPU Cores" | Wc-l
15. Is it hyper-threading? If there are two logical CPUs with the same "core ID", then Hyper-threading is turned on. The number of logical CPUs (possibly cores, threads, or both) in each physical CPU:
# Cat/proc/cpuinfo | grep "Siblings"

1. View CPU Information commands
Cat/proc/cpuinfo
2. View memory Information commands
Cat/proc/meminfo
3. View the hard drive information command
Fdisk-l

View CPU information (model number)
# Cat/proc/cpuinfo | grep name | Cut-f2-d: | Uniq-c
8 Intel (R) Xeon (r) CPU E5410 @ 2.33GHz
(see 8 logical CPUs, also know the CPU model)

# Cat/proc/cpuinfo | grep Physical | Uniq-c
4 Physical id:0
4 Physical Id:1
(Description is actually two 4-core CPUs)
Ps:jay added on 10th, May, 2011
# In fact, there may be hyper-threading HT technology, not necessarily a 4-core or 2-core 4 thread;

# getconf Long_bit
32
(indicates that the current CPU is running in 32bit mode, but does not mean that the CPU does not support 64bit)

# Cat/proc/cpuinfo | grep Flags | grep ' LM ' | Wc-l
8
(The result is greater than 0, indicating support for 64bit calculations. LM refers to long mode, which supports LM is 64bit)

Look at the CPU details in full, but most of us don't care.
# Dmidecode | grep ' Processor information '

View memory Information
# Cat/proc/meminfo

# uname-a
Linux euis1 2.6.9-55.ELSMP #1 SMP Fri April 17:03:35 EDT i686 i686 i386 gnu/linux
(view current operating system kernel information)

# Cat/etc/issue | grep Linux
Red Hat Enterprise Linux as Release 4 (Nahant Update 5)
(View current operating system release information)

View Machine Model
# Dmidecode | grep "Product Name"

viewing network card information
# DMESG | Grep-i ETH


# total number of cores = number of physical CPUs x number of cores per physical CPU # Total Logical CPUs = number of physical CPUs x number of cores per physical CPU X number of hyper-threads

See the number of physical CPUs, cores, and logical CPUs under Linux

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.