基于不同指令集(ISA)的CPU产生的/proc/cpuinfo文件不一样,基于X86指令集CPU的/proc/cpuinfo文件包含如下内容:

processor  : 0

vendor_id  :GenuineIntel

cpu family  :6

model    :26

model name :Intel(R) Xeon(R) CPU           E5520  @ 2.27GHz

stepping    :5

cpu MHz    :1600.000

cache size  : 8192 KB

physical id  :0

siblings    :8

core id     : 0

cpu cores   :4

apicid         :0

fpu       :yes

fpu_exception :yes

cpuid level   : 11

wp      :yes

flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx rdtscp lm constant_tsc ida nonstop_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr popcnt lahf_lm

bogomips   :4522.12

clflush size  :64

cache_alignment  : 64

address sizes    : 40 bits physical, 48 bits virtual

power management :

以上输出项的含义如下:

processor :系统中逻辑处理核的编号。对于单核处理器,则课认为是其CPU编号,对于多核处理器则可以是物理核、或者使用超线程技术虚拟的逻辑核

vendor_id :CPU制造商

cpu family :CPU产品系列代号

model   :CPU属于其系列中的哪一代的代号

model name:CPU属于的名字及其编号、标称主频

stepping   :CPU属于制作更新版本

cpu MHz   :CPU的实际使用主频

cache size   :CPU二级缓存大小

physical id   :单个CPU的标号

siblings       :单个CPU逻辑物理核数

core id        :当前物理核在其所处CPU中的编号,这个编号不一定连续

cpu cores    :该逻辑核所处CPU的物理核数

apicid          :用来区分不同逻辑核的编号,系统中每个逻辑核的此编号必然不同,此编号不一定连续

fpu             :是否具有浮点运算单元(Floating Point Unit)

fpu_exception  :是否支持浮点计算异常

cpuid level   :执行cpuid指令前,eax寄存器中的值,根据不同的值cpuid指令会返回不同的内容

wp             :表明当前CPU是否在内核态支持对用户空间的写保护(Write Protection)

flags          :当前CPU支持的功能

bogomips   :在系统内核启动时粗略测算的CPU速度(Million Instructions Per Second)

clflush size  :每次刷新缓存的大小单位

cache_alignment :缓存地址对齐单位

address sizes     :可访问地址空间位数

power management :对能源管理的支持,有以下几个可选支持功能:

ts:  temperature sensor

fid:   frequency id control

vid:  voltage id control

ttp:  thermal trip

tm:

stc:

100mhzsteps:

hwpstate:

CPU信息中flags各项含义:

fpu: Onboard (x87) Floating Point Unit

vme: Virtual Mode Extension

de: Debugging Extensions

pse: Page Size Extensions

tsc: Time Stamp Counter: support for RDTSC and WRTSC instructions

msr: Model-Specific Registers

pae: Physical Address Extensions: ability to access 64GB of memory; only 4GB can be accessed at a time though

mce: Machine Check Architecture

cx8: CMPXCHG8 instruction

apic: Onboard Advanced Programmable Interrupt Controller

sep: Sysenter/Sysexit Instructions; SYSENTER is used for jumps to kernel memory during system calls, and SYSEXIT is used for jumps: back to the user code

mtrr: Memory Type Range Registers

pge: Page Global Enable

mca: Machine Check Architecture

cmov: CMOV instruction

pat: Page Attribute Table

pse36: 36-bit Page Size Extensions: allows to map 4 MB pages into the first 64GB RAM, used with PSE.

pn: Processor Serial-Number; only available on Pentium 3

clflush: CLFLUSH instruction

dtes: Debug Trace Store

acpi: ACPI via MSR

mmx: MultiMedia Extension

fxsr: FXSAVE and FXSTOR instructions

sse: Streaming SIMD Extensions. Single instruction multiple data. Lets you do a bunch of the same operation on different pieces of input: in a single clock tick.

sse2: Streaming SIMD Extensions-2. More of the same.

selfsnoop: CPU self snoop

acc: Automatic Clock Control

IA64: IA-64 processor Itanium.

ht: HyperThreading. Introduces an imaginary second processor that doesn’t do much but lets you run threads in the same process a  bit quicker.

nx: No Execute bit. Prevents arbitrary code running via buffer overflows.

pni: Prescott New Instructions aka. SSE3

vmx: Intel Vanderpool hardware virtualization technology

svm: AMD “Pacifica” hardware virtualization technology

lm: “Long Mode,” which means the chip supports the AMD64 instruction set

tm: “Thermal Monitor” Thermal throttling with IDLE instructions. Usually hardware controlled in response to CPU temperature.

tm2: “Thermal Monitor 2″ Decrease speed by reducing multipler and vcore.

est: “Enhanced SpeedStep”

根据以上内容,我们则可以很方便的知道当前系统关于CPU、CPU的核数、CPU是否启用超线程等信息。

查询系统具有多少个逻辑核:cat /proc/cpuinfo | grep "processor" | wc -l

查询系统CPU的物理核数:cat /proc/cpuinfo | grep "cpu cores" | uniq

查询系统CPU是否启用超线程:cat /proc/cpuinfo | grep -e "cpu cores"  -e "siblings" | sort | uniq

输出举例:

cpu cores    : 6

siblings     : 6

如果cpu cores数量和siblings数量一致,则没有启用超线程,否则超线程被启用。

查询系统CPU的个数:cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l

查询系统CPU是否支持某项功能,则根以上类似,输出结果进行sort, uniq和grep就可以得到结果。

linux 下/proc/cpuinfo三级缓存,linux /proc/cpuinfo文件分析相关推荐

  1. linux proc 自动清理,Linux下清理内存和Cache方法 /proc/sys/vm/drop_caches

    Linux下清理内存和Cache方法 /proc/sys/vm/drop_caches 频繁的文件访问会导致系统的Cache使用量大增 $ free -m total used free shared ...

  2. Linux下清理内存和Cache方法 /proc/sys/vm/drop_caches

    Linux下清理内存和Cache方法 /proc/sys/vm/drop_caches 频繁的文件访问会导致系统的Cache使用量大增 $ free -m total used free shared ...

  3. linux下 redis如何清空缓存

    linux下 redis如何清空缓存 1,进入redis安装目录下bin目录 cd cd /opt/my_workspace/redis/bin 2,连接redis服务端 ./redis-cli -h ...

  4. linux 下查看应用版本信息,Linux下查看版本信息

    Linux下如何查看版本信息, 包括位数.版本信息以及CPU内核信息.CPU具体型号等. 1.# uname -a   (Linux查看版本当前操作系统内核信息) 2.# cat /proc/vers ...

  5. Linux下显示前10个占用空间最大的文件或目录命令

    Linux下显示前10个占用空间最大的文件或目录命令 du -s * | sort -nr | head 转载于:https://blog.51cto.com/wapcn/933177

  6. linux下两个进程可以同时打开同一个文件吗?返回的文件描述符一样吗?

    Linux下两个进程可以同时打开同一个文件吗?返回的文件描述符一样吗? 一:结论 1.两个进程中分别产生生成两个独立的fd 2.两个进程可以任意对文件进行读写操作,操作系统并不保证写的原子性 3.进程 ...

  7. linux格式化大于2t硬盘分区,linux下大于2tb硬盘格式化及挂载,linux下大于2t的分区方法,linux gpt分区表 管理 自动挂载分区...

    linux下大于2tb硬盘格式化及挂载,linux下大于2t的分区方法,linux gpt分区表 管理 自动挂载分区 (7页) 本资源提供全文预览,点击全文预览即可全文预览,如果喜欢文档就下载吧,查找 ...

  8. linux下能运行python,(转)Linux下运行python

    原文: http://blog.csdn.net/jackywgw/article/details/48847187 在linux命令行下运行python,可以直接输出hello world jack ...

  9. linux下的程序开发实验,Linux程序实验.docx

    Linux程序实验 <Linux程序设计>教学大纲Linux Program Design课程类别:学科专业教育课程 课程名称:Linux程序设计开课单位:软件学院课程编号:总 学 时:3 ...

最新文章

  1. “搞垮” 微博服务器?每天上亿条用户推送是如何做到的
  2. BP神经网络的线性本质的理解和剖析-卷积小白的随机世界
  3. IJ 自动生成构造方法
  4. acwing算法题--不同的数
  5. C++:05---class和struct
  6. Fedora-19安装texlive2013并配置中文
  7. Ubuntu无法使用快捷键ctrl + alt + T打开命令行终端或唤醒终端窗口的解决办法
  8. [转]httpclient 上传文件、下载文件
  9. 这本 Python 入门畅销书《“笨办法”学 Python 3》,不仅仅是一本书!
  10. 铁芯用matlab怎么仿真,Simulink的BLDC建模与仿真
  11. Centos 编译安装mysql 5.6.21
  12. 各种隐藏WebShell、创建、删除畸形目录、特殊文件名的方法
  13. 【预测模型】基于matlab RLS算法预测【含Matlab源码 222期】
  14. 软件著作权代码格式 java_软件著作权源代码文档格式要求
  15. MySQL 联合查询
  16. 广东理工学院计算机考试大纲,广东理工学院2020年专插本《电工电子技术》考试大纲...
  17. Deep Homography Estimation for Dynamic Scenes 论文笔记
  18. 控件之Scale LabelScale
  19. CSS课堂案例8-小米布局
  20. JAVA后端面经总结

热门文章

  1. R假设检验之Mann-Kendall趋势检验法(Mann-Kendall Trend Test)
  2. SQL语法中drop,delete与truncate的区别
  3. python使用正则表达式抽取字符串中最大数值数字
  4. Stacking+Blending
  5. 服务器上安装运行fastqc
  6. AutoML自动化机器学习技术深入
  7. linux关机 hibernate,Linux关机命令
  8. 服务器上tomcat修改内存,修改Tomcat运行内存
  9. 【跨域报错解决方案】Access to XMLHttpRequest at ‘http://xxx.com/xxx‘ from origin ‘null‘ has been blocked by
  10. 图像拼接--Automatic Panoramic Image Stitching using Invariant Features