1
# ############################################################################
7
mk-heartbeat - Monitor MySQL replication delay.
11
Specify at least one of L<"--stop">, --update, --monitor, or --check.
13
--update, --monitor, and --check are mutually exclusive.
15
--daemonize and --check are mutually exclusive.
29
Prompts the user for a password when connecting to MySQL.
33
short form: -A; type: string
35
Default character set.
37
Enables character set settings in Perl and MySQL. If the value is C<utf8>, sets
38
Perl's binmode on STDOUT to utf8, passes the C<mysql_enable_utf8> option to
39
DBD::mysql, and runs C<SET NAMES UTF8> after connecting to MySQL. Any other
40
value sets binmode on STDOUT without the utf8 layer, and runs C<SET NAMES> after
45
short form: -D; type: string
47
The database to use for the connection.
51
short form: -i; type: time; default: 1s
53
Interval L<"between"> C<updates> and checks.
56
The updates and checks will happen when the Unix time (seconds since epoch) is
57
an even multiple of this value. The default is one second. The suffix is
58
similar to L<"--frames">.
62
type: string; default: wait_timeout=10000
64
Set these MySQL variables.
66
Specify any variables you want to be set immediately after connecting to MySQL.
67
These will be included in a C<SET> command.
71
short form: -s; type: size
77
short form: -k; type: int; default: 0
79
Delay --monitor checks this many usec.
81
How long to delay checks, in milliseconds. The default is to delay checks one
82
half second. Since the update happens as soon as possible after the beginning
83
of the second on the master, this allows one half second of replication delay
84
before reporting that the slave lags the master by one second. If your clocks
85
are not completely accurate or there is some other reason you'd like to delay
86
the slave more or less, you can tweak this value. Try setting the C<MKDEBUG>
87
environment variable to see the effect this has.
91
short form: -v; cumulative: yes
111
The following options should not be parsed.
117
This item is not part of the main option list and should not be read.
123
The environment variable C<MKDEBUG> enables verbose debugging output in all of the
128
=head1 SYSTEM REQUIREMENTS
130
You need Perl, DBI, DBD::mysql, and some core packages that ought to be
131
installed in any reasonably new version of Perl.
135
See also L<mk-slave-delay> and L<mk-slave-restart>.
139
Please use the Sourceforge bug tracker, forums, and mailing lists to request
140
support or report bugs: L<http://sourceforge.net/projects/maatkit/>.
142
Please include the complete command-line used to reproduce the problem you are
143
seeing, the version of all MySQL servers involved, the complete output of the
144
tool when run with L<"--version">, and if possible, debugging output produced by
145
running with the C<MKDEBUG=1> environment variable.
147
=head1 COPYRIGHT, LICENSE AND WARRANTY
149
This program is copyright (c) 2006 Proven Scaling LLC and SixApart Ltd, and
150
(c) 2007 Baron Schwartz. Feedback and improvements are welcome.
152
THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
153
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
154
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
156
This program is free software; you can redistribute it and/or modify it under
157
the terms of the GNU General Public License as published by the Free Software
158
Foundation, version 2; OR the Perl Artistic License. On UNIX and similar
159
systems, you can issue `man perlgpl' or `man perlartistic' to read these
162
You should have received a copy of the GNU General Public License along with
163
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
164
Place, Suite 330, Boston, MA 02111-1307 USA.
168
Proven Scaling LLC, SixApart Ltd, and Baron Schwartz.
172
This manual page documents Ver @VERSION@ Distrib @DISTRIB@ $Revision: 1929 $.