cpufreq_lib 0.1.2

Wrapper arround the cpufreq fs
Documentation
  • Coverage
  • 96.55%
    28 out of 29 items documented0 out of 27 items with examples
  • Size
  • Source code size: 16.5 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.89 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • VitorRamos/cpufreq_rust
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • VitorRamos

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