Or check out a very nice Perl snippet on the Forge:
http://forge.mysql.com/snippets/view.php?id=5
sheeri kritzer wrote:
I suggest writing a very simple shell script to run "SHOW SLAVE
STATUS" and output it to a file every 15 seconds, to verify your
script is working. I have never seen MySQL give a bad lag time for
replication -- it's always been accurate for lag time, or 0, or NULL.
As a bonus you could then use the data from the log files and
positions to actually calculate how far behind it was, and file a bug
report if indeed the server is wonky.
-Sheeri
On 5/19/06, Martijn van den Burg <[EMAIL PROTECTED]> wrote:
> That is weird. If it only lasts a couple of seconds, how are you
> monitoring it to find out what the lag time is?
I've written a replication monitor script using Perl::POE, which checks
replication lag every 15 seconds or so (can't check the exact interval
now -
weekend has begun here).
--
</Martijn>
--
Jay Pipes
Community Relations Manager, North America, MySQL Inc.
Roaming North America, based in Columbus, Ohio
email: [EMAIL PROTECTED] mob: +1 614 406 1267
Are You MySQL Certified? http://www.mysql.com/certification
Got Cluster? http://www.mysql.com/cluster
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]