Created
March 7, 2012 23:15
-
-
Save kjoconnor/1997099 to your computer and use it in GitHub Desktop.
Do something if memory is below X
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
if [ `sudo cat /proc/meminfo | grep MemFree | awk '{print $2;}'` -lt "200000" ]; then sudo /etc/init.d/apache2 restart ; fi | |
-- | |
sudo monit summary | grep -i rabbit | grep running ; if [ "$?" -ne "0" ]; then sudo /etc/init.d/rabbitmq-server stop; sudo /etc/init.d/rabbitmq-server start; sudo monit monitor rabbitmq-server; fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment