← 返回命令列表

Linux command

cpupower 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

List

sudo cpupower -c all info

Example

sudo cpupower -c all frequency-set --governor powersave

Example

sudo cpupower -c 0 frequency-info -g | grep "analyzing\|governors"

Example

sudo cpupower -c 4 frequency-info -w -m

说明

cpupower is a collection of tools for CPU power management and tuning. It replaces the older cpufrequtils package and provides unified access to frequency scaling, idle states, and power features. Subcommands include frequency-info, frequency-set, idle-info, idle-set, and monitor.

参数

-c, --cpu _cpus_
Specify CPU(s) to operate on (e.g., 0, 1-3, all)
frequency-info
Show current frequency settings.
frequency-set
Modify frequency settings.
idle-info
Show idle state information.
idle-set
Enable/disable specific idle states.
monitor
Report CPU frequency and idle residency statistics.
info
Show kernel configuration and hardware information.
-g, --governor
Set frequency governor (with frequency-set) or show available governors (with frequency-info).
-u, --max _FREQ_
Set maximum frequency (requires frequency-set).
-d, --min _FREQ_
Set minimum frequency (requires frequency-set).
-f, --freq _FREQ_
Set exact frequency (requires userspace governor).
-m, --human
Human-readable output.

FAQ

What is the cpupower command used for?

cpupower is a collection of tools for CPU power management and tuning. It replaces the older cpufrequtils package and provides unified access to frequency scaling, idle states, and power features. Subcommands include frequency-info, frequency-set, idle-info, idle-set, and monitor.

How do I run a basic cpupower example?

Run `sudo cpupower -c all info` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -c, --cpu _cpus_ do in cpupower?

Specify CPU(s) to operate on (e.g., 0, 1-3, all)