如何使用命令行找出我的 CPU 的核心数,包括虚拟核心(超线程核心)?
我是 Linux 和 Ubuntu 世界的新手。我想说获取有关 CPU 的最大信息。( cpufreq ,核心数,每核心线程数,指令集,缓存大小,指令集,虚拟化等)
我更喜欢一种适用于所有 Linux 发行版而不是 Ubuntu 特定方法的方法。
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: 2
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 69
Stepping: 1
CPU MHz: 989.531
BogoMIPS: 4788.74
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 3072K
NUMA node0 CPU(s): 0-3
Run Code Online (Sandbox Code Playgroud)
运行sudo …
我是 ubuntu 用户,目前正在从事图像处理项目,我需要不断查看我的 CPU 和 RAM 使用情况,这在系统监视器中非常清楚地显示,但我必须在系统监视器和我的项目之间切换以查看图形和 CPU 使用情况. 有什么解决方案可以让我不必切换,并且状态栏上有小部件可以显示这些性能,而不是像指示器这样的小图标。
如何使用命令行查看 CPU 缓存的大小?
我想查看有关 L1、L2 和 L3 缓存的信息。
另外,是否可以只输出有关缓存的信息,以便过滤掉所有其他信息?
根据我的笔记本电脑网站和英特尔网站,我的 CPU 是 Intel i5-2410M
处理器编号 i5-2410M 内核 2 线程 4 时钟速度 2.3 GHz 最大睿频频率 2.9 GHz
所以我有两个核心,但是为什么 ubuntu 12.04 为我的 CPU 显示 4 个 CPU?

我目前正在运行 Ubuntu 14.04.2 桌面。
当我期待56时,系统监视器工具向我显示32 个CPU 。我应该担心吗?
系统监视器截图:
如您所见,它显示了 32 个 CPU。
的输出lscpu:
~$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 56
On-line CPU(s) list: 0-55
Thread(s) per core: 2
Core(s) per socket: 14
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 63
Stepping: 2
CPU MHz: 1337.882
BogoMIPS: 5189.07
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 35840K
NUMA …Run Code Online (Sandbox Code Playgroud) 当我运行时,cat /proc/cpuinfo我得到以下输出(仅包含相关行):
cpu cores: 1
Run Code Online (Sandbox Code Playgroud)
但是,lscpu给了我以下输出:
CPU(s): 2
Run Code Online (Sandbox Code Playgroud)
两者中哪一个是正确的,更重要的是,为什么它们给了我不同的结果?
的完整输出cat /proc/cpuinfo是:
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 3
model name : Intel(R) Pentium(R) 4 CPU 2.80GHz
stepping : 4
microcode : 0xe
cpu MHz : 2800.135
cache size : 1024 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fdiv_bug : no
f00f_bug : …Run Code Online (Sandbox Code Playgroud) 我正在制作一个 conky 配置,我想将 CPU 型号显示为统计数据之一。为此,我需要一个仅将 CPU 名称作为字符串输出的命令,例如“Intel Core i7 7700K”。我认为两者/proc/cpuinfo和输出lscpu都有我需要的东西(我更喜欢lscpu它,因为它会稍微更有效率),但模型名称与制造商名称相差 4 个空格。所以我需要切断model name:字符串并去掉多余的空格。我也想知道怎么去掉@ (clockspeed).
我试图理解为什么我的 CPU 不能以更高的频率运行(相关链接)
有人能解释一下,当定义了最小值和最大值时,有效值最终会超出该范围吗?
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
3267000
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
3300000
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
1199960
$ cpupower frequency-info
analyzing CPU 0:
driver: intel_pstate
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: 0.97 ms.
hardware limits: 800 MHz - 3.30 GHz
available cpufreq governors: performance, powersave
current policy: frequency should be within 3.27 GHz and 3.30 GHz.
The governor "performance" may decide which …Run Code Online (Sandbox Code Playgroud) 我的系统出现问题,phantomjs在完成工作后仍然运行。为了调试这个问题,两天前我重新启动了系统:
今天跑步的时候top看到了这个:
如果我理解正确,这两个phantomjs过程已经存在大约 5 天了。所以他们以某种方式在重启后幸存下来?
cpuinfo ×11
cpu ×7
command-line ×3
system-info ×2
14.04 ×1
cache ×1
conky ×1
cpufreq ×1
hardware ×1
htop ×1
process ×1
scaling ×1
top ×1
turbo-boost ×1