This section describes how to monitor TCapture Replication Server status processes .
Internal processes are of type:
- M master process
- S slave process
- H monitor process
n_id | n_name | n_shouldbe | n_state | n_operation | n_type | n_mstr | n_dateop | n_datecrea | n_pid
<0-5> <node> <up/down> <start/stop/shutdown> <managed/start/stop/shutdown> <M/S/H> <masternode> <date last operation> <date creation> <internal pid>
you can start/stop TCapture internal threads with TC_srvctl.sh –start/stop command
sh TC_srvctl.sh --stop --node swap --type producer
in the log:
INFO | 2020-01-10 16:00:48.649 | [main] edslab.TCRepSrv (TCRepSrv.java:270) - TCapt Thread name:TC-swap_898 is going to be stopped!
INFO | 2020-01-10 16:00:48.649 | [main] edslab.TCRepSrv (TCRepSrv.java:270) - TCapt Thread name:TC-swap_898 is going to be stopped!
sh TC_srvctl.sh --start --node swap --type producer
in the log:
INFO | 2020-01-10 16:02:42.799 | [main] edslab.TCapt (TCapt.java:735) - Running TCapt for node :swap
INFO | 2020-01-10 16:02:42.801 | [TC-swap] edslab.TCapt (TCapt.java:164) - TC-swap_278: is in running state
you can check status of TCapture internal threads with TC_srvctl.sh –status command
sh TC_srvctl.sh --status --node qas --type consumer
Launching..
Configuration file: /var/lib/pgsql/scripts/mycode/tcrepsrv-dev/conf/qas_bdr_rdb.conf review
Reading Status from _rdb_bdr.tc_process
----------------------------------------------------------------------------------------------
Status node swap of type S
id:0 should_be:up status:start pending_op:managed last_op:2020-01-1015:08:00
sh TC_srvctl.sh --status --node swap --type producer
Launching..
Configuration file: /var/lib/pgsql/scripts/mycode/tcrepsrv-dev/conf/swap_rdb_bdr.conf review
Reading Status from _rdb_bdr.tc_process
----------------------------------------------------------------------------------------------
Status node swap of type M
id:0 should_be:up status:start pending_op:managed last_op:2020-01-1015:08:22
----------------------------------------------------------------------------------------------
Status node swap of type H
id:0 should_be:up status:start pending_op:managed last_op:2020-01-1015:08:22
or you can investigate the _rdb_bdr.tc_process table under rdb_db__node database:
rdb_db__swap=# select * from _rdb_bdr.tc_process ;
n_id | n_name | n_shouldbe | n_state | n_operation | n_type | n_mstr | n_dateop | n_datecrea | n_pid
------+--------+------------+---------+-------------+--------+--------+----------------------------+----------------------------+-------
0 | swap | up | start | managed | M | swap | 2020-01-10 15:08:22.409342 | 2020-01-10 13:28:15.622296 | 96
0 | swap | up | start | managed | H | swap | 2020-01-10 15:08:22.423165 | 2020-01-10 13:28:15.623324 | 99304
(2 rows)
rdb_db__swap=# select * from _rdb_bdr.tc_monit;
db_xid_last_committed | db_last_committed_dateop | wal_lsn | q_xid | q_dateop | q_lsn | state | check_dateop | n_mstr | n_slv | flushed_lsn | xid_offset
-----------------------+----------------------------+---------------+------------+----------------------------+--------------+-------+----------------------------+--------+-------+---------------+------------
2015417146 | 2020-01-10 16:08:13.529417 | 33B8/104A3188 | 2015408553 | 2020-01-10 15:18:44.216581 | 33B8/F0E0850 | f | 2020-01-10 16:08:14.227641 | swap | swap | 33B8/104A2670 |
| | | 2015408553 | 2020-01-10 15:18:44.216581 | | t | 2020-01-10 16:08:14.238013 | swap | qas | 33B8/104A3188 | 2015408553
(2 rows)