- Reference >
mongo
Shell Methods >- Database Methods >
- db.printReplicationInfo()
db.printReplicationInfo()¶
On this page
Definition¶
-
db.
printReplicationInfo
()¶ Prints a formatted report of the replica set member’s oplog. The displayed report formats the data returned by
db.getReplicationInfo()
.The output of
db.printReplicationInfo()
is identical to that ofrs.printReplicationInfo()
.Note
The
db.printReplicationInfo()
in themongo
shell does not return JSON. Usedb.printReplicationInfo()
for manual inspection, anddb.getReplicationInfo()
in scripts.
Output Example¶
The following example is a sample output from the
db.printReplicationInfo()
method run on the primary:
Output Fields¶
db.printReplicationInfo()
formats and prints the data returned by
db.getReplicationInfo()
:
- configured oplog size
- Displays the
db.getReplicationInfo.logSizeMB
value. - log length start to end
- Displays the
db.getReplicationInfo.timeDiff
anddb.getReplicationInfo.timeDiffHours
values. - oplog first event time
- Displays the
db.getReplicationInfo.tFirst
. - oplog last event time
- Displays the
db.getReplicationInfo.tLast
. - now
- Displays the
db.getReplicationInfo.now
.
See db.getReplicationInfo()
for description of the data.