3 releases

0.1.2 Aug 28, 2023
0.1.1 Aug 25, 2023
0.1.0 Aug 24, 2023

#738 in Filesystem

Download history 3/week @ 2024-02-16 4/week @ 2024-02-23 1/week @ 2024-03-01 39/week @ 2024-03-29 14/week @ 2024-04-05

53 downloads per month

MIT license

16KB
249 lines

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

lib.rs:

Wrapper arround the cpufreq fs

No runtime deps