cpufreq_lib 0.1.2

Wrapper arround the cpufreq fs
Documentation

cpufreq_lib

Rust

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();