-
-
Save kewitz/55d9db86aa68197c5bc7 to your computer and use it in GitHub Desktop.
intel_pstate max cpu-frequency bash script.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copyleft 2015 - Leonardo Kewitz github.com/kewitz | |
# intel_pstate max cpu-frequency script. | |
PMAX=/sys/devices/system/cpu/intel_pstate/max_perf_pct | |
CPUINFO=/proc/cpuinfo | |
if [ "$#" != "1" ] | |
then | |
echo -e "Usage: cpf 30-100" | |
else | |
sudo tee $PMAX <<<$1 | |
fi | |
# Print current status... | |
PCT=$(<$PMAX) | |
MHZ=$(egrep -m 1 -o 'MHz.+\: (([[:digit:]]|\.)+$)' /proc/cpuinfo | egrep -o '([[:digit:]]|\.)+') | |
echo -e "Max performance currently at $PCT %. Actual clock $MHZ MHz" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment