Linux _ view the number of CPUs, cores, and threads of the system

Source: Internet
Author: User

Linux _ view the number of CPUs, cores, and threads of the system

(1) view cpu Information

[Root @ xckydb ~] # Cat/proc/cpuinfo

-- View cpu Information

Processor: 0

Vendor_id: GenuineIntel

Cpu family: 6

Model: 58

Model name: Intel (R) Core (TM) i5-3320M CPU @ 2.60 GHz

Stepping: 9

Cpu MHz: 2566.490

Cache size: 6144 KB

Fpu: yes

Fpu_exception: yes

Cpuid level: 5

Wp: yes

Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat limit 36 clflush mmx fxsr sse sse2 syscall nx rdtscp lm constant_tsc up pni monitor ssse3 lahf_lm

Bogomips: 5132.98

Clflush size: 64

Cache_alignment: 64

Address sizes: 36 bits physical, 48 bits virtual

Power management:

 

(2) view cpu brief information

[Root @ xckydb ~] # Cat/proc/cpuinfo | grep name | cut-f2-d: | uniq-c

-- View brief cpu Information

1 Intel (R) Core (TM) i5-3320M CPU @ 2.60 GHz

 

(3) Check the number of physical CPUs

[Root @ xckydb ~] # Grep 'physical id'/proc/cpuinfo | sort-u

1

-- The number of physical CPUs is 1.

(4) Check the number of cores

[Root @ xckydb ~] # Grep 'core id'/proc/cpuinfo | sort-u | wc-l

6

-- Check that the number of CPU cores is 6

(5) view the number of threads

[Root @ xckydb ~] # Grep 'processor '/proc/cpuinfo | sort-u | wc-l

12

-- Check that the total number of cpu threads is 12 (6 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.