温馨提示×

什么是linux cpuinfo内容

小樊
42
2026-10-11 03:03:39
栏目: 智能运维

在 Linux 系统中,/proc/cpuinfo 是一个虚拟文件,由内核在运行时动态生成,用来描述当前系统的 CPU 硬件信息。你可以通过命令查看:

cat /proc/cpuinfo

或直接:

lscpu

一、cpuinfo 中常见字段说明

下面以 x86_64(Intel/AMD) 为例说明常见字段含义:

1. processor

processor : 0
  • 逻辑 CPU 的编号(从 0 开始)
  • 超线程开启时,一个物理核会有多个 processor

2. vendor_id

vendor_id : GenuineIntel
  • CPU 厂商
    • GenuineIntel → Intel
    • AuthenticAMD → AMD

3. cpu family / model / stepping

cpu family : 6
model      : 142
stepping   : 12
  • 表示 CPU 的 架构代次
  • 通常配合型号名一起看

4. model name

model name : Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
  • CPU 的 具体型号和主频

5. physical id

physical id : 0
  • 物理 CPU 的编号
  • 多路服务器中可能为 0,1,2...

6. core id

core id : 0
  • 当前物理核的编号

7. cpu cores

cpu cores : 4
  • 一个 物理 CPU 中的核心数(不含超线程)

8. siblings

siblings : 8
  • 一个物理 CPU 的 逻辑 CPU 数
  • siblings / cpu cores = 超线程倍数

9. flags

flags : fpu vme de pse tsc msr pae mce cx8 ...
  • CPU 支持的 指令集和功能特性
  • 常见:
    • lm → 64 位
    • vmx / svm → 虚拟化
    • avx, avx2 → 向量指令

10. bogomips

bogomips : 3600.00
  • 内核估算的 CPU 速度(仅供参考)

二、如何看“几核几线程”

示例:

physical id : 0
cpu cores   : 4
siblings    : 8
processor   : 0~7

说明:

  • 1 个物理 CPU
  • 4 物理核
  • 8 逻辑 CPU(超线程)

三、不同架构的差异

  • ARM / 鲲鹏 / 飞腾

    • 字段类似,但 model name 可能不同
    • 可能无 physical id
  • 虚拟机

    • hypervisor 相关 flag
    • 可能显示 vCPU

四、常用查看命令

# 逻辑CPU数
nproc

# 汇总信息
lscpu

# 物理核数
grep 'cpu cores' /proc/cpuinfo | uniq

如果你愿意,可以贴出你的 cpuinfo 内容,我可以帮你逐行解读或判断是几核几线程。

0 踩