ubuntu16.04 View CPU is a few cores

Source: Internet
Author: User

Ubuntu 16.04 under View machine is CPU is several cores

Several CPUs

More/proc/cpuinfo |grep "Physical ID" |uniq|wc-l

Each CPU is a few cores (assuming the same CPU configuration)

More/proc/cpuinfo |grep "Physical id" |grep "0" |wc-l

Cat/proc/cpuinfo | grep processor

1. View 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

# 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)

# 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)

# 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)

How to obtain detailed information about the CPU:

Linux command: Cat/proc/cpuinfo

Use 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

Number of cores per physical CPU:
# Cat/proc/cpuinfo | grep "CPU Cores" | Wc-l

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"

ubuntu16.04 View CPU is a few cores

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.