您的位置:首页 > 运维架构 > Linux

查看linux服务器CPU详细情况

2016-02-24 14:06 453 查看
linux服务器的硬件信息放在/proc下,cat /proc/cpuinfo可以查看到CPU的详细信息。

[fengzhige@33 ~]$ cat /proc/cpuinfo |less

processor : 0 ##CPU超线程数

vendor_id : GenuineIntel ##CPU生产厂商

cpu family : 6

model : 45

model name : Intel(R) Xeon(R) CPU E5-2630 0 @ 2.30GHz

stepping : 7

cpu MHz : 2300.154 ##CPU主频

cache size : 15360 KB ##CPU缓存

physical id : 0 ##CPU物理ID号

siblings : 12

core id : 0 ##CPU核心ID号

cpu cores : 6 ##CPU核心个数

apicid : 0

initial apicid : 0

fpu : yes

fpu_exception : yes

cpuid level : 13

wp : yes

flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64
monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 x2apic popcnt aes xsave avx lahf_lm ida arat xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid

bogomips : 4600.30

clflush size : 64

cache_alignment : 64

address sizes : 46 bits physical, 48 bits virtual

查看物理CPU个数:
[fengzhige@33 ~]$ cat /proc/cpuinfo |grep 'physical id' |sort |uniq |wc -l


查看CPU核心个数:
[fengzhige@33 ~]$ cat /proc/cpuinfo |grep 'cpu cores' |uniq
cpu cores       : 6


查看CPU超线程数:
[fengzhige@33 ~]$ cat /proc/cpuinfo |grep 'processor'


超线程数=逻辑CPU个数;

理论上,

物理CPU个数x核心个数=逻辑CPU个数

若CPU支持超线程则是

物理CPU个数x核心个数x每个核心支持超线程个数=逻辑CPU个数

赠送:

htop命令
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: