RE: Replication check script
(No, I don't have a script, but...)
- SHOW SLAVE STATUS tells you if both threads are running -- important.
Checking how far behind each thread is is messy, but sometimes useful.
Also, last-err tells you if repl is stuck due to corruption.
- Tough one. You should alter your application to avoid such.
There have been times when SLAVE STOP; SLAVE STOP; was all it took to get a
stuck slave going again. Never figured out what the cause was.
> -----Original Message----- > From: Matt Juszczak [mailto:matt@atopia.net] > Sent: Friday, August 10, 2007 8:49 AM > To: replication@lists.mysql.com > Subject: Replication check script > > Does anyone have a decent replication check script that > checks the following: > > A) Does multiple polls to verify exec_master_log_pos and > relay_master_log_pos are changing, so that, even if > replication is behind, > we still know that it is actually working (IE: I've seen > seconds behind > master as 0 because the slave lost connection to the master > but didn't > actually know it. Checking exec_master_log_pos verifies that > indeed, the > replication aspect of things is working, even if its behind. > > B) Can tell the difference between replication actually being behind > (lagging behind) and the times of replication being behind > because of a > slow running query or a locked query on the slave (As in, the > SQL thread > and I/O threads are working fine, but they are just waiting > for a query on > the slave to finish, so seconds behind master is showing a 10 or 15 > second value, but as soon as the query is done, replication > catches up: in > my opinion, this is only something to warn about, not take > replication > down for). > > Thanks, > > Matt > > > -- > MySQL Replication Mailing List > For list archives: http://lists.mysql.com/replication > To unsubscribe: > http://lists.mysql.com/replication?unsub=rjames@yahoo-inc.com > >
--
MySQL Replication Mailing List
For list archives:
http://lists.mysql.com/replication
To unsubscribe:
http://lists.mysql.com/replication?unsub=lists@pantek.com
Received on Fri Aug 10 12:40:40 2007
This archive was generated by hypermail 2.1.8
: Sun Oct 07 2007 - 10:14:21 EDT
|