mirror of
https://github.com/RGBCube/superfreq
synced 2025-07-27 17:07:44 +00:00
cli: more command logic to a dedicated module; add debug cmd
This commit is contained in:
parent
ea84a2997b
commit
dde938b638
6 changed files with 254 additions and 3 deletions
|
@ -417,7 +417,14 @@ pub fn get_cpu_global_info(cpu_cores: &[CpuCoreInfo]) -> CpuGlobalInfo {
|
|||
None
|
||||
};
|
||||
|
||||
let available_governors = get_platform_profiles().unwrap_or_else(|_| vec![]);
|
||||
let available_governors = if cpufreq_base.join("scaling_available_governors").exists() {
|
||||
read_sysfs_file_trimmed(cpufreq_base.join("scaling_available_governors")).map_or_else(
|
||||
|_| vec![],
|
||||
|s| s.split_whitespace().map(String::from).collect(),
|
||||
)
|
||||
} else {
|
||||
vec![]
|
||||
};
|
||||
|
||||
let turbo_status = if turbo_status_path.exists() {
|
||||
// 0 means turbo enabled, 1 means disabled for intel_pstate
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue