Skip to content

Instantly share code, notes, and snippets.

@Chunlin-Li
Last active July 21, 2016 17:37
Show Gist options
  • Save Chunlin-Li/36aaf507d6032d8acf3e3d9c955f6a49 to your computer and use it in GitHub Desktop.
Save Chunlin-Li/36aaf507d6032d8acf3e3d9c955f6a49 to your computer and use it in GitHub Desktop.
linux 系统下 修改 modify cpu pstate p-state cpufreq cpu freq turbo

使用工具: pyamsoft/pstate-frequency

example :

# set max cpu freq to 60%
sudo pstate-frequency -d -S -m 60  

# disable cpu turbo
sudo pstate-frequency -d -S -t 1

script :

#!/bin/bash

if [[ $1 > 8 ]];then
        pstate-frequency -q -S -t 0
else
        pstate-frequency -q -S -t 1
fi
value=$(($1*10))
pstate-frequency -q -S -m ${value}
pstate-frequency -G -c
pstate-frequency -G --real

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment