02.10.2015 Views

Tungsten Replicator 2.2 Manual

Tungsten Replicator 2.2 Manual - VMware

Tungsten Replicator 2.2 Manual - VMware

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 5. Operations Guide<br />

There are a number of key operations that enable you to monitor and manage your replication cluster. <strong>Tungsten</strong> <strong>Replicator</strong> includes a<br />

small number of tools that can help with this process, including the core trepctl command, for controlling the replication system, and<br />

thl, which provides an interface to the <strong>Tungsten</strong> History Log and information about the changes that have been recorded to the log and<br />

distributed to the slaves.<br />

During the installation process the file /opt/continuent/share/env.sh will have been created which will seed the shell with the necessary<br />

$PATH and other details to more easily manage your cluster. You can load this script manually using:<br />

shell> source /opt/continuent/share/env.sh<br />

Once loaded, all of the tools for controlling and monitoring your replicator installation should be part of your standard PATH.<br />

5.1. Checking Replication Status<br />

To check the replication status you can use the trepctl command. This accepts a number of command-specific verbs that provide status<br />

and control information for your configured cluster. The basic format of the command is:<br />

shell> trepctl [-host hostname] command<br />

The -host option is not required, and enables you to check the status of a different host than the current node.<br />

To get the basic information about the currently configured services on a node and current status, use the services verb command:<br />

shell> trepctl services<br />

Processing services command...<br />

NAME<br />

VALUE<br />

---- -----<br />

appliedLastSeqno: 211<br />

appliedLatency : 17.66<br />

role<br />

: slave<br />

serviceName : firstrep<br />

serviceType : local<br />

started<br />

: true<br />

state<br />

: ONLINE<br />

Finished services command...<br />

In the above example, the output shows the last sequence number and latency of the host, in this case a slave, compared to the master<br />

from which it is processing information. In this example, the last sequence number and the latency between that sequence being<br />

processed on the master and applied to the slave is 17.66 seconds. You can compare this information to that provided by the master,<br />

either by logging into the master and running the same command, or by using the host command-line option:<br />

shell> trepctl -host host1 services<br />

Processing services command...<br />

NAME<br />

VALUE<br />

---- -----<br />

appliedLastSeqno: 365<br />

appliedLatency : 0.614<br />

role<br />

: master<br />

serviceName : firstrep<br />

serviceType : local<br />

started<br />

: true<br />

state<br />

: ONLINE<br />

Finished services command...<br />

By comparing the appliedLastSeqno for the master against the value on the slave, it is possible to determine that the slave and the master<br />

are not yet synchronized.<br />

For a more detailed output of the current status, use the status command, which provides much more detailed output of the current<br />

replication status:<br />

shell> trepctl status<br />

Processing status command...<br />

NAME<br />

VALUE<br />

---- -----<br />

appliedLastEventId : mysql-bin.000064:0000000002757461;0<br />

appliedLastSeqno : 212<br />

appliedLatency : 263.43<br />

channels : 1<br />

clusterName<br />

: default<br />

currentEventId<br />

: NONE<br />

currentTimeMillis : 1365082088916<br />

dataServerHost<br />

: host2<br />

extensions :<br />

latestEpochNumber : 0<br />

125

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!