On this page
db.printReplicationInfo()
在本页面
Definition
db.
printReplicationInfo
( )- 打印副本集成员的oplog的格式化报告。显示的报告会格式化db.getReplicationInfo()返回的数据。 [1]
db.printReplicationInfo()的输出与rs.printReplicationInfo()的输出相同。
Note
mongo shell 中的db.printReplicationInfo()不**返回JSON。使用db.printReplicationInfo()进行手动检查,并使用db.getReplicationInfo()编写脚本。
Output Example
以下示例是在主要数据库上运行的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)
Output Fields
db.printReplicationInfo()格式化并打印db.getReplicationInfo()返回的数据:
配置的操作日志大小
日志长度开始到结束
oplog 第一次活动时间
oplog 上次活动时间
now
有关数据的说明,请参见db.getReplicationInfo()。
[1] | 如果在master-slave replication的从属服务器上运行,则该方法将调用db.printSlaveReplicationInfo()。有关详细信息,请参见db.printSlaveReplicationInfo()。 |