8 releases (2 stable)
1.0.1 | Feb 25, 2022 |
---|---|
0.2.3 | Nov 17, 2021 |
0.2.2 | Apr 23, 2021 |
0.2.1 | Apr 29, 2020 |
0.1.1 | Dec 26, 2018 |
#909 in Unix APIs
413 downloads per month
9KB
144 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()?;
let _ = pstate.set_hwp_dynamic_boost(true);
pstate.set_min_perf_pct(50)?;
pstate.set_max_perf_pct(100)?;
pstate.set_no_turbo(false)?;
Ok(())
}
Dependencies
~0.6–1MB
~23K SLoC