AI エージェント向け: ドキュメントインデックスは https://www.mongodb.com/ja-jp/docs/llms.txt で利用できます。すべてのページの markdown バージョンは、いずれかの URL パスに .md を追加することで利用できます。
Docs Menu

currentOp(データベースコマンド)

currentOp

バージョン 6.2 から非推奨。

バージョン 6.2 以降では$currentOp集計ステージが使用されます。

インスタンスに対して進行中の操作に関する情報を含む ドキュメントmongod を返します。

currentOp6データベースコマンドは、バージョン.2 $currentOpcurrentOp以降では非推奨です。 コマンドとそのmongosh ヘルパーメソッドdb.currentOp() の代わりに、 集計ステージを使用します。

このコマンドは、次の環境でホストされている配置で使用できます。

  • MongoDB Atlas はクラウドでの MongoDB 配置のための完全管理サービスです

注意

このコマンドは、すべての MongoDB Atlas クラスターでサポートされています。すべてのコマンドに対する Atlas のサポートについては、「サポートされていないコマンド」を参照してください。

  • MongoDB Enterprise: サブスクリプションベースの自己管理型 MongoDB バージョン

  • MongoDB Community: ソースが利用可能で、無料で使用できる自己管理型の MongoDB のバージョン

このコマンドの構文は、次のとおりです。

db.adminCommand(
{
currentOp: 1
}
)

注意

MongoDB5.0 以降では、ヘルパーメソッド$currentOp db.currentOp()mongosh で実行中ときに 集計ステージが使用されます。

これを考慮すると、shell の 5.0 バージョンと mongosh では、 db.currentOp()の結果セットは、前のレガシーmongoバージョンのドキュメントの 16 MB のBSON ドキュメント戻りサイズ 制限を受けません。

currentOpadminデータベースに対して実行する必要があり、いくつかのオプション フィールドを受け入れることができます。

フィールド
説明

"$ownOps"

ブール値。true に設定すると、現在のユーザーの操作に関する情報のみが返されます。

mongodインスタンスでは、ユーザーは常に、currentOp "$ownOps": trueとともに実行する権限を付与され、自分の操作を表示できます。詳しくは、アクセス制御 を参照してください。

"$all"

ブール値。true に設定すると、アイドル接続の操作やシステム操作を含むすべての操作に関する情報が返されます。

"$all": true は、すべての出力フィールド フィルターを上書きします。

<filter>

出力フィールドでフィルター条件を指定します。を参照してください。

comment

任意。このコマンドに添付するユーザー指定のコメント。設定すると、このコメントは以下の場所にこのコマンドの記録と合わせて表示されます。

コメントには、有効な BSON 型(string, integer, object, array など)を使用できます。

currentOpデータベースプロファイラーがCRUD操作について報告する基本的な診断情報は同じで、次のようなものがあります。

これらの操作は低速クエリのログにも含まれます。 低速クエリ ロギングの詳細については、 slowOpThresholdMsを参照してください。

Queryable Encryptionを使用する場合、 encryptionInformationオプションを使用したcurrentOp操作によって特定の情報がリダクションされます。

  • 出力では、 "command"以降のすべてのフィールドが省略されます。

  • 出力では、 "command"が最初の要素である$comment$dbのみを含むように編集されます。

authorization で実行されているシステムでは、ユーザーに inprog 特権アクションを含むアクセス権が必要です。

ユーザーはmongodインスタンスで$ownOpsを使用して、 inprog特権アクションなしで自分の操作を表示できます。

db.adminCommand( { currentOp: 1, "$ownOps": 1 } )

次の例では、さまざまなクエリ ドキュメントでcurrentOpコマンドを使用して出力をフィルタリングします。

db.adminCommand(
{
currentOp: true,
"$all": true
}
)

次の例では、ロックを待機しているすべての書込み (write) 操作に関する情報を返します。

db.adminCommand(
{
currentOp: true,
"waitingForLock" : true,
$or: [
{ "op" : { "$in" : [ "insert", "update", "remove" ] } },
{ "command.findandmodify": { $exists: true } }
]
}
)

次の例では、実行中のアクティブな操作のうち、中断していないすべての操作に関する情報を返します。

db.adminCommand(
{
currentOp: true,
"active" : true,
"numYields" : 0,
"waitingForLock" : false
}
)

次の例では、3 秒以上実行されているデータベース db1 のすべてのアクティブな操作に関する情報を返します。

db.adminCommand(
{
currentOp: true,
"active" : true,
"secs_running" : { "$gt" : 3 },
"ns" : /^db1\./
}
)

次の例では、インデックスの作成操作に関する情報を返します。

db.getSiblingDB("admin").aggregate( [
{ $currentOp : { idleConnections: true } },
{ $match: {
$or: [
{ "op": "command", "command.createIndexes": { $exists: true } },
{ "op": "none", "msg": /^Index Build/ }
]
}
}
] )

MongoDB は、activeフィールドを false に設定することで、コミットクォーラムを待機しているインデックスをアイドル接続としてマークします。idleConnections: true 設定では、これらのアイドル接続が $currentOp 出力に含まれます。

The following is a prototype of the currentOp output when run on a standalone:

{
"inprog": [
{
"type" : <string>,
"host" : <string>,
"desc" : <string>,
"connectionId" : <number>,
"client" : <string>,
"appName" : <string>,
"clientMetadata" : <document>,
"active" : <boolean>,
"currentOpTime" : <string>,
"effectiveUsers" : [
{
"user" : <string>,
"db" : <string>
}
],
"opid" : <number>,
"lsid" : {
"id" : <UUID>,
"uid" : <BinData>
},
"secs_running" : <Long()>,
"microsecs_running" : <number>,
"op" : <string>,
"ns" : <string>,
"command" : <document>,
"queryFramework" : <string>,
"planSummary": <string>,
"cursor" : { // only for getMore operations
"cursorId" : <Long()>,
"createdDate" : <ISODate()>,
"lastAccessDate" : <ISODate()>,
"nDocsReturned" : <Long()>,
"nBatchesReturned" : <Long()>,
"noCursorTimeout" : <boolean>,
"tailable" : <boolean>,
"awaitData" : <boolean>,
"originatingCommand" : <document>,
"planSummary" : <string>,
"operationUsingCursorId" : <Long()>
},
"msg": <string>,
"progress" : {
"done" : <number>,
"total" : <number>
},
"killPending" : <boolean>,
"numYields" : <number>,
"dataThroughputLastSecond" : <number>,
"dataThroughputAverage" : <number>,
"waitingForLatch" : {
"timestamp" : <ISODate()>,
"captureName" : <string>
},
"locks" : {
"ParallelBatchWriterMode" : <string>,
"ReplicationStateTransition" : <string>,
"Global" : <string>,
"Database" : <string>,
"Collection" : <string>,
"Metadata" : <string>,
"oplog" : <string>
},
"waitingForLock" : <boolean>,
"lockStats" : {
"ParallelBatchWriterMode" : {
"acquireCount": {
"r": <NumberLong>,
"w": <NumberLong>,
"R": <NumberLong>,
"W": <NumberLong>
},
"acquireWaitCount": {
"r": <NumberLong>,
"w": <NumberLong>,
"R": <NumberLong>,
"W": <NumberLong>
},
"timeAcquiringMicros" : {
"r" : Long(0),
"w" : Long(0),
"R" : Long(0),
"W" : Long(0)
},
"deadlockCount" : {
"r" : Long(0),
"w" : Long(0),
"R" : Long(0),
"W" : Long(0)
}
},
"ReplicationStateTransition" : {
...
},
"Global": {
...
},
"Database" : {
...
},
...
}
},
...
],
"fsyncLock": <boolean>,
"info": <string>,
"ok": <num>
}

The following is a prototype of the currentOp output when run on a primary of a replica set:

{
"inprog": [
{
"type" : <string>,
"host" : <string>,
"desc" : <string>,
"connectionId" : <number>,
"client" : <string>,
"appName" : <string>,
"clientMetadata" : <document>,
"lsid" : {
"id" : <UUID>,
"uid" : <BinData>
},
"transaction" : {
"parameters" : {
"txnNumber" : <Long()>,
"autocommit" : <boolean>,
"readConcern" : {
"level" : <string>
}
},
"readTimestamp" : <Timestamp>,
"startWallClockTime" : <string>,
"timeOpenMicros" : <Long()>,
"timeActiveMicros" : <Long()>,
"timeInactiveMicros" : <Long()>,
"expiryTime" : <string>,
},
"active" : <boolean>,
"currentOpTime" : <string>,
"effectiveUsers" : [
{
"user" : <string>,
"db" : <string>
}
],
"opid" : <number>,
"secs_running" : <Long()>,
"microsecs_running" : <number>,
"op" : <string>,
"ns" : <string>,
"command" : <document>,
"originatingCommand" : <document>,
"queryFramework" : <string>,
"planSummary": <string>,
"prepareReadConflicts" : <Long()>,
"writeConflicts" : <Long()>,
"cursor" : { // only for getMore operations
"cursorId" : <Long()>,
"createdDate" : <ISODate()>,
"lastAccessDate" : <ISODate()>,
"nDocsReturned" : <Long()>,
"nBatchesReturned" : <Long()>,
"noCursorTimeout" : <boolean>,
"tailable" : <boolean>,
"awaitData" : <boolean>,
"originatingCommand" : <document>,
"planSummary" : <string>,
"operationUsingCursorId" : <Long()>
},
"msg": <string>,
"progress" : {
"done" : <number>,
"total" : <number>
},
"killPending" : <boolean>,
"numYields" : <number>,
"dataThroughputLastSecond" : <number>,
"dataThroughputAverage" : <number>,
"waitingForLatch" : {
"timestamp" : <ISODate()>,
"captureName" : <string>
},
"locks" : {
"ParallelBatchWriterMode" : <string>,
"ReplicationStateTransition" : <string>,
"Global" : <string>,
"Database" : <string>,
"Collection" : <string>,
"Metadata" : <string>,
"oplog" : <string>
},
"waitingForLock" : <boolean>,
"lockStats" : {
"ParallelBatchWriterMode" : {
"acquireCount": {
"r": <NumberLong>,
"w": <NumberLong>,
"R": <NumberLong>,
"W": <NumberLong>
},
"acquireWaitCount": {
"r": <NumberLong>,
"w": <NumberLong>,
"R": <NumberLong>,
"W": <NumberLong>
},
"timeAcquiringMicros" : {
"r" : Long(0),
"w" : Long(0),
"R" : Long(0),
"W" : Long(0)
},
"deadlockCount" : {
"r" : Long(0),
"w" : Long(0),
"R" : Long(0),
"W" : Long(0)
}
},
"ReplicationStateTransition" : {
...
},
"Global" : {
...
},
"Database" : {
...
},
...
}
},
...
],
"fsyncLock": <boolean>,
"info": <string>,
"ok": <num>,
"operationTime": <timestamp>,
"$clusterTime": <document>
}

The following is an example of the currentOp output when run on a mongos of a sharded cluster (Fields may vary depending on the operation being reported):

{
"inprog": [
{
"shard": <string>,
"type" : <string>,
"host" : <string>,
"desc" : <string>,
"connectionId" : <number>,
"client_s" : <string>,
"appName" : <string>,
"clientMetadata" : <document>,
"lsid" : {
"id" : <UUID>,
"uid" : <BinData>
},
"transaction" : {
"parameters" : {
"txnNumber" : <Long()>,
"autocommit" : <boolean>,
"readConcern" : {
"level" : <string>
}
},
"readTimestamp" : <Timestamp>,
"startWallClockTime" : <string>,
"timeOpenMicros" : <Long()>,
"timeActiveMicros" : <Long()>,
"timeInactiveMicros" : <Long()>,
"expiryTime" : <string>,
},
"active" : <boolean>,
"currentOpTime" : <string>,
"effectiveUsers" : [
{
"user" : <string>,
"db" : <string>
}
],
"runBy" : [
{
"user" : <string>,
"db" : <string>
}
],
"twoPhaseCommitCoordinator" : {
"lsid" : {
"id" : <UUID>,
"uid" : <BinData>
},
"txnNumber" : <NumberLong>,
"numParticipants" : <NumberLong>,
"state" : <string>,
"commitStartTime" : <ISODate>,
"hasRecoveredFromFailover" : <boolean>,
"stepDurations" : <document>,
"decision" : <document>,
"deadline" : <ISODate>
}
"opid" : <string>,
"secs_running" : <Long()>,
"microsecs_running" : <number>,
"op" : <string>,
"ns" : <string>,
"command" : <document>,
"configTime" : <Timestamp>, // Starting in 5.0
"topologyTime" : <Timestamp>, // Starting in 5.0
"queryFramework" : <string>, // Starting in 6.2
"planSummary": <string>,
"prepareReadConflicts" : <Long()>,
"writeConflicts" : <Long()>,
"cursor" : { // only for getMore operations
"cursorId" : <Long()>,
"createdDate" : <ISODate()>,
"lastAccessDate" : <ISODate()>,
"nDocsReturned" : <Long()>,
"nBatchesReturned" : <Long()>,
"noCursorTimeout" : <boolean>,
"tailable" : <boolean>,
"awaitData" : <boolean>,
"originatingCommand" : <document>,
"planSummary" : <string>,
"operationUsingCursorId" : <Long()>
},
"msg": <string>,
"progress" : {
"done" : <number>,
"total" : <number>
},
"killPending" : <boolean>,
"numYields" : <number>,
"dataThroughputLastSecond" : <number>,
"dataThroughputAverage" : <number>,
"waitingForLatch" : {
"timestamp" : <ISODate()>,
"captureName" : <string>
},
"locks" : {
"ParallelBatchWriterMode" : <string>,
"ReplicationStateTransition" : <string>,
"Global" : <string>,
"Database" : <string>,
"Collection" : <string>,
"Metadata" : <string>,
"oplog" : <string>
},
"waitingForLock" : <boolean>,
"lockStats" : {
"ParallelBatchWriterMode": {
"acquireCount": {
"r": <NumberLong>,
"w": <NumberLong>,
"R": <NumberLong>,
"W": <NumberLong>
},
"acquireWaitCount": {
"r": <NumberLong>,
"w": <NumberLong>,
"R": <NumberLong>,
"W": <NumberLong>
},
"timeAcquiringMicros" : {
"r" : Long(0),
"w" : Long(0),
"R" : Long(0),
"W" : Long(0)
},
"deadlockCount" : {
"r" : Long(0),
"w" : Long(0),
"R" : Long(0),
"W" : Long(0)
}
},
"ReplicationStateTransition" : {
...
},
"Global" : {
...
},
"Database" : {
...
},
...
}
},
...
],
"ok": <num>,
"operationTime": <timestamp>,
"$clusterTime": <document>
}

これらの出力サンプルは、特定の操作に対する currentOp 出力を示しています。実際の出力を構成するフィールドは、サーバーのロールによって異なります。

{
type: "op",
desc: "Resharding{Donor, Recipient, Coordinator}Service <reshardingUUID>",
op: "command",
ns: "<database>.<collection>",
originatingCommand: {
reshardCollection: "<database>.<collection>",
key: <shardkey>,
unique: <boolean>,
collation: {locale: "simple"},
// Other options to the reshardCollection command are omitted
// to decrease the likelihood the output is truncated.
},
{donor, coordinator, recipient}State : "<service state>",
approxDocumentsToCopy: NumberLong(<count>),
approxBytesToCopy: NumberLong(<count>),
bytesCopied: NumberLong(<count>),
countWritesToStashCollections: NumberLong(<count>),
countWritesDuringCriticalSection : NumberLong(<count>),
countReadsDuringCriticalSection: NumberLong(<count>),
deletesApplied: NumberLong(<count>),
documentsCopied: NumberLong(<count>),
insertsApplied: NumberLong(<count>),
oplogEntriesFetched: NumberLong(<count>),
oplogEntriesApplied: NumberLong(<count>),
remainingOperationTimeEstimatedSecs: NumberLong(<count>),
allShardsLowestRemainingOperationTimeEstimatedSecs: NumberLong(<estimate>),
allShardsHighestRemainingOperationTimeEstimatedSecs: NumberLong(<estimate>),
totalApplyTimeElapsedSecs: NumberLong(<count>),
totalCopyTimeElapsedSecs: NumberLong(<count>),
totalCriticalSectionTimeElapsedSecs : NumberLong(<count>),
totalOperationTimeElapsedSecs: NumberLong(<count>),
updatesApplied: NumberLong(<count>),
}
{
type: "op",
desc: "GlobalIndex{Donor, Recipient, Coordinator}Service <globalIndexUUID}",
op: "command",
ns: "<database>.<collection>",
originatingCommand: {
createIndexes: "<database>.<collection>",
key: <indexkeypattern>,
unique: <boolean>,
<Additional createIndexes options>
},
{donor, coordinator, recipient}State : "<service state>",
approxDocumentsToScan: Long(<count>),
approxBytesToScan: Long(<count>),
bytesWrittenFromScan: Long(<count>),
countWritesToStashCollections: Long(<count>),
countWritesDuringCriticalSection : Long(<count>),
countReadsDuringCriticalSection: Long(<count>),
keysWrittenFromScan: Long(<count>),
remainingOperationTimeEstimatedSecs: Long(<count>),
allShardsLowestRemainingOperationTimeEstimatedSecs: Long(<estimate>),
allShardsHighestRemainingOperationTimeEstimatedSecs: Long(<estimate>),
totalCopyTimeElapsedSecs: Long(<count>),
totalCriticalSectionTimeElapsedSecs : Long(<count>),
totalOperationTimeElapsedSecs: Long(<count>),
}
currentOp.type

操作の種類。 値は次のいずれかです。

  • op

  • idleSession

  • idleCursor

If the currentOp.type is op, currentOp.op provides details on the specific operation.

currentOp.host

操作が実行されるホストの名前。

currentOp.desc

A description of the client. This string includes the connectionId.

currentOp.connectionId

操作が発生した接続の識別子。

currentOp.client

操作が発生した場所に関する情報を含む string。

For multi-document transactions, client stores information about the most recent client to run an operation inside the transaction.

currentOp.appName

操作を実行したクライアント・アプリケーションの識別子。 appName接続stringオプションを使用して、appName フィールドにカスタム値を設定します。

currentOp.clientMetadata

クライアントに関する追加情報。

For multi-document transactions, client stores information about the most recent client to run an operation inside the transaction.

currentOp.currentOpTime

操作の開始時刻。

currentOp.effectiveUsers

操作に関連付けられた各ユーザーのドキュメントを含む配列。 各ユーザー ドキュメントには、 user名と認証dbが含まれています。

currentOp.runBy

An array that contains a document for each user who is impersonating the effectiveUser(s) for the operation. The runBy document contains the user name and the authentication db. In general, the runBy user is the __system user; e.g.

"runBy" : [
{
"user" : "__system",
"db" : "local"
}
]

シャーディングされたクラスターでのみ利用可能

currentOp.lsid

セッション識別子。

操作がセッションに関連付けられている場合にのみ存在します。

currentOp.transaction

マルチドキュメントトランザクション情報を含むドキュメント。

操作がマルチドキュメントトランザクションの一部である場合にのみ存在します。

currentOp.transaction.parameters

マルチドキュメントトランザクションに関する情報を含むドキュメント。

操作がマルチドキュメントトランザクションの一部である場合にのみ存在します。

currentOp.transaction.parameters.txnNumber

トランザクション番号。

操作がマルチドキュメントトランザクションの一部である場合にのみ存在します。

currentOp.transaction.parameters.autocommit

トランザクションでオートコミットがオンになっているかどうかを示すブール値のフラグ。

操作がマルチドキュメントトランザクションの一部である場合にのみ存在します。

currentOp.transaction.parameters.readConcern

トランザクションの読み取り保証( read concern )です。

マルチドキュメントトランザクションは、読み取り保証(read concern) "snapshot""local""majority"をサポートします。

操作がマルチドキュメントトランザクションの一部である場合にのみ存在します。

currentOp.transaction.readTimestamp

トランザクション内の操作によって読み取られるスナップショットのタイムスタンプ。

操作がマルチドキュメントトランザクションの一部である場合にのみ存在します。

currentOp.transaction.startWallClockTime

トランザクションが開始された日時(タイムゾーン)。

操作がマルチドキュメントトランザクションの一部である場合にのみ存在します。

currentOp.transaction.timeOpenMicros

トランザクションの期間(マイクロ秒単位)。

The timeActiveMicros value added to the timeInactiveMicros should equal the timeOpenMicros.

操作がマルチドキュメントトランザクションの一部である場合にのみ存在します。

currentOp.transaction.timeActiveMicros

トランザクションがアクティブになっている合計時間。つまり、トランザクションで操作が実行されていた場合を指します。

The timeActiveMicros value added to the timeInactiveMicros should equal the timeOpenMicros.

操作がマルチドキュメントトランザクションの一部である場合にのみ存在します。

currentOp.transaction.timeInactiveMicros

トランザクションが非アクティブであった合計時間。トランザクションで実行中の操作がない場合。

The timeInactiveMicros value added to the timeActiveMicros should equal the timeOpenMicros.

操作がマルチドキュメントトランザクションの一部である場合にのみ存在します。

currentOp.transaction.expiryTime

トランザクションがタイムアウトして中止される日時(タイムゾーンあり)。

The currentOp.transaction.expiryTime equals the currentOp.transaction.startWallClockTime + the transactionLifetimeLimitSeconds.

詳細については、「 トランザクションの実行時間制限 」を参照してください。

操作がマルチドキュメントトランザクションの一部である場合にのみ存在します。

currentOp.twoPhaseCommitCoordinator

次のいずれかに関する情報

  • 書込み (write) 操作が複数のシャードにまたがるトランザクションのコミット調整メトリクス。

    コミット調整はシャードによって処理され、 currentOpmongosまたはシャード ノードで実行)は、そのシャードによって現在調整されているトランザクションについてのみシャードの調整情報を返します。

    コミット調整メトリクスのみをフィルタリングするには:

    db.currentOp( { desc: "transaction coordinator" })
  • A specific commit coordination operation (i.e. currentOp.type is op and currentOp.desc is "TransactionCoordinator") spawned by the transaction coordinator.

currentOp.twoPhaseCommitCoordinator.lsid

マルチシャード トランザクションのセッション識別子。

The combination of the lsid and txnNumber identifies the transaction.

コミット調整メトリクスと特定の調整操作の両方に使用できます。

currentOp.twoPhaseCommitCoordinator.txnNumber

マルチシャード トランザクションのトランザクション番号。

The combination of the txnNumber and lsid identifies the transaction.

コミット調整メトリクスと特定の調整操作の両方に使用できます。

currentOp.twoPhaseCommitCoordinator.action

トランザクションの調整役によって生成される特定のコミット調整操作は、以下のとおりです。

  • "sendingPrepare"

  • "sendingCommit"

  • "sendingAbort"

  • "writingParticipantList"

  • "writingDecision"

  • "deletingCoordinatorDoc"

特定の調整操作でのみ使用できます。

currentOp.twoPhaseCommitCoordinator.startTime

The start date and time of the action.

特定の調整操作でのみ使用できます。

currentOp.twoPhaseCommitCoordinator.numParticipants

このコミットに参加したシャードの数。

コミット調整メトリクスでのみ使用できます。

currentOp.twoPhaseCommitCoordinator.state

コミット調整プロセスの現在のステップまたは状態。

ステップ/ステージ
説明

inactive

コミットのアクティブな一部ではない。

writingParticipantList

このマルチシャード トランザクションの一部であるシャードのリストをローカル レコードで書込み (write) ます。

waitingForVotes

参加者がコミットまたは中止への投票で応答するまで待機します。

writingDecision

投票に基づいてコミットまたは中止するかどうかのコーディネーターの決定をローカル レコードで書き込みます。

waitingForDecisionAck

コーディネーターのコミットまたは中止の決定を確認するまで、参加者が待機します。

deletingCoordinatorDoc

コミット決定のローカル レコードを削除します。

コミット調整メトリクスでのみ使用できます。

See also currentOp.twoPhaseCommitCoordinator.stepDurations.

currentOp.twoPhaseCommitCoordinator.commitStartTime

コミットが開始された日時。

コミット調整メトリクスでのみ使用できます。

currentOp.twoPhaseCommitCoordinator.hasRecoveredFromFailover

コミットを調整しているシャードで フェイルオーバー によりコミット調整が再開されたかどうかを示すブール値。

If hasRecoveredFromFailover is true, then the times specified in currentOp.twoPhaseCommitCoordinator.stepDurations may not be accurate for all steps.

コミット調整メトリクスでのみ使用できます。

currentOp.twoPhaseCommitCoordinator.stepDurations

A document that contains the duration, in microseconds, of the commit coordination steps/state completed or in progress:

"stepDurations" : {
"writingParticipantListMicros" : Long(17801),
"totalCommitDurationMicros" : Long(42488463),
"waitingForVotesMicros" : Long(30378502),
"writingDecisionMicros" : Long(15015),
"waitingForDecisionAcksMicros" : Long(12077145),
"deletingCoordinatorDocMicros" : Long(6009)
},

If currentOp.twoPhaseCommitCoordinator.hasRecoveredFromFailover is true, then the times specified in stepDurations may not be accurate for all steps.

inactive状態のコーディネーターの場合、ドキュメントは空です。

"stepDurations" : {
}

コミット調整メトリクスでのみ使用できます。

See currentOp.twoPhaseCommitCoordinator.state.

currentOp.twoPhaseCommitCoordinator.decision

コミットまたは中止の決定を含むドキュメント。例:

  • コミットの決定を行うには:

    "decision" : {
    "decision" : "commit",
    "commitTimestamp" : Timestamp(1572034669, 3)
    }
  • 中止の決定を行うには:

    "decision" : {
    "decision" : "abort",
    "abortStatus" : {
    "code" : 282,
    "codeName" : "TransactionCoordinatorReachedAbortDecision",
    "errmsg" : "Transaction exceeded deadline"
    }
    }

コミット調整メトリクスでのみ使用できます。

currentOp.twoPhaseCommitCoordinator.deadline

コミットが完了する必要がある日時。

コミット調整メトリクスでのみ使用できます。

currentOp.opid

The identifier for the operation. You can pass this value to db.killOp() in mongosh to terminate the operation.

警告

実行中の操作は、細心の注意を払って終了します。 クライアントによって開始された操作を終了するにはdb.killOp()のみを使用し、内部データベース操作は終了しません

currentOp.active

操作が開始されたかどうかを指定するブール値。 値は、操作が開始された場合はtrueで、操作がアイドル状態(アイドル接続や現在アイドル状態の内部スレッドなど)の場合はfalseです。 操作が別の操作に中断された場合でも、操作をアクティブにすることができます。 非アクティブなsignalProcessingThreadなどの一部の非アクティブなバックグラウンド スレッドの場合、MongoDB はさまざまな空のフィールドを抑制します。

currentOp.secs_running

操作の期間(秒単位)。 MongoDB は、操作の開始時刻から現在の時刻を減算してこの値を計算します。

Only appears if the operation is running; i.e. if active is true.

currentOp.microsecs_running

操作の継続時間(マイクロ秒単位)。 MongoDB は、操作の開始時刻から現在の時刻を減算してこの値を計算します。

Only appears if the operation is running; i.e. if active is true.

currentOp.op

A string that identifies the specific operation type. Only present if currentOp.type is op.

可能な値は次のとおりです。

  • "none"

  • "update"

  • "insert"

  • "query"

  • "command"

  • "getmore"

  • "remove"

  • "killcursors"

"query" 操作には、読み取り操作が含まれます。

"command" 操作には、 や createIndexesなどのほとんどの コマンドfindAndModify が含まれます。

currentOp.ns

操作の対象となる名前空間。 名前空間は、データベース名とコレクション名をドットで連結したもの( . )で構成されています。つまり、 "<database>.<collection>"です。

currentOp.command

この操作に関連付けられた完全なコマンドオブジェクトを含むドキュメント。

たとえば、次の出力には、 testという名前のデータベース内のitemsという名前のコレクションに対するfind操作のコマンド オブジェクトが含まれています。

"command" : {
"find" : "items",
"filter" : {
"sku" : 1403978
},
...
"$db" : "test"
}

次の出力例には、 testという名前のデータベース内のitemsという名前のコレクションで、カーソル ID 19234103609を持つ コマンドによって生成されたgetMore操作のコマンド オブジェクトが含まれています。

"command" : {
"getMore" : Long("19234103609"),
"collection" : "items",
"batchSize" : 10,
...
"$db" : "test"
},

コマンド ドキュメントが 1 キロバイトを超える場合、ドキュメントの形式は次のようになります。

"command" : {
"$truncated": <string>,
"comment": <string>
}

$truncatedフィールドには、ドキュメントのcommentフィールド(存在する場合)を除いたドキュメントの string のサマリーが含まれます。 サマリーが依然として 1 キロバイトを超える場合は、さらに切り捨てられ、string の末尾に省略記号 (...) が表示されます。

操作にコメントが渡された場合、comment フィールドが存在します。任意のデータベースコマンドにコメントを添付できます。

currentOp.planSummary

カーソルがコレクションスキャン( COLLSCAN )またはインデックススキャン( IXSCAN { ... } )のどちらを使用するかを指定します。

IXSCANには、使用されるインデックスの仕様ドキュメントも含まれます。

currentOp.prepareReadConflicts

現在の操作が、コミットまたは中止するための書込み (write) で準備されたトランザクションを待機しなければならなかった回数。

待機中も、現在の操作は必要なロックとストレージ エンジン リソースを保持し続けます。

currentOp.writeConflicts

現在の操作が同じドキュメントで別の書込み (write) 操作と競合した回数。

currentOp.cursor

A document that contains the cursor information for getmore operations; i.e. where op is getmore.

If reporting on a getmore operation before the getmore has accessed its cursor information, the cursor field is not available.

currentOp.cursor.cursorId

カーソルの ID。

currentOp.cursor.createdDate

カーソルが作成された日時。

currentOp.cursor.lastAccessDate

カーソルが最後に使用された日時。

currentOp.cursor.nDocsReturned

カーソルによって返されたドキュメントの累計数。

currentOp.cursor.nBatchesReturned

カーソルによって返されたバッチの累計数。

currentOp.cursor.noCursorTimeout

アイドル状態の場合、カーソルがタイムアウトしないことを示すフラグ。 (つまり、カーソルにnoTimeoutオプションが設定されている場合)。

  • true の場合、アイドル状態のときにカーソルはタイムアウトしません。

  • false の場合、アイドル状態のときにカーソルはタイムアウトになります。

currentOp.cursor.tailable

カーソルがCappedコレクションの 追尾可能 (tailable) カーソル かどうかを示すフラグ。 クライアントが初期カーソルの結果を使い果たした後も、追尾可能 (tailable) カーソルはオープンしたままになります。

currentOp.cursor.awaitData

追尾可能 (tailable) カーソルが、データを返さずに新しいデータを待機している間に、カーソル上のgetMoreコマンドを一時的にブロックするかどうかを示すフラグ。

追尾可能 (tailable) ではないカーソルの場合、値は常に false です。

currentOp.cursor.originatingCommand

originatingCommandフィールドには完全なコマンドオブジェクト(例: findまたはaggregate )が必要です。

currentOp.cursor.planSummary

カーソルがコレクションスキャン( COLLSCAN )またはインデックススキャン( IXSCAN { ... } )のどちらを使用するかを指定します。

IXSCANには、使用されるインデックスの仕様ドキュメントも含まれます。

currentOp.cursor.operationUsingCursorId

カーソルを使用する操作のopid

カーソルがアイドル状態でない場合にのみ存在します。

currentOp.waitingForLatch

The waitingForLatch document is only available if the operation is waiting to acquire an internal locking primitive (a.k.a. a latch) or for an internal condition to be met.

たとえば、

"waitingForLatch" : {
"timestamp" : ISODate("2020-03-19T23:25:58.412Z"),
"captureName" : "FutureResolution",
},
出力フィールド
説明

タイムスタンプ

操作が待機を開始した日時。

acceptName

操作が現在ブロックされているセクションの内部名。

バージョン4.2.2の新機能。

currentOp.locks

The locks document reports the type and mode of locks the operation currently holds. The possible lock types are as follows:

ロック タイプ
説明

ParallelBatchWriterMode

並列バッチ書込みモードのロックを表します。

以前のバージョンでは、PBWM 情報は Global ロック情報の一部として報告されていました。

ReplicationStateTransition

レプリカセットの状態遷移に対して取得されたロックを表します。

Global

グローバル ロックを表します。

Database

データベース ロックを表します。

Collection

コレクション ロックを表します。

Mutex

ミューテックスを表します。

Metadata

メタデータ ロックを表します。

oplog

oplog のロックを表します。

使用可能なモードは次のとおりです。

ロックモード
説明

R

共有ロック(S)を表します。

W

排他ロック(X)を表します。

r

インテント共有ロック(IS)を表します。

w

インテント排他ロック(IX)を表します。

currentOp.admissionPriority

内部でのみ使用します。 値は、ストレージ エンジンのアクションを実行するためにチケットを取得しようとする際の操作の優先順位です。

可能な値は、「低」、「標準」、および「即座」です。 「低」値を持つ操作のみが報告されます。

currentOp出力の例:

{
type: 'op',
host: 'ip-10-122-5-147:27017',
desc: 'JournalFlusher',
active: true,
currentOpTime: '2022-10-11T12:45:52.053+00:00',
opid: 201,
op: 'none',
ns: '',
command: {},
numYields: 0,
admissionPriority: 'low',
locks: {},
waitingForLock: false,
lockStats: {},
waitingForFlowControl: false,
flowControlStats: {}
}

admissionPriority値も低速ログで報告されます。

バージョン6.3の新機能。

currentOp.waitingForLock

Returns a boolean value. waitingForLock is true if the operation is waiting for a lock and false if the operation has the required lock.

currentOp.msg

The msg provides a message that describes the status and progress of the operation. In the case of indexing or mapReduce operations, the field reports the completion percentage.

currentOp.progress

Reports on the progress of mapReduce or indexing operations. The progress fields corresponds to the completion percentage in the msg field. The progress specifies the following information:

currentOp.progress.done

完了した数値を報告します。

currentOp.progress.total

合計数を報告します。

currentOp.killPending

操作に現在終了のフラグが付けられている場合は、 trueを返します。 操作が次の安全な終了点に遭遇すると、操作は終了します。

currentOp.numYields

numYields は、他の操作を完了させるために操作が中断した回数を報告するカウンターです。

通常、MongoDB がまだ完全にメモリに読み込んでいないデータにアクセスする必要がある場合、操作は中断します。 これにより、MongoDB が中断された操作のデータを読み込んでいる間に、メモリにデータがある他の操作を迅速に完了できます。

currentOp.dataThroughputLastSecond

過去 1 秒にvalidate操作によって処理されたデータの量(MiB 単位)。 現在ドキュメントをスキャンしているvalidate操作でのみ使用できます。 例:

"msg" : "Validate: scanning documents Validate: scanning documents: 7258/24000 30%",
"progress" : {
"done" : 7258,
"total" : 24000
},
"numYields" : 0,
"dataThroughputLastSecond" : 15.576952934265137,
"dataThroughputAverage" : 15.375944137573242,
currentOp.dataThroughputAverage

validate操作によって処理された平均データ量(MiB 単位)。 現在ドキュメントをスキャンしているvalidate操作でのみ使用できます。 例:

"msg" : "Validate: scanning documents Validate: scanning documents: 7258/24000 30%",
"progress" : {
"done" : 7258,
"total" : 24000
},
"numYields" : 0,
"dataThroughputLastSecond" : 15.576952934265137,
"dataThroughputAverage" : 15.375944137573242,
currentOp.fsyncLock

データベースが現在fsync write/snapshotに対してロックされているかどうかを指定します。

Only appears if locked; i.e. if fsyncLock is true.

currentOp.info

Information regarding how to unlock database from db.fsyncLock(). Only appears if fsyncLock is true.

currentOp.lockStats

For each lock type and mode (see currentOp.locks for descriptions of lock types and modes), returns the following information:

currentOp.lockStats.acquireCount

操作が指定モードでロックを取得した回数。

currentOp.lockStats.acquireWaitCount

Number of times the operation had to wait for the acquireCount lock acquisitions because the locks were held in a conflicting mode. acquireWaitCount is less than or equal to acquireCount.

currentOp.lockStats.timeAcquiringMicros

操作がロックを取得するために待機しなければならなかった累計時間(マイクロ秒単位)。

timeAcquiringMicros divided by acquireWaitCount gives an approximate average wait time for the particular lock mode.

currentOp.lockStats.deadlockCount

ロック取得を待機中に操作でデッドロックが発生した回数。

currentOp.waitingForFlowControl

操作がフロー制御を待機しているプロセス内かどうかを示すブール値。

currentOp.flowControlStats

この操作のフロー制御に関する統計。

currentOp.flowControlStats.acquireCount

この操作でチケットが取得された回数。

currentOp.flowControlStats.acquireWaitCount

この操作がチケットを取得するために待機した回数。

currentOp.flowControlStats.timeAcquiringMicros

この操作がチケットを取得するために待機した合計時間。

currentOp.totalOperationTimeElapsedSecs

現在のリシャーディング操作の合計経過時間(秒単位)。 新たにリシャーディング操作を開始すると、時間は 0 に設定されます。

リシャーディング操作 が行われている場合にのみ存在します。

バージョン 5.0 の新機能。

MongoDB 6.1 以降では、このメトリクスはリシャーディング中に コーディネーターでも使用できます。

currentOp.updatesApplied

適用された更新の数。

リシャーディング操作 が行われているときにのみ 受信者シャード に存在します。

バージョン6.1の新機能。

currentOp.remainingOperationTimeEstimatedSecs

remainingOperationTimeEstimatedSecs: 現在のリシャーディング操作の推定残り時間(秒単位)。 新たにリシャーディング操作を開始すると、 -1として返されます。

次以降:

  • MongoDB 5.0 および MongoDB 6.1 より前では、 remainingOperationTimeEstimatedSecsは 再シャーディング操作 中に受信者シャードでのみ使用できます。

  • MongoDB 6.1、 remainingOperationTimeEstimatedSecsは、リシャーディング操作中にコーディネーターで使用することもできます。

リシャーディング操作では、これらのフェーズを順番に実行されます。

  1. クローン フェーズは、現在のコレクション データを複製します。

  2. キャッチアップ フェーズは、保留中の書込み (write) 操作をリシャーディングされたコレクションに適用します。

remainingOperationTimeEstimatedSecs は悲観的な時間推定値に設定されています。

  • キャッチアップフェーズの推定時間は、比較的長い時間であるクローンフェーズ時間に設定されます。

  • 実際には、保留中の書込み操作が少ない場合、実際のキャッチアップ フェーズ時間は比較的短いです。

バージョン 5.0 の新機能。

currentOp.allShardsLowestRemainingOperationTimeEstimatedSecs

全シャードに渡って計算された、推定される残り秒数の最小値です。

リシャーディング操作が行われているときにのみ、コーディネーターに存在します。

バージョン6.1の新機能。

currentOp.allShardsHighestRemainingOperationTimeEstimatedSecs

全シャードにわたって計算された、推定される残り秒数の最高値。

リシャーディング操作が行われているときにのみ、コーディネーターに存在します。

バージョン6.1の新機能。

currentOp.approxDocumentsToCopy

リシャーディング操作中にドナー シャードから受信者シャードにコピーされるドキュメントのおおよその数です。 この数値は、リシャーディング操作の開始時に設定され、設定された後は変化しない推定値です。 新たにリシャーディング操作を開始すると、数値は 0 に設定されます。 リシャーディング後のデータ分布が完全に均等でない場合、 $currentOp.documentsCopied$currentOp.bytesCopiedはそれぞれ$currentOp.approxDocumentsToCopy$currentOp.approxBytesToCopyを超えてしまう可能性があります。

リシャーディング操作 が行われているときにのみ 受信者シャード に存在します。

バージョン 5.0 の新機能。

currentOp.documentsCopied

リシャーディング操作中にドナー シャードから受信者シャードにコピーされたドキュメントの数です。 新たにリシャーディング操作を開始すると、数値は 0 に設定されます。

リシャーディング操作 が行われているときにのみ 受信者シャード に存在します。

バージョン 5.0 の新機能。

currentOp.approxBytesToCopy

リシャーディング操作中にドナー シャードから受信者シャードにコピーされるおおよそのバイト数。 この数値は、リシャーディング操作の開始時に設定され、設定された後は変化しない推定値です。 新たにリシャーディング操作を開始すると、数値は 0 に設定されます。 リシャーディング後のデータ分布が完全に均等でない場合、 $currentOp.documentsCopied$currentOp.bytesCopiedはそれぞれ$currentOp.approxDocumentsToCopy$currentOp.approxBytesToCopyを超えてしまう可能性があります。

リシャーディング操作 が行われているときにのみ 受信者シャード に存在します。

バージョン 5.0 の新機能。

currentOp.bytesCopied

リシャーディング操作中にドナー シャードから受信者シャードにコピーされたバイト数です。 新たにリシャーディング操作を開始すると、数値は 0 に設定されます。

リシャーディング操作 が行われているときにのみ 受信者シャード に存在します。

バージョン 5.0 の新機能。

currentOp.countWritesToStashCollections

受信者の溜め込みコレクションへの書込み (write) 回数。

リシャーディング操作 が行われているときにのみ 受信者シャード に存在します。

バージョン6.1の新機能。

currentOp.countWritesDuringCriticalSection

ドナーのクリティカル セクション中に試行された書込み (write) の数。

リシャーディング操作が行われているときにのみ存在します。

バージョン6.1の新機能。

currentOp.countReadsDuringCriticalSection

ドナーのクリティカル セクション中に試行された読み取りの数。

リシャーディング操作が行われているときにのみ存在します。

バージョン6.1の新機能。

currentOp.deletesApplied

一時的なリシャーディング コレクションに適用された削除の数。 削除を含む oplog エントリごとに、カウンターは 1 ずつ増加します。

リシャーディング操作 が行われているときにのみ 受信者シャード に存在します。

バージョン6.1の新機能。

currentOp.insertsApplied

一時的なリシャーディング コレクションに適用された挿入の数。 挿入を含む oplog のエントリごとに、カウンターは 1 ずつ増加します。

リシャーディング操作 が行われているときにのみ 受信者シャード に存在します。

バージョン6.1の新機能。

currentOp.totalCopyTimeElapsedSecs

現在のリシャーディング操作におけるドナー シャードから受信者シャードへの進行中のデータ コピー タスクの合計経過時間(秒単位)。 新たにリシャーディング操作を開始すると、時間は 0 に設定されます。

リシャーディング操作 が行われているときにのみ 受信者シャード に存在します。

バージョン 5.0 の新機能。

MongoDB 6.1 以降では、このメトリクスはリシャーディング中に コーディネーターでも使用できます。

currentOp.oplogEntriesFetched

現在の リシャーディング操作 で oplog から取得されたエントリの数です。新たにリシャーディング操作を開始すると、数値は 0 に設定されます。

リシャーディング操作 が行われているときにのみ 受信者シャード に存在します。

バージョン 5.0 の新機能。

currentOp.oplogEntriesApplied

現在の リシャーディング操作 で oplog に適用されたエントリの数。新たにリシャーディング操作を開始すると、数値は 0 に設定されます。

リシャーディング操作 が行われているときにのみ 受信者シャード に存在します。

バージョン 5.0 の新機能。

currentOp.totalApplyTimeElapsedSecs

現在のリシャーディング操作における適用ステップの合計経過時間(秒単位)です。 適用ステップでは、受信者シャードは、ドナー シャードから新たに受信した書込み (write) に基づいてデータを変更するために、 oplogエントリを適用します。 新たにリシャーディング操作を開始すると、時間は 0 に設定されます。

リシャーディング操作 が行われているときにのみ 受信者シャード に存在します。

バージョン 5.0 の新機能。

MongoDB 6.1 以降では、このメトリクスはリシャーディング中に コーディネーターでも使用できます。

currentOp.countWritesDuringCriticalSection

現在のリシャーディング操作でクリティカル セクションにおいて実行された書込み (write) の数。 クリティカル セクションは、リシャーディング中のコレクションへの新規の受信書込み (write) を防止します。 新たにリシャーディング操作を開始すると、数値は 0 に設定されます。

リシャーディング操作が行われているときにのみ存在します。

バージョン 5.0 の新機能。

currentOp.totalCriticalSectionTimeElapsedSecs

現在のリシャーディング操作におけるクリティカル セクションの合計経過時間(秒単位)。 クリティカル セクションは、リシャーディング中のコレクションへの新規の受信書込み (write) を防止します。 新たにリシャーディング操作を開始すると、時間は 0 に設定されます。

リシャーディング操作が行われているときにのみ存在します。

バージョン 5.0 の新機能。

MongoDB 6.1 以降では、このメトリクスはリシャーディング中に コーディネーターでも使用できます。

currentOp.donorState

リシャーディング操作におけるドナー シャードの現在の状態です。 新たにリシャーディング操作を開始すると、状態はunusedに設定されます。

リシャーディング操作が行われているときにのみ存在します。

状態
説明

unused

リシャーディング操作を開始またはプライマリ フェイルオーバーから回復しようとしているとき

preparing-to-donate

ドナー シャードは、受信者シャードにデータを提供する準備をしています。

donating-initial-data

ドナー シャードは受信者シャードにデータを提供します。

donating-oplog-entries

ドナー シャードは、受信者シャードに oplog エントリを提供しています。

preparing-to-block-writes

ドナー シャードは、リシャーディング中のコレクションへの新規の受信書込み (write) 操作を阻止しようとしています。

error

リシャーディング操作中にエラーが発生しました

blocking-writes

ドナー シャードは新規の受信書込み (write) 操作を防ぎ、新規の受信書込み (write) が禁止されていることをすべての受信者シャードに通知しました。

done

ドナー シャードは古いシャーディングされたコレクションを削除し、リシャーディング操作は完了しました。

バージョン 5.0 の新機能。

currentOp.recipientState

リシャーディング操作 における受信者シャードの現在の状態です。 新たにリシャーディング操作を開始すると、状態はunusedに設定されます。

リシャーディング操作が行われているときにのみ存在します。

状態
説明

unused

リシャーディング操作を開始またはプライマリ フェイルオーバーから回復しようとしているとき

awaiting-fetch-timestamp

受信シャードは、ドナー シャードがデータを提供する準備ができるのを待っています。

creating-collection

受信者シャードは新しいシャーディングされたコレクションを作成しています。

cloning

受信者シャードはドナー シャードからデータを受信しています。

applying

受信者シャードは、ドナー シャードからの新規受信書込み (write) に基づいてデータのコピーを変更するために、oplog エントリを適用しています。

error

リシャーディング操作中にエラーが発生しました

strict-consistency

受信者シャードでは、すべてのデータ変更は一時的なコレクションに保存されます。

done

リシャーディング操作が完了しました。

バージョン 5.0 の新機能。

currentOp.coordinatorState

現在のリシャーディング操作におけるリシャーディング コーディネーターの状態です。 リシャーディング コーディネーターは、 コンフィギュレーションサーバーのプライマリで実行される操作です。 新たにリシャーディング操作を開始すると、状態はunusedに設定されます。

調整コンフィギュレーションサーバー上にのみ存在します。

状態
説明

unused

リシャーディング操作を開始またはプライマリ フェイルオーバーから回復しようとしているとき

initializing

リシャーディング コーディネーターは、コーディネーター ドキュメントを config.reshardingOperations に挿入し、元のコレクションの config.collections エントリに reshardingFields を追加しました。

preparing-to-donate

リシャーディング コーディネーター

  • は一時的なリシャーディング コレクション用の config.collections エントリを作成しました。

  • は新しいシャードキーに基づく範囲に対するエントリを config.chunks に挿入しました。

  • は新しいシャード キーに関連付けられたすべてのゾーンに対するエントリを config.tags に挿入しました。

コーディネーターは、参加シャードにリシャーディング操作を開始するように通知します。その後、コーディネーターはすべてのドナー シャードが minFetchTimestamp を選択し、提供の準備が整うまで待ちます。

cloning

リシャーディング コーディネーターは、受信者シャードにデータを提供するようドナー シャードに通知します。コーディネーターは、すべての受信者がドナーからのデータの複製を完了させるのを待機します。

applying

リシャーディング コーディネーターは、ドナー シャードから新たに受信した書込み (write) に基づいてデータのコピーを変更するよう、受信者シャードに通知します。コーディネーターは、すべての受信者が oplog エントリの適用を完了させるのを待機します。

blocking-writes

リシャーディング コーディネーターは、コレクションへの新たな受信書込み (write) 操作がリシャーディングされないよう、ドナー シャードに通知します。その後、コーディネーターはすべての受信者がすべてのデータ変更を完了させるのを待機します。

aborting

リシャーディング操作中に回復不能なエラーが発生したか、abortReshardCollection コマンド(またはsh.abortReshardCollection()メソッド)が実行されました。

committing

リシャーディング コーディネーターは、一時的なリシャーディングコレクションの config.collections エントリを削除します。次に、コーディネーターは recipientFields をソース コレクションのエントリに追加します。

バージョン 5.0 の新機能。

currentOp.opStatus

このメトリクスはバージョン6.1で削除されています。

バージョン6.1で変更。

currentOp.collUuid

サンプリングされたコレクションの UUID 。

このフィールドは、クエリ サンプリングに関連するドキュメントにのみ表示されます。 詳細については、「サンプル クエリ 」を参照してください。

バージョン7.0の新機能。

currentOp.startTime

クエリのサンプリングが開始された時刻。

このフィールドは、クエリ サンプリングに関連するドキュメントにのみ表示されます。 詳細については、「サンプル クエリ 」を参照してください。

バージョン7.0の新機能。

currentOp.samplesPerSecond

1 秒あたりにサンプリングするクエリの最大数。

シャーディングされたクラスターでは、これはmongos ではなくmongod で報告されます。レプリカセットでは、これはmongodで報告されます。

このフィールドは、クエリ サンプリングに関連するドキュメントにのみ表示されます。 詳細については、「サンプル クエリ 」を参照してください。

バージョン7.0の新機能。

currentOp.sampledReadsCount

サンプリングされた読み取りクエリの数

このフィールドは、クエリ サンプリングに関連するドキュメントにのみ表示されます。 詳細については、「サンプル クエリ 」を参照してください。

バージョン7.0の新機能。

currentOp.sampledWritesCount

サンプリングされた書込み (write) クエリの数です。

このフィールドは、クエリ サンプリングに関連するドキュメントにのみ表示されます。 詳細については、「サンプル クエリ 」を参照してください。

バージョン7.0の新機能。

currentOp.sampledReadsBytes

サンプリングされた読み取りクエリのサイズ(バイト単位)。

レプリカセットでは、これはmongodごとに報告されます。

シャーディングされたクラスターでは、 --shardsvr mongodについてのみ報告されます。

このフィールドは、クエリ サンプリングに関連するドキュメントにのみ表示されます。 詳細については、「サンプル クエリ 」を参照してください。

バージョン7.0の新機能。

currentOp.sampledWritesBytes

サンプリングされた書込み (write) クエリのサイズ(バイト単位)。

レプリカセットでは、これはmongodごとに報告されます。

シャーディングされたクラスターでは、 --shardsvr mongodについてのみ報告されます。

このフィールドは、クエリ サンプリングに関連するドキュメントにのみ表示されます。 詳細については、「サンプル クエリ 」を参照してください。

バージョン7.0の新機能。