Skip to content

Instantly share code, notes, and snippets.

@riaf
Created November 28, 2011 09:22
Show Gist options
  • Save riaf/1399744 to your computer and use it in GitHub Desktop.
Save riaf/1399744 to your computer and use it in GitHub Desktop.
Growl が暴走したら再起動してほしくて ref: http://qiita.com/items/1158
#!/bin/sh
CPU_USAGE=`ps aux | grep Growl.app | sed -e 's/ */ /g' -e 's/ /=/g' -e ' 2d' | cut -d '=' -f 3 | cut -d '.' -f 1`
if [ $CPU_USAGE -gt 20 ]; then
killall Growl
open /Applications/Growl.app
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment