Last active
August 29, 2015 14:21
-
-
Save debbbbie/f7b3001aa593bd625fbd to your computer and use it in GitHub Desktop.
status_check_shell
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
prog_stats memcached |
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
prog_stats mysqld |
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
function prog_stats(){ | |
if `ps awx|grep -v grep |grep -q $1` ; then | |
printf "\033[0;32mRunning" | |
return 0 | |
else | |
printf "\033[0;31mDead" | |
return -1 | |
fi | |
} |
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
prog_stats redis-server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment