On this page
db.printSlaveReplicationInfo()
在本页面
Definition
db.
printSlaveReplicationInfo
( )- 从集合的secondary成员的角度返回格式化的replica set状态报告。输出与rs.printSlaveReplicationInfo()相同。
Output
以下是对具有两个辅助成员的副本集发出的db.printSlaveReplicationInfo()方法的示例输出:
source: m1.example.net:27017
syncedTo: Thu Apr 10 2014 10:27:47 GMT-0400 (EDT)
0 secs (0 hrs) behind the primary
source: m2.example.net:27017
syncedTo: Thu Apr 10 2014 10:27:47 GMT-0400 (EDT)
0 secs (0 hrs) behind the primary
Note
mongo shell 中的db.printSlaveReplicationInfo()不**返回JSON。使用db.printSlaveReplicationInfo()进行手动检查,并使用rs.status()编写脚本。
当主要对象的闲置时间大于members[n].slaveDelay值时,delayed member可能显示为比主要对象晚0
秒。