정의
rs.printReplicationInfo()Prints a formatted report of the replica set member's oplog. The displayed report formats the data returned by
db.getReplicationInfo(). The output ofrs.printReplicationInfo()is identical to that ofdb.printReplicationInfo().참고
The
rs.printReplicationInfo()method run inmongoshdoes not return JSON. Users.printReplicationInfo()for manual inspection, anddb.getReplicationInfo()in scripts.
출력 예시
The following example is a sample output from the rs.printReplicationInfo() method run on the primary:
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)
출력 필드
rs.printReplicationInfo() formats and prints the data returned by db.getReplicationInfo():
- 구성된 oplog 크기
db.getReplicationInfo().logSizeMB값을 표시합니다.- 로그 길이 시작에서 끝
db.getReplicationInfo().timeDiff및db.getReplicationInfo().timeDiffHours값을 표시합니다.- oplog 첫 번째 이벤트 시간
db.getReplicationInfo().tFirst을(를) 표시합니다.- oplog 마지막 이벤트 시간
db.getReplicationInfo().tLast을(를) 표시합니다.- 지금
db.getReplicationInfo().now을(를) 표시합니다.
데이터에 대한 설명은 db.getReplicationInfo() 을(를) 참조하세요.
호환성
이 메서드는 다음 환경에서 호스팅되는 배포에서 사용할 수 있습니다.
- MongoDB Atlas: 클라우드에서의 MongoDB 배포를 위한 완전 관리형 서비스
중요
이 명령은 M0 및 Flex 클러스터에서 지원되지 않습니다. 자세한 내용은 지원되지 않는 명령을 참조하세요.
MongoDB Enterprise: MongoDB의 구독 기반 자체 관리 버전
MongoDB Community: MongoDB의 소스 사용 가능 무료 자체 관리 버전