cpufreq_lib

Crates.iocpufreq_lib
lib.rscpufreq_lib
version0.1.2
sourcesrc
created_at2023-08-24 19:49:43.817362
updated_at2023-08-28 05:51:52.232147
descriptionWrapper arround the cpufreq fs
homepage
repositoryhttps://github.com/VitorRamos/cpufreq_rust
max_upload_size
id954136
size16,831
Vitor Ramos (VitorRamos)

documentation

README

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();
Commit count: 19

cargo fmt