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/