5 releases

0.2.2 Apr 23, 2021
0.2.1 Apr 29, 2020
0.2.0 May 13, 2019
0.1.1 Dec 26, 2018
0.1.0 Dec 6, 2018

#57 in Unix APIs

Download history 125/week @ 2021-01-09 126/week @ 2021-01-16 134/week @ 2021-01-23 250/week @ 2021-01-30 334/week @ 2021-02-06 376/week @ 2021-02-13 382/week @ 2021-02-20 206/week @ 2021-02-27 285/week @ 2021-03-06 214/week @ 2021-03-13 256/week @ 2021-03-20 254/week @ 2021-03-27 306/week @ 2021-04-03 267/week @ 2021-04-10 300/week @ 2021-04-17 242/week @ 2021-04-24

1,172 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

~360–790KB
~19K SLoC