Created
May 14, 2012 12:30
-
-
Save rowan-m/2693690 to your computer and use it in GitHub Desktop.
Using nice and ionice
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 | |
# If the process is already running, you can use the following: | |
PID=`pgrep processname` | |
renice -n 19 $PID | |
ionice -c 3 -p $PID | |
# For new processes, just chain them together | |
nice -n 19 ionice -c 3 processname |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment