db.printSlaveReplicationInfo()
Definition
db.
printSlaveReplicationInfo
()- Returns a formatted report of the status of a replica setfrom the perspective of the secondary member of the set. Theoutput is identical to that of
rs.printSlaveReplicationInfo()
.
Output
The following is example output from thedb.printSlaveReplicationInfo()
method issued on a replica setwith two secondary members:
- source: m1.example.net:27017
- syncedTo: Thu Apr 10 2014 10:27:47 GMT-0400 (EDT)
- 0 secs (0 hrs) behind the primary
- source: m2.example.net:27017
- syncedTo: Thu Apr 10 2014 10:27:47 GMT-0400 (EDT)
- 0 secs (0 hrs) behind the primary
Note
The db.printSlaveReplicationInfo()
in the mongo
shell does not returnJSON. Use db.printSlaveReplicationInfo()
for manual inspection, andrs.status()
in scripts.
A delayed member may show as 0
seconds behind the primary when the inactivity period on the primary isgreater than the members[n].slaveDelay
value.