#linux #intel #pstate

intel-pstate

Fetch and modify Intel pstate kernel parameters

3 unstable releases

✓ Uses Rust 2018 edition

0.2.0 May 13, 2019
0.1.1 Dec 26, 2018
0.1.0 Dec 6, 2018

#89 in Unix APIs

Download history 57/week @ 2019-01-28 37/week @ 2019-02-04 13/week @ 2019-02-11 14/week @ 2019-02-18 11/week @ 2019-02-25 22/week @ 2019-03-04 15/week @ 2019-03-11 20/week @ 2019-03-18 48/week @ 2019-03-25 10/week @ 2019-04-01 18/week @ 2019-04-08 25/week @ 2019-04-15 29/week @ 2019-04-22 26/week @ 2019-04-29 32/week @ 2019-05-06

93 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 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(())
}

Dependencies

~1MB
~19K SLoC