Skip to content

Instantly share code, notes, and snippets.

@KuJoe
Created August 27, 2019 05:49
Show Gist options
  • Save KuJoe/445bca3099395bf2011db3151e7531d7 to your computer and use it in GitHub Desktop.
Save KuJoe/445bca3099395bf2011db3151e7531d7 to your computer and use it in GitHub Desktop.
Find and set CPU priority
PID=`ps -ef | grep "PROCESSNAME" | grep -v "grep" | awk '{print $2}'`
for i in $PID; do sleep 1;
sudo /usr/bin/renice +10 $i;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment