- Reference >
- JavaScript Methods >
- db.printReplicationInfo()
db.printReplicationInfo()¶
-
db.
printReplicationInfo
()¶ Provides a formatted report of the status of a replica set from the perspective of the primary set member. See the “Replica Set Status Reference” for more information regarding the contents of this output.
This function will return
db.printSlaveReplicationInfo()
if issued against a secondary set member.Note
The
db.printReplicationInfo()
in themongo
shell does not return JSON. Usedb.printReplicationInfo()
for manual inspection, andrs.status()
in scripts.