如何知道CPU频率?

Ale*_*nko 3 cpu 14.04

我正在运行 Ubuntu 16.04。我怎样才能知道我电脑的 CPU 的频率是多少?我只需要根据制造商和我拥有的真实CPU频率知道CPU频率。

是否有一些终端命令允许这样做?

编辑

有输出 lscpu

CPU MHz:               1400.042
CPU max MHz:           2700.0000
CPU min MHz:           800.0000
Run Code Online (Sandbox Code Playgroud)

但从细节我得到另一个

在此处输入图片说明

第一个输出 2.7 和另一个 1.7 ...

是因为Turbo boost

UTF*_*F-8 7

该命令lscpu为您提供有关 CPU 的信息。

要将输出限制为频率,请使用以下命令:

lscpu | grep MHz
Run Code Online (Sandbox Code Playgroud)

输出看起来像

CPU MHz:               828.140
CPU max MHz:           3600.0000
CPU min MHz:           800.0000
Run Code Online (Sandbox Code Playgroud)

并显示您的 CPU 的当前频率、最大频率和最小频率。

您也可以单击系统设置中的“详细信息”。有一个名为“处理器”的条目,它显示了您的处理器名称。此名称可能包含额定 CPU 频率。例子:Intel® Core™ i7-4720HQ CPU @ 2.60GHz × 8

注意最大频率lscpu可以高于额定频率。这是由于涡轮增压


Win*_*nix 5

第一个答案很好。OP 要求提供“一些”终端命令。我会添加一些额外内容,因为每个问题都有很多答案。

\n\n

这是查看每个 CPU 当前频率的另一种方法:

\n\n
rick@dell:~$  sudo cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq\n[sudo] password for rick: \n2911523\n2978173\n2825097\n3068554\n2888232\n2038769\n2891894\n3134619\n\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\nrick@dell:~$ \n
Run Code Online (Sandbox Code Playgroud)\n\n

*您可以通过替换为给定的 CPU 编号(例如0第一个 CPU 或7最后一个 CPU(在 8 个 CPU 系统上))来缩短上述输出。

\n\n

另一种无需电源即可获取 CPU 频率的方法sudo是:

\n\n
rick@dell:~$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq\n3174316\n3223095\n3250781\n3214160\n3211962\n3222802\n3237451\n3245654\n\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\nrick@dell:~$ \n
Run Code Online (Sandbox Code Playgroud)\n\n

这些是您可能想尝试的与频率和 CPU 相关的其他命令:

\n\n
cat /sys/class/thermal/thermal_zone*/temp\ncat /sys/devices/system/cpu/intel_pstate/no_turbo\ncat /sys/devices/system/cpu/intel_pstate/turbo_pct\ncat /sys/devices/system/cpu/intel_pstate/num_pstates\ncat /sys/devices/system/cpu/intel_pstate/min_perf_pct\ncat /sys/devices/system/cpu/intel_pstate/max_perf_pct\ncat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_min_freq\ncat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_max_freq\ncat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_transition_latency\ncat /sys/devices/system/cpu/cpu*/cpufreq/affected_cpus\ncat /sys/devices/system/cpu/cpu*/cpufreq/related_cpus\ncat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor\ncat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors \ncat /sys/devices/system/cpu/cpu*/cpufreq/scaling_min_freq\ncat /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq\ncat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq\ncat /sys/devices/system/cpu/cpu*/cpufreq/scaling_setspeed \ncat /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver\n
Run Code Online (Sandbox Code Playgroud)\n\n

您可以再次替换*为给定的 CPU 编号以缩短输出。

\n