Created
February 22, 2012 16:58
-
-
Save ruskotron/1886015 to your computer and use it in GitHub Desktop.
Skype Watchdog
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
while sleep 1; do top -b | awk '$12 != "skype" {next} {print} $9 < 90 {n=0;next} {n+=1} n > 10 {exit}' ; pkill -9 "^skype$" ; skype & done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
updated so /only/ skype is pkilled (not any other ps with 'skype' in the name e.g. this script!)