Linux查看CPU信息

1、查看操作系统内核信息

[root@local ~]# uname -a

Linux local 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:39 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

2、查询CPU信息

整体信息

[root@local ~]# cat /proc/cpuinfo

CPU名称

[root@local ~]# cat /proc/cpuinfo | grep name

model name      :        Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz

model name      :        Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz

model name      :        Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz

model name      :        Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz
[root@local ~]# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c

      4         Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz

CPU物理个数

[root@local ~]# cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l

2
[root@local ~]# cat /proc/cpuinfo | grep physical | uniq -c

      1 physical id     : 0

      1 address sizes   : 40 bits physical, 48 bits virtual

      1 physical id     : 0

      1 address sizes   : 40 bits physical, 48 bits virtual

      1 physical id     : 1

      1 address sizes   : 40 bits physical, 48 bits virtual

      1 physical id     : 1

      1 address sizes   : 40 bits physical, 48 bits virtual

CPU逻辑个数

[root@local ~]# cat /proc/cpuinfo | grep "processor" | wc -l

4

查看CPU运行模式

[root@local ~]# getconf LONG_BIT

64

查看CPU是否支持64位

[root@local ~]# cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l

4

(结果大于0, 说明支持64bit计算. lm指long mode, 支持lm则是64bit)

查看CUP主频

[root@local ~]# cat /proc/cpuinfo | grep MHz | uniq

cpu MHz         : 2093.211

你可能感兴趣的:(linux)