Last active
September 11, 2022 00:17
-
-
Save 5731la/3fbd60d7bf140319f4a7de889123071e to your computer and use it in GitHub Desktop.
Stop folding at home automatically when FFMPEG begins encoding (NVIDIA GPU)
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 | |
export id=3 | |
while true | |
do | |
export out=`nvidia-smi --query-compute-apps=name --format=csv |grep ffmpeg|wc -l` | |
case "$out" in | |
"0") | |
FAHClient --send-unpause $id | |
;; | |
*) | |
FAHClient --send-pause $id | |
;; | |
esac | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment