AI 에이전트의 경우: 문서 인덱스는 https://www.mongodb.com/ko-kr/docs/llms.txt에서 사용할 수 있으며, 모든 페이지의 마크다운 버전은 어떤 URL 경로에 .md를 추가하여 사용할 수 있습니다.
Docs Menu

replSetGetStatus(데이터베이스 명령)

replSetGetStatus

replSetGetStatus 명령은 명령을 처리한 서버의 관점에서 복제본 세트의 상태를 반환합니다. 관리 데이터베이스에서 replSetGetStatus 를 실행합니다.

The mongod instance must be a replica set member for replSetGetStatus to return successfully.

이 명령은 다른 복제본 세트 노드가 보낸 하트비트에서 데이터를 가져옵니다. 하트비트 빈도로 인해 이러한 데이터는 몇 초 동안 최신 상태가 아닙니다.

팁

In mongosh, this command can also be run through the rs.status() helper method.

Helper methods are convenient for mongosh users, but they may not return the same level of information as database commands. In cases where the convenience is not needed or the additional return fields are required, use the database command.

이 명령은 다음 환경에서 호스팅되는 배포에서 사용할 수 있습니다.

  • MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud

중요

This command is not supported in M0 and Flex clusters. For more information, see Unsupported Commands.

명령은 다음과 같은 구문을 가집니다:

db.adminCommand(
{
replSetGetStatus: 1
}
)

If you run replSetGetStatus or the mongosh helper rs.status() on a member during its initial sync in the STARTUP2 state, the command returns replSetGetStatus.initialSyncStatus metrics.

After the member completes the initial synchronization and transitions to another state, the replSetGetStatus.initialSyncStatus metrics are no longer available.

참고

아직 복제본 세트를 initialized 하지 않은 경우 replSetGetStatus 명령은 다음 오류를 반환합니다.

MongoServerError: no replset config has been received

replSetInitiate 명령을 실행하고 다시 시도합니다.

The following example runs the replSetGetStatus command on the admin database of the replica set primary:

db.adminCommand( { replSetGetStatus: 1 } )

이 명령은 기본 복제본 세트 예시에 대해 다음과 같은 출력을 반환합니다.

{
"set" : "replset",
"date" : ISODate("2024-08-15T23:06:13.978Z"),
"myState" : 1,
"term" : Long(3),
"syncSourceHost" : "",
"syncSourceId" : -1,
"heartbeatIntervalMillis" : Long(2000),
"majorityVoteCount" : 2,
"writeMajorityCount" : 2,
"votingMembersCount" : 3,
"writableVotingMembersCount" : 3,
"optimes" : {
"lastCommittedOpTime" : {
"ts" : Timestamp(1723763173, 1),
"t" : Long(3)
},
"lastCommittedWallTime" : ISODate("2024-08-15T23:06:13.978Z"),
"readConcernMajorityOpTime" : {
"ts" : Timestamp(1723763173, 1),
"t" : Long(3)
},
"appliedOpTime" : {
"ts" : Timestamp(1723763173, 1),
"t" : Long(3)
},
"writtenOpTime" : {
"ts" : Timestamp(1723763173, 1),
"t" : Long(3)
},
"durableOpTime" : {
"ts" : Timestamp(1723763173, 1),
"t" : Long(3)
},
"lastAppliedWallTime" : ISODate("2024-08-15T23:06:13.978Z"),
"lastWrittenWallTime" : ISODate("2024-08-15T23:06:13.978Z"),
"lastDurableWallTime" : ISODate("2024-08-15T23:06:13.978Z")
},
"lastStableRecoveryTimestamp" : Timestamp(1723763173, 1),
"electionCandidateMetrics" : {
"lastElectionReason" : "stepUpRequestSkipDryRun",
"lastElectionDate" : ISODate("2024-08-15T23:06:13.978Z"),
"electionTerm" : Long(3),
"lastCommittedOpTimeAtElection" : {
"ts" : Timestamp(1723763173, 1),
"t" : Long(2)
},
"lastSeenOpTimeAtElection" : {
"ts" : Timestamp(1723763173, 1),
"t" : Long(2)
},
"lastSeenWrittenOpTimeAtElection" : {
"ts" : Timestamp(1723763173, 1),
"t" : Long(1)
},
"numVotesNeeded" : 2,
"priorityAtElection" : 1,
"electionTimeoutMillis" : Long(10000),
"priorPrimaryMemberId" : 1,
"numCatchUpOps" : Long(0),
"newTermStartDate" : ISODate("2024-08-15T23:06:13.978Z"),
"wMajorityWriteAvailabilityDate" : ISODate("2024-08-15T23:06:13.978Z")
},
"electionParticipantMetrics" : {
"votedForCandidate" : true,
"electionTerm" : Long(2),
"lastVoteDate" : ISODate("2024-08-15T23:06:13.978Z"),
"electionCandidateMemberId" : 1,
"voteReason" : "",
"lastAppliedOpTimeAtElection" : {
"ts" : Timestamp(1723763173, 1),
"t" : Long(1)
},
"lastWrittenOpTimeAtElection" : {
"ts" : Timestamp(1723763173, 1),
"t" : Long(1)
},
"maxAppliedOpTimeInSet" : {
"ts" : Timestamp(1723763173, 1),
"t" : Long(1)
},
"priorityAtElection" : 1
},
"members" : [
{
"_id" : 0,
"name" : "m1.example.net:27017",
"health" : 1,
"state" : 1,
"stateStr" : "PRIMARY",
"uptime" : 269,
"optime" : {
"ts" : Timestamp(1723763173, 1),
"t" : Long(3)
},
"optimeWritten" : {
"ts" : Timestamp(1723763173, 1),
"t" : Long(3)
},
"optimeDurable" : {
"ts" : Timestamp(1723763173, 1),
"t" : Long(3)
},
"optimeDate" : ISODate("2024-08-15T23:06:13.978Z"),
"optimeWrittenDate" : ISODate("2024-08-15T23:06:13.978Z"),
"lastAppliedWallTime": ISODate("2024-08-15T23:06:13.978Z"),
"lastWrittenWallTime": ISODate("2024-08-15T23:06:13.978Z"),
"lastDurableWallTime": ISODate("2024-08-15T23:06:13.978Z"),
"lastStableRecoveryTimestamp" : Timestamp(1723763173, 1),
"syncSourceHost" : "",
"syncSourceId" : -1,
"infoMessage" : "",
"electionTime" : Timestamp(1723763173, 1),
"electionDate" : ISODate("2024-08-15T23:06:13.978Z"),
"configVersion" : 1,
"configTerm" : 0,
"self" : true,
"lastHeartbeatMessage" : ""
},
{
"_id" : 1,
"name" : "m2.example.net:27017",
"health" : 1,
"state" : 2,
"stateStr" : "SECONDARY",
"uptime" : 266,
"optime" : {
"ts" : Timestamp(1723763173, 1),
"t" : Long(3)
},
"optimeWritten" : {
"ts" : Timestamp(1723763173, 1),
"t" : Long(3)
},
"optimeDurable" : {
"ts" : Timestamp(1723763173, 1),
"t" : Long(3)
},
"optimeDate" : ISODate("2024-08-15T23:06:13.978Z"),
"optimeWrittenDate" : ISODate("2024-08-15T23:06:13.978Z"),
"optimeDurableDate" : ISODate("2024-08-15T23:06:13.978Z"),
"lastAppliedWallTime": ISODate("2024-08-15T23:06:13.978Z"),
"lastWrittenWallTime": ISODate("2024-08-15T23:06:13.978Z"),
"lastDurableWallTime": ISODate("2024-08-15T23:06:13.978Z"),
"lastHeartbeat" : ISODate("2024-08-15T23:06:13.978Z"),
"lastHeartbeatRecv" : ISODate("2024-08-15T23:06:13.978Z"),
"lastStableRecoveryTimestamp" : Timestamp(1723763173, 1),
"pingMs" : Long(0),
"lastHeartbeatMessage" : "",
"syncSourceHost" : "m3.example.net:27017",
"syncSourceId" : 2,
"infoMessage" : "",
"configVersion" : 1
},
{
"_id" : 2,
"name" : "m3.example.net:27017",
"health" : 1,
"state" : 2,
"stateStr" : "SECONDARY",
"uptime" : 266,
"optime" : {
"ts" : Timestamp(1723763173, 1),
"t" : Long(3)
},
"optimeWritten" : {
"ts" : Timestamp(1723763173, 1),
"t" : Long(3)
},
"optimeDurable" : {
"ts" : Timestamp(1723763173, 1),
"t" : Long(3)
},
"optimeDate" : ISODate("2024-08-15T23:06:13.978Z"),
"optimeWrittenDate" : ISODate("2024-08-15T23:06:13.978Z"),
"optimeDurableDate" : ISODate("2024-08-15T23:06:13.978Z"),
"lastAppliedWallTime": ISODate("2024-08-15T23:06:13.978Z"),
"lastWrittenWallTime": ISODate("2024-08-15T23:06:13.978Z"),
"lastDurableWallTime": ISODate("2024-08-15T23:06:13.978Z"),
"lastHeartbeat" : ISODate("2024-08-15T23:06:13.978Z"),
"lastHeartbeatRecv" : ISODate("2024-08-15T23:06:13.978Z"),
"lastStableRecoveryTimestamp" : Timestamp(1723763173, 1),
"pingMs" : Long(0),
"lastHeartbeatMessage" : "",
"syncSourceHost" : "m1.example.net:27017",
"syncSourceId" : 0,
"infoMessage" : "",
"configVersion" : 1
}
],
"ok" : 1,
"$clusterTime" : {
"clusterTime" : Timestamp(1723763173, 1),
"signature" : {
"hash" : BinData(0,"9C2qcGVkipEGJW3iF90qxb/gIwc="),
"keyId" : Long("6800589497806356482")
}
},
"operationTime" : Timestamp(1723763173, 1)
}

replSetGetStatus 명령은 다음 필드가 있는 문서를 반환합니다.

replSetGetStatus.set

set 값은 replSetName 설정으로 구성된 복제본 세트의 이름입니다. 이는 rs.conf()의 _id와 동일한 값입니다.

replSetGetStatus.date

An ISODate formatted date and time that contains the current time according to the server that processed the replSetGetStatus command. Compare this to the values of replSetGetStatus.members[n].lastHeartbeat to find the operational latency between this server and the other members of the replica set.

replSetGetStatus.myState

0부터 10 사이의 정수로, 현재 멤버의 복제본 상태를 나타냅니다.

replSetGetStatus.term

The election count for the replica set, as known to this replica set member. The term is used by the distributed consensus algorithm to ensure correctness.

replSetGetStatus.syncSourceHost

The syncSourceHost field holds the hostname of the member from which this instance syncs.

If this instance is a primary, syncSourceHost is an empty string and the syncSourceId -1.

replSetGetStatus.syncSourceId

The syncSourceId field holds the replSetGetStatus.members[n]._id of the member from which this instance synchronizes.

If this instance is a primary, syncSourceHost is an empty string and the syncSourceId -1.

replSetGetStatus.heartbeatIntervalMillis

하트비트의 밀리초 단위 주파수입니다.

replSetGetStatus.majorityVoteCount

투표에서 새로운 예비 프라이머리를 선출하는 데 필요한 과반수 득표수입니다.

replSetGetStatus.writeMajorityCount

쓰기 고려 (write concern) "majority"를 수행하는 데 필요한 데이터 보유 투표 노드 수입니다. 쓰기 (write)는 데이터를 보유한 노드에만 적용할 수 있습니다.

For the calculation of replSetGetStatus.writeMajorityCount, see Calculating Majority for Write Concern.

replSetGetStatus.votingMembersCount

중재자를 포함하여 votes: 1로 구성된 멤버의 수입니다.

replSetGetStatus.writableVotingMembersCount

votes: 1로 구성된 데이터 보유 멤버 수입니다(중재자는 포함되지 않음).

replSetGetStatus.optimes

optimes 필드에는 복제 진행률을 검사하는 데 사용되는 optime을 포함한 문서가 있습니다. optimes 필드에는 다양한 최적화 항목에 해당하는 ISODate 형식의 날짜 문자열이 포함됩니다.

각 optime 값은 다음을 포함하는 문서입니다.

  • ts, 작업의 타임스탬프입니다.

  • t, the term in which the operation was originally generated on the primary.

replSetGetStatus.optimes.lastCommittedOpTime

이 멤버의 관점에서 볼 때 대부분의 복제본 세트 멤버에 기록된 가장 최근의 작업에 관한 정보입니다.

replSetGetStatus.optimes.lastCommittedWallTime

The ISODate-formatted date string corresponding to lastCommittedOpTime.

replSetGetStatus.optimes.readConcernMajorityOpTime

Information, from the viewpoint of this member, regarding the most recent operation that can fulfill read concern "majority" queries. That is, the most recent lastCommittedOpTime that can fulfill "majority" queries. readConcernMajorityOpTime is either less than or equal to lastCommittedOpTime.

replSetGetStatus.optimes.appliedOpTime

이 멤버의 관점에서 복제본 세트의 이 멤버에 적용된 가장 최근 작업에 관한 정보입니다.

replSetGetStatus.optimes.lastAppliedWallTime

The ISODate-formatted date string corresponding to appliedOpTime.

replSetGetStatus.optimes.durableOpTime

이 멤버의 관점에서 본 복제본 세트의 해당 멤버의 저널에 기록된 가장 최근 작업에 관한 정보입니다.

replSetGetStatus.optimes.lastDurableWallTime

The ISODate-formatted date string corresponding to durableOpTime.

replSetGetStatus.optimes.lastWrittenWallTime

이 멤버의 oplog에 기록된 가장 최근 항목의 ISODate 형식 날짜 문자열입니다.

버전 8.0에 추가 되었습니다.

replSetGetStatus.optimes.writtenOpTime

이 멤버의 oplog에 작성된 가장 최근 항목의 optime입니다.

버전 8.0에 추가 되었습니다.

replSetGetStatus.lastStableRecoveryTimestamp

내부 용도로만 사용

replSetGetStatus.electionCandidateMetrics

Metrics related to the election of the current primary. electionCandidateMetrics is only available on the primary or a candidate for election. For a candidate, the metrics are unavailable after the candidate loses the election.

replSetGetStatus.electionCandidateMetrics.lastElectionReason

멤버 투표를 호출한 이유입니다.

replSetGetStatus.electionCandidateMetrics.lastElectionDate

멤버가 투표를 호출한 날짜와 시간입니다.

replSetGetStatus.electionCandidateMetrics.electionTerm

The member's election count (that is, term) at the time it called the new election.

replSetGetStatus.electionCandidateMetrics.lastCommittedOpTimeAtElection

The most recent majority-committed optime, as seen by this member, at the time it called the new election.

replSetGetStatus.electionCandidateMetrics.lastSeenOpTimeAtElection

The member's most recent applied optime at the time it called the new election.

replSetGetStatus.electionCandidateMetrics.lastSeenWrittenOpTimeAtElection

새로운 선거를 요구한 시점에 이 멤버의 oplog에 기록된 가장 최근 항목의 optime입니다.

버전 8.0에 추가 되었습니다.

replSetGetStatus.electionCandidateMetrics.numVotesNeeded

투표에서 승리하는 데 필요한 득표 수입니다.

replSetGetStatus.electionCandidateMetrics.priorityAtElection

선거를 호출할 당시 멤버의 priority입니다.

replSetGetStatus.electionCandidateMetrics.electionTimeoutMillis

선거 시 복제본 세트가 electionTimeoutMillis 설정을 지정합니다.

replSetGetStatus.electionCandidateMetrics.priorPrimaryMemberId

이전 프라이머리의 members[n]._id. 이전 프라이머리가 없는 경우 해당 필드가 존재하지 않습니다.

replSetGetStatus.electionCandidateMetrics.targetCatchupOpTime

새로 선출된 프라이머리의 따라잡기 프로세스를 위한 목표 optime입니다. 새로 선택된 프라이머리가 목표 따라잡기 OpTime에 도달해야만 쓰기 수락을 시작할 수 있습니다.

replSetGetStatus.electionCandidateMetrics.numCatchUpOps

새로 선출된 프라이머리가 따라잡기 과정을 성공적으로 완료할 때 적용한 작업 수입니다.

replSetGetStatus.electionCandidateMetrics.newTermStartDate

프라이머리로 노드의 텀이 시작된 날짜 및 시간(예: new term 엔트리가 oplog에 기록된 날짜 및 시간).

replSetGetStatus.electionCandidateMetrics.wMajorityWriteAvailabilityDate

복제본 세트에 대한 투표가 끝난 후 쓰기 고려"majority"를 사용할 수 있게 된 날짜 및 시간(new term oplog 항목이 대다수 커밋된 날짜 및 시간)

replSetGetStatus.electionParticipantMetrics

멤버가 참여한 최근 투표와 관련된 지표입니다.

replSetGetStatus.electionParticipantMetrics.votedForCandidate

멤버가 투표를 호출하는 후보자에게 투표했는지 여부를 나타내는 부울입니다.

replSetGetStatus.electionParticipantMetrics.electionTerm

멤버가 참여한 투표의 텀입니다. 이 텀은 참가자 지표와 관련된 투표를 식별합니다.

replSetGetStatus.electionParticipantMetrics.lastVoteDate

참가자가 투표한 시간을 기록하는 ISODate 형식의 날짜 문자열입니다.

replSetGetStatus.electionParticipantMetrics.electionCandidateMemberId

선거를 호출하는 후보자의 members[n]._id입니다.

replSetGetStatus.electionParticipantMetrics.voteReason

멤버가 후보자에게 투표하지 않은 경우 투표 사유입니다. 멤버가 후보자에게 투표한 경우 이 값은 빈 문자열입니다.

replSetGetStatus.electionParticipantMetrics.lastAppliedOpTimeAtElection

마지막 투표 당시 가장 최근에 적용된 이 멤버의 optime입니다.

optime 값은 타임스탬프(ts)와 텀(t)을 포함하는 문서입니다.

replSetGetStatus.electionParticipantMetrics.lastWrittenOpTimeAtElection

마지막 투표 시점에 이 멤버의 oplog에 기록된 가장 최근 항목의 optime입니다.

버전 8.0에 추가 되었습니다.

replSetGetStatus.electionParticipantMetrics.maxAppliedOpTimeInSet

해당 노드가 알고 있는 모든 복제본 세트 노드에 대해 가장 최근에 적용된 optime입니다.

replSetGetStatus.electionParticipantMetrics.maxWrittenOpTimeInSet

해당 멤버가 알고 있는 모든 복제본 세트 멤버의 oplog에 기록된 가장 최근 항목의 optime입니다.

버전 8.0에 추가 되었습니다.

replSetGetStatus.electionParticipantMetrics.priorityAtElection

투표 당시 멤버의 priority입니다.

replSetGetStatus.electionParticipantMetrics.newTermStartDate

선출된 프라이머리의 텀이 시작된 날짜 및 시간입니다. 이는 프라이머리가 new term 항목을 자신의 oplog에 작성한 날짜와 일치하며, 항목을 세컨더리의 oplog에 추가한 시기가 아닙니다(예: 복제).

The field is available for secondary members only. For the primary, see replSetGetStatus.electionCandidateMetrics.newTermStartDate instead.

replSetGetStatus.electionParticipantMetrics.newTermAppliedDate

이 세컨더리가 new term 항목을 적용한 날짜 및 시간입니다.

이 필드는 세컨더리 멤버만 사용할 수 있습니다.

replSetGetStatus.initialSyncStatus

이 멤버의 초기 동기화 진행 상황 및 상태에 대한 정보를 제공하는 문서입니다.

중요

가용성

replSetGetStatus.initialSyncStatus metrics are only available when run on a member during its initial sync, in the STARTUP2 state.

replSetGetStatus.initialSyncStatus.failedInitialSyncAttempts

초기 동기화가 실패하고 이 멤버에서 다시 시작해야 했던 횟수입니다.

replSetGetStatus.initialSyncStatus.maxFailedInitialSyncAttempts

멤버가 종료되기 전에 이 멤버에서 초기 동기화를 다시 시작할 수 있는 최대 횟수입니다.

replSetGetStatus.initialSyncStatus.initialSyncStart

이 멤버에 대한 초기 동기화의 시작 타임스탬프입니다.

replSetGetStatus.initialSyncStatus.initialSyncEnd

이 멤버에 대한 초기 동기화의 종료 타임스탬프입니다.

replSetGetStatus.initialSyncStatus.initialSyncElapsedMillis

The number of milliseconds between initialSyncStart and initialSyncEnd.

replSetGetStatus.initialSyncStatus.initialSyncAttempts

각 문서가 단일 초기 동기화 시도에 해당하는 문서 배열입니다. 예시:

"initialSyncAttempts" : [
{
"durationMillis" : 59539,
"status" : "InvalidOptions: error fetching oplog during initial sync :: caused by :: Error while getting the next batch in the oplog fetcher :: caused by :: readConcern afterClusterTime value must not be greater than the current clusterTime. Requested clusterTime: { ts: Timestamp(0, 1) }; current clusterTime: { ts: Timestamp(0, 0) }",
"syncSource" : "m1.example.net:27017",
"rollBackId" : 1,
"operationsRetried" : 120,
"totalTimeUnreachableMillis" : 52601,
"phase" : "cloningData",
"nodeUptimeSecs" : 47,
"phaseDurations" : [
{ "phase" : "selectingSyncSource", "durationMillis" : 12 },
{ "phase" : "cloningData", "durationMillis" : 59527 }
]
}
],

각 문서에는 초기 동기화 시도에 대한 다음 정보가 포함되어 있습니다.

필드
설명

durationMillis

초기 동기화 시도 기간(밀리초)입니다.

상태

초기 동기화 시도의 종료 상태입니다.

syncSource

초기 동기화 시도를 위한 동기화 소스입니다.

rollBackId

초기 동기화 시도 시작 시 동기화 소스의 롤백 식별자입니다.

rollBackId 파일 복사 기반 초기 동기화를 사용할 때는 나타나지 않습니다.

operationsRetried

모든 작업 재시도 시도의 총 횟수입니다.

totalTimeUnreachableMillis

작업 재시도에 소요된 총 시간입니다.

상

시도가 종료되었을 때의 초기 동기화 단계 또는 시도가 성공한 경우 complete 입니다.

버전 9.0에 추가 되었습니다.

이 필드는 논리적 초기 동기화를 사용할 때만 나타납니다.

nodeUptimeSecs

시도가 완료된 시점의 노드 실제 시간 가동 시간(초 단위).

버전 9.0에 추가 되었습니다.

이 필드는 논리적 초기 동기화를 사용할 때만 나타납니다.

phaseDurations

시도가 거친 모든 초기 동기화 단계에 대해 phase 이름과 durationMillis을 보고하는 문서 배열입니다.

버전 9.0에 추가 되었습니다.

이 필드는 논리적 초기 동기화를 사용할 때만 나타납니다.

See also failedInitialSyncAttempts.

replSetGetStatus.initialSyncStatus.appliedOps

초기 동기화가 시작된 후 발생하여 데이터베이스를 복제한 후 적용된 작업의 수입니다.

초기 동기화 프로세스의 일부로 멤버는 복제본 세트의 현재 상태를 반영하도록 데이터 집합을 업데이트하기 위해 oplog를 사용합니다.

replSetGetStatus.initialSyncStatus.initialSyncOplogStart

멤버가 초기 동기화 시작 후 발생한 변경 사항을 적용하는 초기 동기화의 oplog 애플리케이션 단계의 시작 타임스탬프입니다.

초기 동기화 프로세스의 일부로 멤버는 복제본 세트의 현재 상태를 반영하도록 데이터 집합을 업데이트하기 위해 oplog를 사용합니다.

replSetGetStatus.initialSyncStatus.initialSyncOplogEnd

멤버가 초기 동기화 시작 후 발생한 변경 사항을 적용하는 초기 동기화의 oplog 애플리케이션 단계의 종료 타임스탬프입니다.

초기 동기화 프로세스의 일부로 멤버는 복제본 세트의 현재 상태를 반영하도록 데이터 집합을 업데이트하기 위해 oplog를 사용합니다.

replSetGetStatus.initialSyncStatus.syncSourceUnreachableSince

동기화 원본에 연결할 수 없게 된 날짜 및 시간입니다.

현재 초기 동기화 중에 if 동기화 소스를 사용할 수 없는 경우에만 표시됩니다.

replSetGetStatus.initialSyncStatus.currentOutageDurationMillis

동기화 소스를 사용할 수 없었던 시간(밀리초)입니다.

현재 초기 동기화 중에 if 동기화 소스를 사용할 수 없는 경우에만 표시됩니다.

replSetGetStatus.initialSyncStatus.totalTimeUnreachableMillis

현재 초기 동기화 중에 멤버를 사용할 수 없었던 총 시간(밀리초)입니다.

replSetGetStatus.initialSyncStatus.databases

초기 동기화 중에 복제된 데이터베이스에 대한 세부 정보입니다.

replSetGetStatus.initialSyncStatus.databases.databasesCloned

초기 동기화 중에 복제된 데이터베이스 수입니다.

replSetGetStatus.initialSyncStatus.databases.databasesToClone

초기 동기화 중에 복제해야 할 데이터베이스 수입니다.

replSetGetStatus.initialSyncStatus.databases.collectionsToClone

버전 9.0에 추가 되었습니다.

초기 동기화 중에 모든 데이터베이스에서 복제해야 할 남은 컬렉션의 총 수입니다.

This aggregate count appears when you run replSetGetStatus with initialSync: 2 (summary mode).

replSetGetStatus.initialSyncStatus.databases.collectionsCloned

버전 9.0에 추가 되었습니다.

초기 동기화 중에 모든 데이터베이스에서 복제된 총 컬렉션 수입니다.

This aggregate count appears when you run replSetGetStatus with initialSync: 2 (summary mode).

replSetGetStatus.initialSyncStatus.databases.<dbname>

각 데이터베이스에 대해 해당 데이터베이스 복제 진행 상황에 대한 정보를 반환하는 문서입니다.

{
"collections" : <number of collections to clone in the database>,
"clonedCollections" : <number of collections cloned to date>,
"start" : <start date and time for the database clone>,
"end" : <end date and time for the database clone>,
"elapsedMillis" : <duration of the database clone>,
"<db>.<collection>" : {
"documentsToCopy" : <number of documents to copy>,
"documentsCopied" : <number of documents copied to date>,
"indexes" : <number of indexes>,
"fetchedBatches" : <number of batches of documents fetched to date>,
"start" : <start date and time for the collection clone>,
"end" : <end date and time for the collection clone>,
"elapsedMillis" : <duration of the collection clone>,
"receivedBatches" : <number of batches of documents received to date>
}
}
replSetGetStatus.initialSyncStatus.method

버전 5.2에 추가 되었습니다.

초기 동기화에 사용되는 메서드입니다.

logical로 설정된 경우 동기화는 논리적 초기 동기화입니다. fileCopyBased로 설정된 경우 동기화는 파일 복사 기반 초기 동기화입니다.

replSetGetStatus.initialSyncStatus.approxTotalDataSize

동기화할 모든 파일의 대략적인 크기(바이트 단위)입니다.

이 필드는 논리적 동기화 또는 파일 복사본 기반 초기 동기화를 사용할 때 나타납니다.

replSetGetStatus.initialSyncStatus.approxTotalBytesCopied

이미 복사된 총 바이트 수입니다.

이 필드는 논리적 동기화 또는 파일 복사본 기반 초기 동기화를 사용할 때 나타납니다.

replSetGetStatus.initialSyncStatus.totalInitialSyncElapsedMillis

진행 중인 동기화 시도에서 경과한 총 시간입니다.

이 필드는 논리적 동기화 또는 파일 복사본 기반 초기 동기화를 사용할 때 나타납니다.

replSetGetStatus.initialSyncStatus.phase

현재 진행 중인 동기화 시도의 초기 동기화 단계 입니다.

버전 9.0에 추가 되었습니다.

이 필드는 논리적 초기 동기화를 사용할 때만 나타납니다.

replSetGetStatus.initialSyncStatus.totalAttempts

실패 및 성공적인 시도를 모두 포함하여 지금까지의 총 초기 동기화 시도 횟수입니다.

버전 9.0에 추가 되었습니다.

이 필드는 논리적 초기 동기화를 사용할 때만 나타납니다.

replSetGetStatus.initialSyncStatus.bytesPerSecond

The approximate rate, in bytes per second, at which data is copied during the sync attempt in progress. MongoDB derives this value from approxTotalBytesCopied and the elapsed time.

버전 9.0에 추가 되었습니다.

이 필드는 논리적 초기 동기화를 사용할 때만 나타납니다.

replSetGetStatus.initialSyncStatus.remainingInitialSyncEstimatedMillis

진행 중인 동기화 시도에 남은 예상 시간입니다.

이 필드는 논리적 동기화 또는 파일 복사본 기반 초기 동기화를 사용할 때 나타납니다.

replSetGetStatus.initialSyncStatus.initialBackupDataSize

동기화할 초기 세트의 총 크기(바이트)입니다.

이 필드는 파일 복사 기반 초기 동기화를 사용할 때만 나타납니다.

replSetGetStatus.initialSyncStatus.previousOplogEnd

이전 백업 커서에서 사용 가능한 optime입니다.

이 필드는 파일 복사 기반 초기 동기화를 사용할 때만 나타납니다.

replSetGetStatus.initialSyncStatus.currentOplogEnd

현재 백업 커서에서 사용할 수 있도록 보장된 마지막 optime입니다.

이 필드는 파일 복사 기반 초기 동기화를 사용할 때만 나타납니다.

replSetGetStatus.initialSyncStatus.syncSourceLastApplied

이 백업 커서가 시작되기 전에 동기화 소스에 적용된 마지막 업데이트의 optime입니다.

이 필드는 파일 복사 기반 초기 동기화를 사용할 때만 나타납니다.

replSetGetStatus.initialSyncStatus.numExtensions

동기화가 새 백업 커서를 시작한 횟수입니다.

백업 커서가 시작되지 않은 경우 이 필드는 나타나지 않습니다.

이 필드는 파일 복사 기반 초기 동기화를 사용할 때만 나타납니다.

replSetGetStatus.initialSyncStatus.extensionDataSize

The total bytes in the current extension.

진행 중인 확장이 없는 경우 이 필드는 표시되지 않습니다.

이 필드는 파일 복사 기반 초기 동기화를 사용할 때만 나타납니다.

replSetGetStatus.initialSyncStatus.files

파일 복사 기반 초기 동기화 중에 동기화될 파일 배열입니다.

이 필드는 파일 복사 기반 초기 동기화를 사용할 때만 나타납니다.

replSetGetStatus.initialSyncStatus.files[n].filePath

백업 커서의 루트를 기준으로 한 파일 경로입니다.

이 필드는 파일 복사 기반 초기 동기화를 사용할 때만 나타납니다.

replSetGetStatus.initialSyncStatus.files[n].fileSize

백업 커서가 보고한 파일 크기입니다.

이 필드는 파일 복사 기반 초기 동기화를 사용할 때만 나타납니다.

replSetGetStatus.initialSyncStatus.files[n].bytesCopied

지금까지 복사된 바이트 수입니다.

이 필드는 파일 복사 기반 초기 동기화를 사용할 때만 나타납니다.

replSetGetStatus.initialSyncStatus.files[n].extensionNumber

이 파일이 확장자의 일부인 경우 파일이 속한 확장자 번호입니다.

이 필드는 파일 복사 기반 초기 동기화를 사용할 때만 나타납니다.

replSetGetStatus.members

members 필드에는 복제본 세트의 모든 노드에 대한 문서가 포함된 배열이 있습니다.

replSetGetStatus.members[n]._id

멤버의 식별자입니다.

replSetGetStatus.members[n].name

멤버의 이름입니다.

replSetGetStatus.members[n].ip

The resolved IP address of the member. If the mongod is unable to resolve the replSetGetStatus.members[n].name to an IP address, the return value is a BSON null. Otherwise, the returned value is a string representation of the resolved IP address.

replSetGetStatus.members[n].self

멤버이 현재 mongod 인스턴스 인지 여부를 나타내는 부울입니다.

self 필드는 현재 인스턴스에 대한 문서에만 mongod 포함되므로 해당 값은 항상 true입니다.

replSetGetStatus.members[n].health

멤버가 위로(1) 또는 아래로(0) 이동했는지를 나타내는 숫자입니다.

replSetGetStatus.members[n].state

멤버의 복제 상태를 나타내는 0~10 사이의 정수입니다.

replSetGetStatus.members[n].stateStr

A string that describes state.

replSetGetStatus.members[n].uptime

For the member on which the replSetGetStatus command is run, uptime is the the number of seconds the member has been online.

For the other members, uptime is the number of seconds the member has been in continuous communication with the member on which the replSetGetStatus command was run.

replSetGetStatus.members[n].optime

이 멤버가 적용한 작업 로그의 마지막 작업에 대한 정보입니다.

optime 다음을 포함하는 문서를 반환합니다.

  • tsoplog에서 복제본 세트의 이 멤버에 적용한 마지막 작업의 타임스탬프입니다.

  • t, the term in which the last applied operation was originally generated on the primary.

replSetGetStatus.members[n].optimeDurable

이 멤버이 해당 저널에 적용한 작업 로그의 마지막 작업에 관한 정보입니다.

optimeDurable 다음을 포함하는 문서를 반환합니다.

  • ts, 작업의 타임스탬프입니다.

  • t, the term in which this operation was originally generated on the primary.

replSetGetStatus.members[n].optimeDate

An ISODate formatted date string that contains the last entry from the oplog that this member applied. If this differs significantly from lastHeartbeat this member is either experiencing "replication lag" or there have not been any new operations after the last update. Compare members.optimeDate between all of the members of the set.

replSetGetStatus.members[n].optimeDurableDate

이 멤버가 저널에 적용한 oplog의 마지막 항목이 포함된 ISODate 형식의 날짜 문자열입니다.

replSetGetStatus.members[n].lastAppliedWallTime

복제본 세트의 이 멤버가 적용한 마지막 작업이 프라이머리 노드에 적용된 실제 시간 을 반영하는 ISODate 형식의 날짜 문자열입니다.

replSetGetStatus.members[n].lastDurableWallTime

이 멤버의 저널에 마지막으로 기록된 작업이 프라이머리 노드에 처음 적용된 벽시계 시간 을 반영하는 ISODate 형식의 날짜 문자열입니다.

replSetGetStatus.members[n].lastStableRecoveryTimestamp

내부 용도로만 사용

버전 9.0에 추가 되었습니다.

replSetGetStatus.members[n].electionTime

현재 프라이머리의 경우, oplog의 투표 타임스탬프에 관한 정보입니다. 투표에 대한 자세한 내용은 복제본 세트 고가용성을 참조하세요.

replSetGetStatus.members[n].electionDate

현재 프라이머리의 경우, 투표 날짜가 포함된 IsoDate 형식의 날짜 문자열입니다. 투표에 대한 자세한 내용은 복제본 세트 고가용성을 참조하세요.

replSetGetStatus.members[n].lastHeartbeat

An ISODate formatted date and time that contains the last time the server that processed the replSetGetStatus command received a response from a heartbeat that it sent to this member (members[n]). Compare this value to the values of the date and lastHeartbeatRecv fields to track latency between these replica set members.

This value is only available for replica set members other than the server specified by replSetGetStatus.members[n].self.

replSetGetStatus.members[n].lastHeartbeatRecv

An ISODate formatted date and time that contains the last time the server that processed the replSetGetStatus command received a heartbeat request from this member (members[n]). Compare this value to the values of the date and lastHeartbeat fields to track latency between these replica set members.

This value is only available for replica set members other than the server specified by replSetGetStatus.members[n].self.

replSetGetStatus.members[n].lastHeartbeatMessage

When the last heartbeat included an extra message, the lastHeartbeatMessage contains a string representation of that message.

replSetGetStatus.members[n].pingMs

pingMs는 왕복 패킷이 원격 멤버와 로컬 인스턴스 사이를 이동하는 데 걸리는 시간을 밀리초(ms)로 나타냅니다.

rs.status() 데이터를 반환하는 멤버에는 이 값이 나타나지 않습니다.

replSetGetStatus.members[n].syncSourceHost

The syncSourceHost field holds the hostname of the member from which this instance syncs.

If the replSetGetStatus.members[n] is a primary, syncSourceHost is an empty string and the syncSourceId -1.

replSetGetStatus.members[n].syncSourceId

The syncSourceId field holds the replSetGetStatus.members[n]._id value of the syncSourceHost.

If the replSetGetStatus.members[n] is a primary, syncSourceHost is an empty string and the syncSourceId -1.

replSetGetStatus.members[n].configVersion

configVersion 값은 replica set configuration version입니다.

replSetGetStatus.members[n].optimeWritten

멤버의 oplog에 기록된 가장 최근 항목의 optime입니다.

버전 8.0에 추가 되었습니다.

replSetGetStatus.members[n].optimeWrittenDate

멤버의 oplog에 기록된 가장 최근 항목의 ISODate 형식 날짜 문자열입니다.

버전 8.0에 추가 되었습니다.

replSetGetStatus.members[n].lastWrittenWallTime

이 노드에 대한 가장 최근의 oplog 항목이 기본에 기록된 시간의 ISODate 형식의 날짜 문자열입니다.

버전 8.0에 추가 되었습니다.

replSetGetStatus.tooStale

A boolean which indicates that a replica set member has fallen too far behind the primary's oplog and is stuck in the RECOVERING state. This field is only included in the replSetGetStatus output if its value is true.

ok 상태 필드, operationTime 필드 및 $clusterTime 필드에 대한 자세한 내용은 응답을 참조하세요.

replSetGetStatus.optime

복제본 세트에서 노드를 제거한 후 표시됩니다. 제거된 노드에 의해 적용된 마지막 oplog 항목의 optime을 제공합니다.

replSetGetStatus.optimeDate

복제본 세트에서 멤버를 제거한 후 표시됩니다. 제거된 멤버가 적용한 마지막 oplog 항목의 optime에 대한 ISODate 형식의 문자열을 제공합니다.

replSetGetStatus.optimeWritten

복제본 세트에서 멤버를 제거한 후 표시합니다. 제거된 멤버의 oplog에 기록된 마지막 항목의 optime을 제공합니다.

버전 8.0에 추가 되었습니다.

replSetGetStatus.optimeWrittenDate

복제본 세트에서 멤버를 제거한 후 표시합니다. 제거된 멤버의 oplog에 기록된 마지막 항목의 optime을 ISODate 형식으로 문자열로 제공합니다.

버전 8.0에 추가 되었습니다.

이 페이지 평가하기

이 페이지의 내용