.TH "powercap-set" "1" "2017-09-20" "powercap" "powercap-set" .SH "NAME" .LP powercap\-set \- manage power capping devices with the Linux power capping framework .SH "SYNPOSIS" .LP \fBpowercap\-set \-p\fP \fINAME\fP \fB\-z\fP \fIZONE(S)\fP [\fIOPTION\fP]... .SH "DESCRIPTION" .LP Sets configurations for a powercap control type. .SH "OPTIONS" .LP .TP \fB\-h,\fR \fB\-\-help\fR Prints the help screen .TP \fB\-p,\fR \fB\-\-control\-type\fR=\fINAME\fP [REQUIRED] The powercap control type name. Must not be empty or contain a '.' or '/'. .TP \fB\-z,\fR \fB\-\-zone=\fR\fIZONE(S)\fP [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: .br \fB\-z 0:2\fP .TP \fB\-c,\fR \fB\-\-constraint\fR=\fICONSTRAINT\fP The constraint number (none by default) .LP The following zone-level arguments may be used together: .TP \fB\-j,\fR \fB\-\-z\-energy\fR Reset zone energy counter .TP \fB\-e,\fR \fB\-\-z\-enabled=1|0\fR Enable/disable a zone .LP The following constraint-level arguments may be used together and require \-c/\-\-constraint: .TP \fB\-l,\fR \fB\-\-c\-power\-limit=UW\fR Set constraint power limit .TP \fB\-s,\fR \fB\-\-c\-time\-window=US\fR Set constraint time window .SH "EXAMPLES" .LP These examples use Intel RAPL, for which the control type is \fBintel\-rapl\fR. .TP \fBpowercap\-set \-p intel\-rapl \-z 0 \-e 1\fP Enable zone 0, which is usually named \fBpackage\-0\fR. .TP \fBpowercap\-set \-p intel\-rapl \-z 0:1 \-e 1\fP Enable zone 0, subzone 1, which is usually the \fBuncore\fR or \fBdram\fR subzone of \fBpackage\-0\fR, depending on the system. .TP \fBpowercap\-set \-p intel\-rapl \-z 0 \-c 1 \-l 25000000\fP Set a power cap of 25 Watts (25000000 uW) on zone 0, constraint 1, which is usually the \fBshort_term\fR constraint for \fBpackage\-0\fR. .TP \fBpowercap\-set \-p intel\-rapl \-z 1:0 \-c 0 \-l 15000000 \-s 976\fP 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 \fBlong_term\fR (and only) constraint for the \fBcore\fR subzone of \fBpackage\-1\fR (a multi-socket system). .SH "REMARKS" .LP Administrative (root) privileges are usually needed to use \fBpowercap\-set\fR. .LP 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. .LP 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. .LP Power units: microwatts (uW) .br Time units: microseconds (us) .SH "BUGS" .LP Report bugs upstream at .SH "FILES" .nf \fI/sys/devices/virtual/powercap/*\fP .nf \fI/sys/class/powercap/*\fP .fi .SH "AUTHORS" .nf Connor Imes .fi .SH "SEE ALSO" .LP powercap\-info(1), rapl-info(1), rapl-set(1)