secs: is a time interval in seconds, indicating the time range of the returned replication metrics. The default value is 30. If it is set to -1, the function returns the replication metrics since asynchronous replication was enabled.


This function displays the metrics tracking asynchronous replication task progress in the slave cluster. It can only be executed by an administrator on the controller of a slave cluster.

It returns a table containing the following columns:

  • status: the status of asynchronous replication, including DISABLE, ENABLE, and STOPPED.

  • finishedTasks: the number of finished tasks.

  • unfinishedTasks: the number of unfinished tasks.

  • finishedTasksPerSec: the average number of tasks finished per second.

  • maxCostPerTask: the maximum time spent on a single task.

  • avgCostPerTask: the average time spent on a single task.

  • averageGroupSize: the average number of tasks per group.


$ getClusterReplicationMetrics(-1)
status finishedTasks unfinishedTasks finishedTasksPerSec maxCostPerTask avgCostPerTask averageGroupSize
ENABLE 0 0 0 00:00:00 00:00:00 0

Related functions: getSlaveReplicationStatus, getMasterReplicationStatus