Created
June 4, 2016 06:08
-
-
Save tanishiking/2b4130fdbb9f7ab9df7c08c7f07de19d to your computer and use it in GitHub Desktop.
簡易的なプロセス死活監視スクリプト
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
#!/usr/bin/sh | |
process="" | |
while true; do | |
is_alive=`ps aux | grep "$process" | grep -v grep | wc -l` | |
if [[ $is_alive -eq 0 ]]; then | |
echo "process dead!!!!" | |
break | |
fi | |
sleep 10 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment