Created
August 18, 2008 06:29
-
-
Save qingfeng/5943 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
#!/bin/sh | |
# 1.check filesystem | |
# 2.check mysql slave | |
echo "70 Filesystem:" | |
ssh 70 "df -htufs" | |
echo | |
for db in ip1 ip2 ip3 ip4 | |
do | |
echo $db" mysql:" | |
echo "show slave status\G"|mysql -uroot -h$db| \ | |
grep -e "Slave_IO_Running" -e "Slave_SQL_Running" \ | |
-e "Last_Error" -e "Last_Errno" | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment