6 releases

0.2.3 Nov 17, 2021
0.2.2 Apr 23, 2021
0.2.1 Apr 29, 2020
0.2.0 May 13, 2019
0.1.1 Dec 26, 2018

#112 in Unix APIs

Download history 330/week @ 2021-08-11 316/week @ 2021-08-18 167/week @ 2021-08-25 140/week @ 2021-09-01 129/week @ 2021-09-08 181/week @ 2021-09-15 159/week @ 2021-09-22 164/week @ 2021-09-29 132/week @ 2021-10-06 134/week @ 2021-10-13 143/week @ 2021-10-20 122/week @ 2021-10-27 185/week @ 2021-11-03 139/week @ 2021-11-10 164/week @ 2021-11-17 123/week @ 2021-11-24

629 downloads per month

MIT license

7KB
113 lines

intel-pstate

Rust crate for fetching and modifying intel_pstate kernel parameters.

use std::io;
use intel_pstate::PState;

fn main() -> io::Result<()> {
    if let Ok(pstate) = PState::new() {
        pstate.set_min_perf_pct(50)?;
        pstate.set_max_perf_pct(100)?;
        pstate.set_no_turbo(false)?;
    }

    Ok(())
}

lib.rs:

Crate for fetching and modifying the intel_pstate kernel parameters.

Example

use intel_pstate::{PState, PStateError};

fn main() -> Result<(), PStateError> {
    let pstate = PState::new()?;

    pstate.set_min_perf_pct(50)?;
    pstate.set_max_perf_pct(100)?;
    pstate.set_no_turbo(false)?;

    Ok(())
}

Dependencies

~355–780KB
~19K SLoC