【问题标题】:how to map linux lscpu command with windows cpu info如何将 linux lscpu 命令与 Windows cpu 信息映射
【发布时间】:2026-01-17 01:00:02
【问题描述】:

在 rhel 上运行 lscpu 时:

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    2
Core(s) per socket:    1
Socket(s):             2
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            15
Model:                 4
Stepping:              3
CPU MHz:               3000.000
BogoMIPS:              5985.27
L1d cache:             16K
L2 cache:              2048K
NUMA node0 CPU(s):     0-3

在 Windows 上它看起来像这样

Processor   Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz, 2501 Mhz, 2 Core(s), 4 Logical Processor(s)

我可以从谷歌找到任何可以将 linux equilent 映射到 windows 处理器信息的东西。

我也关注了这个链接:lscpu

我正在编写一个脚本来获取有关 widnows 和 linux 的 cpu/处理器信息。但我需要确保这两个字段都正确映射。

【问题讨论】:

  • 您应该在 Windows Vista 及以上版本上使用wmic cpu 来确定 CPU 信息。
  • 当我使用wmic cpu 时,输出非常混乱,以至于无法阅读
  • 可读性提高:通过管道 wmic cpu > myfile .txt 到文本文件并使用记事本查看

标签: linux windows operating-system system cpu


【解决方案1】:

您可以在 GUI 上使用 Microsoft 系统信息,而不是使用命令提示符。

只需使用win key+R 打开“运行”对话框,然后输入msinfo32 并按 Enter。

【讨论】:

    【解决方案2】:

    我意识到这是一个较老的问题,但我想扩展现有的 cmets,因为我也在寻找解决此问题的方法,经过一番挖掘后我发现了一些东西。

    使用wmic cpu list /format:list 将提供一个键值对列式列表。其他格式,如 html table 和 csv 可用。 https://www.petri.com/command-line-wmi-part-3 很好地概述了格式化选项和其他可用的wmic 开关

    【讨论】: