Tokutek / mongo

TokuMX is a high-performance, concurrent, compressing, drop-in replacement engine for MongoDB | Issue tracker: https://tokutek.atlassian.net/browse/MX/ |
http://www.tokutek.com/products/tokumx-for-mongodb/
704 stars 97 forks source link

how to check replication lag #1246

Closed umardraz closed 8 years ago

umardraz commented 8 years ago

Hello

Hello i am using TokuMX v2.0.2-mongodb-2.4.10 as Replica Set

I have 1 Primary and 3 slave, my developers asking me I should tell them about how many seconds behind secondaries from Primary.

How I can check this with TokuMX

Br.

Umar

doluiscontreras commented 8 years ago

You can use the following command to get info about your replication:

db.getReplicationInfo() db.printSlaveReplicationInfo()

You can read more about those commands here : https://www.percona.com/doc/percona-tokumx/replication.html

regards,

Luis

umardraz commented 8 years ago

Hello thanks for your reply,

Well both command are useless for me as both are not worked.

Here is the output of db.printSlaveReplicationInfo()

rebel:PRIMARY> db.printSlaveReplicationInfo() source: replica3:27017 no replication info, yet. State: SECONDARY source: replica4:27017 no replication info, yet. State: SECONDARY source: replica6:27027 no replication info, yet. State: SECONDARY

and Here is the output of db.getReplicationinfo()

rebel:PRIMARY> db.getReplicationInfo() Cannot use 'commands' readMode, degrading to 'legacy' mode { "errmsg" : "Could not get stats for local.oplog.rs collection. collstats returned: {\n\t\"ns\" : \"local.oplog.rs\",\n\t\"errmsg\" : \"exception: element is not a number: { scale: undefined }\",\n\t\"code\" : 17015,\n\t\"ok\" : 0\n}" }

Br.

Umar

umardraz commented 8 years ago

Ok Sorry

It worked

Thanks

doluiscontreras commented 8 years ago

No problem, you are welcome!