powercap-set - manage power capping devices with the Linux power
capping framework
powercap-set -p NAME -z ZONE(S)
[OPTION]...
Sets configurations for a powercap control type.
- -h, --help
- Prints the help screen
- -p,
--control-type=NAME
- [REQUIRED] The powercap control type name. Must not be empty or contain a
'.' or '/'.
- -z,
--zone=ZONE(S)
- [REQUIRED] The zone/subzone numbers in the control type's powercap tree.
Separate zones/subzones with a colon. E.g., for zone 0, subzone 2:
-z 0:2
- -c,
--constraint=CONSTRAINT
- The constraint number (none by default)
The following zone-level arguments may be used together:
- -j,
--z-energy
- Reset zone energy counter
- -e,
--z-enabled=1|0
- Enable/disable a zone
The following constraint-level arguments may be used together and
require -c/--constraint:
- -l,
--c-power-limit=UW
- Set constraint power limit
- -s,
--c-time-window=US
- Set constraint time window
These examples use Intel RAPL, for which the control type is
intel-rapl.
- powercap-set -p
intel-rapl -z 0 -e 1
- Enable zone 0, which is usually named package-0.
- powercap-set -p
intel-rapl -z 0:1 -e 1
- Enable zone 0, subzone 1, which is usually the uncore or
dram subzone of package-0, depending on the system.
- powercap-set -p
intel-rapl -z 0 -c 1 -l 25000000
- Set a power cap of 25 Watts (25000000 uW) on zone 0, constraint 1, which
is usually the short_term constraint for package-0.
- powercap-set -p
intel-rapl -z 1:0 -c 0 -l 15000000 -s 976
- Set a power cap of 15 Watts (15000000 uW) and time window of 976
microseconds on zone 1, subzone 0, constraint 0, which is usually the
long_term (and only) constraint for the core subzone of
package-1 (a multi-socket system).
Administrative (root) privileges are usually needed to use
powercap-set.
Setting constraint power cap and/or time limit values does not
enable or disable a zone/subzone - the -e/--z-enabled flag must be set
explicitly.
The kernel may round power limits and time windows to discrete
values supported by the hardware, e.g., 28 seconds might round to 27983872
microseconds.
Power units: microwatts (uW)
Time units: microseconds (us)
Report bugs upstream at
<https://github.com/powercap/powercap>
/sys/devices/virtual/powercap/*
/sys/class/powercap/*
Connor Imes <connor.k.imes@gmail.com>