Skip to content

Instantly share code, notes, and snippets.

@sherl0cks
Last active May 10, 2017 12:58
Show Gist options
  • Save sherl0cks/ae12ef6a94fc6113514daf0f0f71d950 to your computer and use it in GitHub Desktop.
Save sherl0cks/ae12ef6a94fc6113514daf0f0f71d950 to your computer and use it in GitHub Desktop.
Simple way to set the power profile
# /bin/bash
profiles=($(tuned-adm list | awk 'NR > 1 {print $2}'))
echo -e "\n"
for ((i=0; i < ${#profiles}; i++))
do
echo $i -- ${profiles[$i]}
done
echo -e "\nEnter the number of the profile you want to use from the list above:"
read index
echo "Setting profile to ${profiles[$index]}..."
tuned-adm profile ${profiles[$index]}
tuned-adm active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment