rs.printReplicationInfo()

Definition

  • rs.printReplicationInfo()

New in version 2.6.

Prints a formatted report of the replica set member’s oplog.The displayed report formats the data returned bydb.getReplicationInfo(). The output ofrs.printReplicationInfo() is identical to that ofdb.printReplicationInfo().

Note

The rs.printReplicationInfo() in the mongo shell does not returnJSON. Use rs.printReplicationInfo() for manual inspection, anddb.getReplicationInfo() in scripts.

Output Example

The following example is a sample output from thers.printReplicationInfo() method run on the primary:

  1. configured oplog size: 192MB
  2. log length start to end: 65422secs (18.17hrs)
  3. oplog first event time: Mon Jun 23 2014 17:47:18 GMT-0400 (EDT)
  4. oplog last event time: Tue Jun 24 2014 11:57:40 GMT-0400 (EDT)
  5. now: Thu Jun 26 2014 14:24:39 GMT-0400 (EDT)

Output Fields

rs.printReplicationInfo() formats and prints the data returned bydb.getReplicationInfo():

See db.getReplicationInfo() for description of the data.