Skip to content

Instantly share code, notes, and snippets.

@matthewstokeley
Last active December 12, 2015 23:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthewstokeley/73c65469e3d7a8b4314e to your computer and use it in GitHub Desktop.
Save matthewstokeley/73c65469e3d7a8b4314e to your computer and use it in GitHub Desktop.
less /var/log/mysql/error.log
free -m
mysqltuner
tail -f /var/log/apache2/error.log
#!/bin/bash
SERVERIP=192.168.2.3
NOTIFYEMAIL=test@example.com
ping -c 3 $SERVERIP > /dev/null 2>&1
if [ $? -ne 0 ]
then
# Use your favorite mailer here:
mailx -s "Server $SERVERIP is down" -t "$NOTIFYEMAIL" < /dev/null
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment