Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Monitor mysql slave status
watch -n 0.5 "echo 'show slave status\G' | mysql -uslave --password=slave | grep -v 'Ignore\|SSL\|Auto_P\|Until\|Last_IO\|Gtid' | tee /tmp/slave-status; grep Behind /tmp/slave-status | awk -F: '{print \$2/3600\" hours behind\"}'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.