4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Growl が暴走したら再起動してほしくて

4
Last updated at Posted at 2012-03-16

いやまあ、ちゃんとプロセス監視とかしろっていう話かもしれないけど、ローカルの環境とか頑張りたくないのでこういう cron とか動かせばいいかなって。

#!/bin/sh

CPU_USAGE=`ps aux | grep Growl.app | sed -e 's/  */ /g' -e 's/ /=/g' -e ' 1d' | cut -d '=' -f 3 | cut -d '.' -f 1`

if [ $CPU_USAGE -gt 20 ]; then
    killall Growl
    open /Applications/Growl.app
fi
4
4
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?