利用可能なすべての周波数ステップを取得します。

利用可能なすべての周波数ステップを取得します。

を使用すると、cpupower任意の最小周波数と最大周波数を設定できます。ただし、CPUはこの値を実行できる次の周波数範囲に丸めます(これは周波数乗数によるものと思います)。

私はcpupowerや他のツールやファイルを介して利用可能なすべての周波数のリストを取得する方法を見つけることができませんでした。こんな情報があっていいですね。

私が見つけた唯一のことは、cpupower frequency-info(Googleによると)そのような情報を含む行があるはずですが、私のシステムにはないということです。これは私の結果です。

~ 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:  Cannot determine or is not supported.
  hardware limits: 800 MHz - 3.80 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 800 MHz and 2.80 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 2.80 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes

これは私のCPU情報です。

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 158
model name  : Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
stepping    : 9
microcode   : 0x84
cpu MHz     : 2791.480
cache size  : 6144 KB
physical id : 0
siblings    : 8
core id     : 0
cpu cores   : 4
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 22
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves ibpb ibrs stibp dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp
bugs        : cpu_meltdown spectre_v1 spectre_v2
bogomips    : 5618.00
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

ベストアンサー1

あちこちで検索してみましたがコメントでわかるように頻度表はもはや維持されないようです。

周波数スケールが線形であると仮定すると、カタログを見るとおおよそのことがわかります。

入力を支援するために、次のエイリアスを作成します。

alias cpuinfo="paste <(ls *) <(cat *) | column -s $'\t' -t"

まず、周波数ステップ数を探します。

$ cd /sys/devices/system/cpu/intel_pstate
$ cpuinfo
max_perf_pct  100
min_perf_pct  22
no_turbo      0
num_pstates   28
status        active
turbo_pct     33

によって決定される28の周波数ステップがありますnum_pstates

次に、Turbo Boostの有効化/無効化状態に応じて変更できる最小および最大周波数MHzを見てみましょう。

cd /sys/devices/system/cpu/cpu0/cpufreq
$ cpuinfo
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                          837225
scaling_driver                            intel_pstate
scaling_governor                          powersave
scaling_max_freq                          3500000
scaling_min_freq                          800000
scaling_setspeed                          <unsupported>

後で自動的に頻度を表示するスクリプトを作成することもできますが、これを手動で実行してください。

  • 速度=( max- min)/ steps。例: (3500-800)/28=96.428
  • 28回繰り返します:速度=最後の速度+ステップ速度。たとえば、、、、、、、、、800.00...896.42992.8561089.2841185.7121282.14

頻度をリストするスクリプト

この関数をコピーして端末に貼り付けることができます。

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

800000
896428
992856
 . . .
3403556
3499984

columnインストールした場合は、次のコマンドを介してパイプすることをお勧めします。

$ 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

おすすめ記事