- Reference >
mongoShell Methods >- Replication Methods >
- rs.status()
rs.status()¶
-
rs.status()¶ Returns: A document with status information. This output reflects the current status of the replica set, using data derived from the heartbeat packets sent by the other members of the replica set.
This method provides a wrapper around the
replSetGetStatuscommand.Starting in MongoDB 3.4, the
replSetGetStatuscommand can accept the optionalinitialSync: 1to report on initial sync status and progress if the command is run on the secondary. To report on initial sync for the secondary, you must run the command instead of the helper.See the documentation of the
replSetGetStatuscommand for a complete description of the output.