On this page本页内容
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 of rs.printReplicationInfo()
.
Note
The db.printReplicationInfo()
in the mongo
shell does not return JSON. Use db.printReplicationInfo()
for manual inspection, and db.getReplicationInfo()
in scripts.
The following example is a sample output from the db.printReplicationInfo()
method run on the primary:
db.printReplicationInfo()
formats and prints the data returned by db.getReplicationInfo()
:
db.getReplicationInfo.logSizeMB
value.db.getReplicationInfo.timeDiff
and db.getReplicationInfo.timeDiffHours
values.db.getReplicationInfo.tFirst
.db.getReplicationInfo.tLast
.db.getReplicationInfo.now
.See db.getReplicationInfo()
for description of the data.