Navigation
This version of the manual is no longer supported.

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 the mongo shell does not return JSON. Use db.printReplicationInfo() for manual inspection, and rs.status() in scripts.