update msrv
use inspect rather than map for trace logging
update Cargo.lock, silence dead code warnings for conversion traits
knobs
is a command-line tool for setting and displaying clock frequencies, power limits, and related values on Linux systems.
knobs
provides a daemon and client that communicate via Unix domain socket. The daemon runs as root and performs system io on
behalf of the client, which typically runs as a non-root user. Access to the daemon is determined by ownership and mode of the socket.
knobs
can be used on desktops, headless servers, gaming handhelds, smart phones, network devices, and more.
Name | Capability | Feature |
---|---|---|
amd-pstate | epp | default |
amdgpu | perf level, perf mode | default |
cpu | online/offline, smt | default |
cpufreq | min/max frequencies, boost, governor | default |
drm | list cards, drivers, and bus ids | default |
i915 | min/max/boost frequencies | default |
intel-pstate | epb, epp, no_turbo, etc. | default |
intel-rapl | short/long limit, short/long window | default |
intel-uncore | min/max frequencies | default |
ryzen | libryzenadj front-end | ryzen |
When invoked, a knobs
subcommand will...
-q/--quiet
.See knobs --help
for more information.
$ knobs cpu --id 1.. --on 0
$ knobs cpufreq --gov list
ondemand
for all cpufreq policies.$ knobs cpufreq --id .. --gov ondemand
$ knobs intel-pstate --epp list
balance_power
for CPUs 0 through 11 (Intel systems).$ knobs intel-pstate --id ..11 --epp balance_power
$ knobs amdgpu --perf-mode list
manual
and mode to 5
(e.g. COMPUTE on 6900 XT).$ knobs amdgpu --id 0 --perf-level manual --perf-mode 5
Subcommands (and their aliases) can be run as stand-alone commands via symlinks, a la busybox.
$ ln -s $(which knobs) cpufreq
$ ./cpufreq
Pol CPU Gov Cur Min Max Min lim Max lim
--- --- ----------- ------- ------- ------- ------- -------
0 0 performance 800 MHz 800 MHz 5.3 GHz 800 MHz 5.3 GHz
...etc...
$ ln -s $(which knobs) intel-rapl
$ ./intel-rapl
Enable Zone Name Long lim Short lim Long win Short win Usage
------ ---- --------- -------- --------- ----------- --------- ------
yes 0 package-0 250.0 W 250.0 W 55967744 μs 2440 μs 26.6 W
...etc...
Most device IDs (-i
/--id
) can be passed as...
-i 0 --id 0
-i 10 --id 10
-i 0..12 --id 0..12
-i 0.. --id 0..
-i ..12 --id ..12
-i .. --id ..
-i ..5,6,7,8..10,20.. --id ..5,6,7,8..10,20..