- Reference >
mongosh
Methods >- Database Methods >
- db.printSlaveReplicationInfo()
db.printSlaveReplicationInfo()¶
On this page
Definition¶
-
db.
printSlaveReplicationInfo
()¶ Deprecated since version 4.4.1: Use
db.printSecondaryReplicationInfo()
instead.Returns a formatted report of the status of a replica set from the perspective of the secondary member of the set. The output is identical to that of
rs.printSlaveReplicationInfo()
.
Output¶
The following is example output from the
db.printSlaveReplicationInfo()
method issued on a replica set
with two secondary members:
Note
The db.printSlaveReplicationInfo()
method run in mongosh
does
not return JSON. Use db.printSlaveReplicationInfo()
for manual inspection, and
rs.status()
in scripts.
A delayed member may show as 0
seconds behind the primary when the inactivity period on the primary is
greater than the members[n].secondaryDelaySecs
value.