Comment 6 for bug 1328686

Revision history for this message
Brian Lee (chinchy) wrote :

This seems like it's still an issue for me.

pt-heartbeat --version
pt-heartbeat 2.2.17

Server version: 5.5.48-37.8-log Percona Server (GPL), Release 37.8, Revision c8ae1b6

Linux kernel 2.6.32-504.23.4.el6.x86_64

Target Server:
mysql> show global variables like 'read_only';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| read_only | ON |
+---------------+-------+
1 row in set (0.04 sec)

mysql> select * From heartbeat;
+----------------------------+-----------+--------------------------+----------+-----------------------+---------------------+
| ts | server_id | file | position | relay_master_log_file | exec_master_log_pos |
+----------------------------+-----------+--------------------------+----------+-----------------------+---------------------+
| 2016-04-11T23:26:02.003620 | 3001 | percona-01-bin.000231 | 23389229 | NULL | NULL |
| 2016-04-11T23:26:02.002950 | 3011 | percona-11-bin.000202 | 23818867 | NULL | NULL |
+----------------------------+-----------+--------------------------+----------+-----------------------+---------------------+
2 rows in set (0.03 sec)

Execute the pt-heartbeat command:

$ sudo pt-heartbeat h=percona-3.iad,P=3306,u=toolkit --check-read-only --update --interval 1.0 --database heartbeat --table heartbeat --ask-pass --pid /var/lib/mysql/pt-heartbeat.pid
Enter password:
Overwriting PID file /var/lib/mysql/pt-heartbeat.pid because the PID that it contains, 1416, is not running at /usr/bin/pt-heartbeat line 3095.
Overwriting PID file /var/lib/mysql/pt-heartbeat.pid because the PID that it contains, 1416, is not running at /usr/bin/pt-heartbeat line 3095.

Check database:
mysql> select * From heartbeat;
+----------------------------+-----------+--------------------------+----------+-----------------------+---------------------+
| ts | server_id | file | position | relay_master_log_file | exec_master_log_pos |
+----------------------------+-----------+--------------------------+----------+-----------------------+---------------------+
| 2016-04-11T23:29:00.003060 | 3001 | percona-01-bin.000231 | 23448147 | NULL | NULL |
| 2016-04-11T23:27:54.002420 | 3003 | percona-03-bin.000230 | 52568 | NULL | NULL |
| 2016-04-11T23:28:59.003110 | 3011 | percona-11-bin.000202 | 23877454 | NULL | NULL |
+----------------------------+-----------+--------------------------+----------+-----------------------+---------------------+
3 rows in set (0.03 sec)

mysql> show global variables like 'read_only';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| read_only | ON |
+---------------+-------+
1 row in set (0.03 sec)