cpupower 工具
查看所有可用的模块,运行以下命令:
ls /usr/lib/modules/$(uname -r)/kernel/drivers/cpufreq/
查询到 CPU 的信息
cpupower frequency-info
名称 | 说明 |
driver | 当前使用的驱动 |
hardware limits | cpu的频率可调范围 |
available cpufreq governors | 硬件支持有效调速器 |
current policy | 当前的电源计划 |
current CPU frequency | 当前的CPU频率速度 |
设置最大时钟频率(CLOCK_FREQ 为时钟频率,单位为:GHz, MHz)
#cpupower frequency-set -u CLOCK_FREQ
cpupower frequency-set -u 1GHz
cpupower frequency-set -u 800MHz
设置最小时钟频率
#cpupower frequency-set -d CLOCK_FREQ
cpupower frequency-set -d 1GHz
cpupower frequency-set -d 800MHz
设置运行于指定频率
#cpupower frequency-set -f CLOCK_FREQ
调整调速器
cpupower frequency-set -g governor
cpupower frequency-set -g ondemand
参考
https://wiki.archlinux.org/title/CPU_frequency_scaling_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)