![Cpufrequtils 可用频率](https://linux22.com/image/902998/Cpufrequtils%20%E5%8F%AF%E7%94%A8%E9%A2%91%E7%8E%87.png)
/etc/init.d/cpufrequtils 有以下注释
and which limits to set. Both MIN_SPEED and MAX_SPEED must be values
listed in:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
a value of 0 for any of the two variables will disabling the use of
that limit variable.
但是文件 /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies 对我来说不存在?你有吗?我在哪里可以得到合适的频率?
此致
答案1
英特尔已经停止发布可用频率,但你可以大致了解它们的频率:
使用这些命令查看可用的步骤和最小值/最大值:
$ cd /sys/devices/system/cpu/intel_pstate
$ paste <(ls *) <(cat *) | column -s $'\t' -t
max_perf_pct 100
min_perf_pct 22
no_turbo 0
num_pstates 28
status active
turbo_pct 33
$ cd /sys/devices/system/cpu/cpu0/cpufreq
$ paste <(ls *) <(cat *) | column -s $'\t' -t
affected_cpus 0
cpuinfo_max_freq 3500000
cpuinfo_min_freq 800000
cpuinfo_transition_latency 4294967295
energy_performance_available_preferences default performance balance_performance balance_power power
energy_performance_preference balance_performance
related_cpus 0
scaling_available_governors performance powersave
scaling_cur_freq 1939478
scaling_driver intel_pstate
scaling_governor powersave
scaling_max_freq 3500000
scaling_min_freq 800000
scaling_setspeed <unsupported>
这是我刚刚在 Stack Exchange 上发布的答案:获取所有可用的频率步长将此函数复制并粘贴到您的终端中:
ApproximateFrequencies () {
NumSteps=$(cat /sys/devices/system/cpu/intel_pstate/num_pstates)
MinFreq=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq)
MaxFreq=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq)
LastFreq=$MinFreq
StepRate=$((( $MaxFreq - $MinFreq ) / $NumSteps))
for ((n=0;n<=$NumSteps;n++)); do
echo $LastFreq
LastFreq=$(( $LastFreq + $StepRate))
done
}
然后用它来显示频率:
$ ApproximateFrequencies | column
800000 1089284 1378568 1667852 1957136 2246420 2535704 2824988 3114272 3403556
896428 1185712 1474996 1764280 2053564 2342848 2632132 2921416 3210700 3499984
992856 1282140 1571424 1860708 2149992 2439276 2728560 3017844 3307128
如果您尚未column
安装,则省略| column
部分命令。