On this page本页内容
db.printReplicationInfo()
Prints a formatted report of the replica set member's oplog. 打印副本集成员oplog的格式化报告。The displayed report formats the data returned by 显示的报告将格式化db.getReplicationInfo()
.db.getReplicationInfo()
返回的数据。
The output of db.printReplicationInfo()
is identical to that of rs.printReplicationInfo()
.db.printReplicationInfo()
的输出与rs.printReplicationInfo()
的相同。
The 在db.printReplicationInfo()
method run in mongosh
does not return JSON. mongosh
中运行的db.printReplicationInfo()
方法不返回JSON。Use 使用db.printReplicationInfo()
for manual inspection, and db.getReplicationInfo()
in scripts.db.printReplicationInfo()
进行手动检查,并在脚本中使用db.getReplicationInfo()
。
The following example is a sample output from the 以下示例是在主服务器上运行的db.printReplicationInfo()
method run on the primary:db.printReplicationInfo()
方法的示例输出:
configured oplog size: 192MB log length start to end: 65422secs (18.17hrs) oplog first event time: Mon Jun 23 2014 17:47:18 GMT-0400 (EDT) oplog last event time: Tue Jun 24 2014 11:57:40 GMT-0400 (EDT) now: Thu Jun 26 2014 14:24:39 GMT-0400 (EDT)
db.printReplicationInfo()
formats and prints the data returned by 格式化并打印db.getReplicationInfo()
:db.getReplicationInfo()
返回的数据:
db.getReplicationInfo.logSizeMB
value.db.getReplicationInfo.logSizeMB
值。db.getReplicationInfo.timeDiff
and db.getReplicationInfo.timeDiffHours
values.db.getReplicationInfo.timeDiff
和db.getReplicationInfo.timeDiffHours
值。db.getReplicationInfo.tFirst
.db.getReplicationInfo.tFirst
。db.getReplicationInfo.tLast
.db.getReplicationInfo.tLast
。db.getReplicationInfo.now
.db.getReplicationInfo.now
。See 有关数据的描述,请参阅db.getReplicationInfo()
for description of the data.db.getReplicationInfo()
。