3 releases
0.1.2 | Aug 28, 2023 |
---|---|
0.1.1 | Aug 25, 2023 |
0.1.0 | Aug 24, 2023 |
#1026 in Filesystem
16KB
249 lines
cpufreq_lib
Wrapper around cpu filesystem (/sys/devices/system/cpu/) to control various aspects.
Features
- Get and set current frenquency and governor.
- Enable and disable cores.
- Disable hyperthread
Crate
Installation
$ cargo add cpufreq_lib
Example
use cpufreq::CPU;
let cpu = CPU::new().unwrap();
let freqs = cpu.online().expect("Unable to read online cpus");
cpu.disable(1).unwrap();
lib.rs
:
Wrapper arround the cpufreq fs