Created
March 18, 2019 20:13
-
-
Save amotl/b81cc68e4fbd7d82e078cfaa836f4767 to your computer and use it in GitHub Desktop.
Increase scheduling priority for ffmpeg and packager processes
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 | |
| # https://www.tecmint.com/set-linux-process-priority-using-nice-and-renice-commands/ | |
| processnames="ffmpeg packager" | |
| niceness="-10" | |
| for name in $processnames; do | |
| echo "Renicing $name" | |
| pids=$( pidof $name ) | |
| for pid in $pids; do | |
| #echo $pid | |
| renice --priority $niceness --pid $pid | |
| done | |
| echo "Reniced processes: $pids" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment