Created
May 5, 2022 20:08
-
-
Save trappedinspacetime/0e05aa7ce8a7475141601f6cb45455ce to your computer and use it in GitHub Desktop.
limit chromium cpu
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
while true; do cpulimit -p $( while true ; do if [[ ! -z $(pstree -p -a | awk '/chromium-browser/ && !/awk/' | grep -oP "(?<=sh,).*[0-9]+") ]]; then echo "$(pstree -p -a | awk '/chromium-browser/ && !/awk/' | grep -oP "(?<=sh,).*[0-9]+")"; break; fi; sleep 2; done ) -l 60; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment