Skip to content

Instantly share code, notes, and snippets.

@sungamagnus
Forked from rowan-m/nice-ionice-example.sh
Created August 9, 2013 22:37
Show Gist options
  • Select an option

  • Save sungamagnus/6197881 to your computer and use it in GitHub Desktop.

Select an option

Save sungamagnus/6197881 to your computer and use it in GitHub Desktop.
#!/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