Last active
October 25, 2016 02:35
-
-
Save gabeio/8a2f6be1fe3a4a2950dad4d05725a5f9 to your computer and use it in GitHub Desktop.
process pauser
This file contains hidden or 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 | |
| # A small script to keep a laptop cool while running something like an install for a long time | |
| # in this version it pauses all of the given process by name | |
| # usage: | |
| # ./pauser.sh <process name> <pause interval> | |
| while true; do | |
| pkill -CONT $1 | |
| sleep 1 | |
| pkill -STOP $1 | |
| sleep $2 | |
| done |
Author
Author
Author
Yes this will cause the install to run even longer but if you know it's going to run for an hour making it 2 hours and not melting the cpu as much might be enough of a bonus.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Example: 1 on 10 off pausing make
