8.19.3.16. trepctl qs Command

The trepctl qs (quickstatus) command provides a quicker, simpler, status display for the replicator showing only the critical information in a human-readable form. For example:

shell> trepctl qs
State: alpha Online for 4.21s, running for 1781.766s
Latency: 18.0s from source DB commit time on thl://ubuntuheterosrc.mcb:2112/ into target database
         1216.315s since last source commit
Sequence: 4804 last applied, 0 transactions behind (0-4804 stored) estimate 0.00s before synchronization

The information presented is as follows:

  • State: alpha Online for 4.21s, running for 1781.766s

    The top line shows the basic status information about the replicator:

    • The name of the service (alpha).

    • The replicator's current state (Online) and the time in that state.

    • The amount of time the replicator has been running.

  • Latency: 18.0s from source DB commit time on thl://ubuntuheterosrc.mcb:2112/ into target database

    The second lines shows the latency information, the information shown is based on the role of the replicator. The above line is shown on an applier, where the latency information shows the write delay into the target database, where the information is coming from, and applying to the target database. For a Primary (extractor) the information shown describes the latency from extraction into the THL files:

    State: alpha Online for 1699091.442s, running for 1699093.138s
    Latency: 0.113s from DB commit time on ubuntuheterosrc into THL
             1679.354s since last database commit
    Sequence: 4859 last applied, 0 transactions behind (0-4859 stored) estimate 0.00s before synchronization
  • 1216.315s since last source commit

    The next line shows the interval since the last time there was a database commit. On a Primary (extractor) is the time between the last database commit to the binary log and the information being written to THL. On a Replica, it's the time between the last database commit on the source database and when the transaction was written to the target.

  • Sequence: 4804 last applied, 0 transactions behind (0-4804 stored) estimate 0.00s before synchronization

    The last line shows the sequence information:

    • The last applied sequence number (to THL on a Primary, or to the target database on a Replica).

    • The number of transactions behind the current stored transaction list. This is an indication on a Replica of how far behind in transactions (not latency) the Replica is from the Primary.

    • The range of transactions currently stored (from minimum to maximum stored sequence number).

    • An estimate of the how long it will take to apply the outstanding transactions. The calculation is made by determining the average rate transactions are being applied (either extraction or applying) against the number of outstanding transactions. It assumes all outstanding transactions are of an equal size. The actual THL transaction size is not taken into account. For information on THL sizes, try the thl list -sizes command.

If the replicator is offline due to being deliberately placed offline using trepctl offline then the basic information and status is shown:

shell> trepctl qs
State: Safely Offline for 352.775s

In the event of a replicator failure of some kind this will be reported in the output:

State: alpha Faulty (Offline) for 2.613s
Error Reason: SEQNO 4859 did not apply
    Error: CSV loading failed: schema=test table=msg CSV file=/opt/continuent/tmp/staging/alpha/staging0/test-msg-4859.csv
» message=Wrapped com.continuent.tungsten.replicator.ReplicatorException: OS command failed: command=cqlsh --keyspace=test
» --execute="copy stage_xxx_msg (tungsten_opcode,tungsten_seqno,tungsten_row_id,tungsten_commit_timestamp,id,msg) from
» '/opt/continuent/tmp/staging/alpha/staging0/test-msg-4859.csv' with NULL='NULL';" rc=1 stdout= stderr=Connection 
» error: ('Unable to complete the operation against any hosts', {})