How to get CPU information in Linux

Source: Internet
Author: User

We can get the information we need in/proc/cpuinfo.

1. The current CPU model

[root@ localhost ~]# cat/proc/cpuinfo |grep ' model name ' |uniq

Model NAME:AMD Opteron (tm) Processor 6140

2. Current CPU operating mode

[Root@localhost tmp]# getconf Long_bit

32

Indicates that the current CPU is running in 32-bit environments

3. Whether the current CPU supports 64-bit environments

[root@ localhost ~]# cat/proc/cpuinfo |grep ' lm ' |uniq

FLAGS:FPU VME de PSE TSC MSR PAE MCE cx8 APIC MTRR PGE MCA Cmov Pat PSE36 Clflush MMX FXSR SSE SSE2 HT syscall NX Mmxext fxsr_opt PDPE1GB rdtscp lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid amd_dcm PNI Monitor cx1 6 popcnt lahf_lm cmp_legacy SVM extapic cr8_legacy ABM sse4a misalignsse 3dnowprefetch osvw IBS skinit WDT NODEID_MSR NPT LBRV Svm_lock Nrip_save Pausefilter

LM refers to long mode, support LM is 64bit this side has output, the description is to support 64-bit can replace the command last Uniq to Wc-l to see support 64-bit core number

4. Number of physical CPUs

Physical ID is the same as the same physical CPU

[root@ localhost ~]# cat/proc/cpuinfo |grep "Physical id" |sort |uniq

Physical id:0

Physical Id:1

In this case, this host has two physical CPUs

5. The number of core in each physical CPU

[root@ localhost ~]# cat/proc/cpuinfo | grep "CPU Cores" | Uniq

CPU Cores:8

Each physical CPU has 8 core that hosts a total of 16 core

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/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.