Skip to content

Instantly share code, notes, and snippets.

@qingfeng
Created August 18, 2008 06:29
Show Gist options
  • Save qingfeng/5943 to your computer and use it in GitHub Desktop.
Save qingfeng/5943 to your computer and use it in GitHub Desktop.
#!/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