> For the complete MongoDB documentation index, see www.mongodb.com/docs/llms.txt

<!--
Tab options on this page. Append to the .md URL to filter:
  ?tabs=<id,...>   select specific tabs (e.g. ?tabs=nodejs,shell)
  ?allTabs=true    include every tab
  (no param)       default: one tab per tabset

Available tabs:
  other tabs: shard, mongos, mongod
-->

# serverStatus (database command)

## Definition

The [`serverStatus`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-dbcommand-dbcmd.serverStatus) command returns a document that provides an overview of the database's state. Monitoring applications can run this command at a regular interval to collect statistics about the instance.

## Compatibility

This command is available in deployments hosted in the following environments:

- [MongoDB Atlas](https://www.mongodb.com/docs/atlas): The fully managed service for MongoDB deployments in the cloud

**Note:**

This command is supported in all MongoDB Atlas clusters. For information on Atlas support for all commands, see [Unsupported Commands.](https://www.mongodb.com/docs/atlas/unsupported-commands/)

- [MongoDB Enterprise](https://www.mongodb.com/docs/manual/administration/install-enterprise.md#std-label-install-mdb-enterprise): The subscription-based, self-managed version of MongoDB

- [MongoDB Community](https://www.mongodb.com/docs/manual/administration/install-community.md#std-label-install-mdb-community-edition): The source-available, free-to-use, and self-managed version of MongoDB

## Syntax

The command has the following syntax:

```javascript
db.runCommand(
   {
     serverStatus: 1
   }
)
```

The value (that is, `1` above) does not affect the operation of the command. The `db.serverStatus()` command returns a large amount of data. To return a specific object or field from the output append the object or field name to the command.

For example:

```javascript
db.runCommand({ serverStatus: 1}).metrics
db.runCommand({ serverStatus: 1}).metrics.commands
db.runCommand({ serverStatus: 1}).metrics.commands.update
```

[`mongosh`](https://www.mongodb.com/docs/mongodb-shell.md#mongodb-binary-bin.mongosh) provides the [`db.serverStatus()`](https://www.mongodb.com/docs/manual/reference/method/db.serverStatus.md#mongodb-method-db.serverStatus) wrapper for the [`serverStatus`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-dbcommand-dbcmd.serverStatus) command.

**See also:**

Much of the output of [`serverStatus`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-dbcommand-dbcmd.serverStatus) is also displayed dynamically by [`mongostat`](https://www.mongodb.com/docs/database-tools/mongostat.md#mongodb-binary-bin.mongostat). See the [`mongostat`](https://www.mongodb.com/docs/database-tools/mongostat.md#mongodb-binary-bin.mongostat) command for more information.

## Behavior

By default, [`serverStatus`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-dbcommand-dbcmd.serverStatus) excludes in its output:

- some content in the [repl](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#std-label-server-status-repl) document.

- [mirroredReads](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#std-label-server-status-mirroredReads) document.

To include fields that are excluded by default, specify the top-level field and set it to `1` in the command. To exclude fields that are included by default, specify the field and set to 0. You can specify either top-level or embedded fields.

For example, the following operation excludes the `repl`, `metrics` and `locks` information in the output.

```javascript
db.runCommand( { serverStatus: 1, repl: 0, metrics: 0, locks: 0 } )
```

For example, the following operation excludes the embedded `histogram` field in the output.

```javascript
db.runCommand( { serverStatus: 1, metrics: { query: { multiPlanner: { histograms: false } } } } )
```

The following example includes all [repl](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#std-label-server-status-repl) information in the output:

```javascript
db.runCommand( { serverStatus: 1,  repl: 1 } )
```

### Exclude All Optional Fields

Starting in MongoDB 8.3, you can exclude all optional fields from the `serverStatus` output by specifying `none: 1`. After you exclude all optional fields, you can then specify the fields you want to include.

This example uses `none` to initially exclude all optional field from the output, then includes the  `locks` document.

```javascript
db.runCommand({ serverStatus: 1, none: 1, locks: 1 })
```

### Initialization

The statistics reported by [`serverStatus`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-dbcommand-dbcmd.serverStatus) are reset when the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) server is restarted.

This command always returns a value, even on a fresh database. The related command [`db.serverStatus()`](https://www.mongodb.com/docs/manual/reference/method/db.serverStatus.md#mongodb-method-db.serverStatus) does not always return a value unless a counter has started to increment for a particular metric.

After you run an update query, `db.serverStatus()` and `db.runCommand({ serverStatus: 1})` both return the same values.

```javascript
{
   arrayFilters : Long("0"),
   failed : Long("0"),
   pipeline : Long("0"),
   total : Long("1")
}
```

### Include `mirroredReads`

By default, the [`mirroredReads`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.mirroredReads) information is not included in the output. To return [`mirroredReads`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.mirroredReads) information, you must explicitly specify the inclusion:

```javascript
db.runCommand( { serverStatus: 1, mirroredReads: 1 } )
```

## Output

**Note:**

The output fields vary depending on the version of MongoDB, underlying operating system platform, the storage engine, and the kind of node, including [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos), [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) or [replica set](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-replica-set) member.

For the [`serverStatus`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-dbcommand-dbcmd.serverStatus) output specific to the version of your MongoDB, refer to the appropriate version of the MongoDB Manual.

### asserts

```javascript
asserts: {
   regular: <num>,
   warning: <num>,
   msg: <num>,
   user: <num>,
   rollovers: <num>
},
```

A document that reports on the number of assertions raised since the MongoDB process started. Assertions are internal checks for errors that occur while the database is operating and can help diagnose issues with the MongoDB server. Non-zero asserts values indicate assertion errors, which are uncommon and not an immediate cause for concern. Errors that generate asserts can be recorded in the log file or returned directly to a client application for more information.

The number of regular assertions raised since the MongoDB process started. Examine the MongoDB log for more information.

This field always returns zero `0`.

The number of message assertions raised since the MongoDB process started. Examine the log file for more information about these messages.

The number of "user asserts" that have occurred since the last time the MongoDB process started. These are errors that user may generate, such as out of disk space or duplicate key. You can prevent these assertions by fixing a problem with your application or deployment. Server logs may have limited information about "user asserts." To learn more information about the source of "user asserts," check the application logs for application errors.

The number of times that the assert counters have rolled over since the last time the MongoDB process started. The counters will roll over to zero after 2 30 assertions. Use this value to provide context to the other values in the [`asserts`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.asserts) data structure.

### bucketCatalog

```javascript
bucketCatalog: {
    numBuckets: <num>,
    numOpenBuckets: <num>,
    numIdleBuckets: <num>,
    memoryUsage: <num>,
    numBucketInserts: <num>,
    numBucketUpdates: <num>,
    numBucketsOpenedDueToMetadata: <num>,
    numBucketsClosedDueToCount: <num>,
    numBucketsClosedDueToSchemaChange: <num>,
    numBucketsClosedDueToSize: <num>,
    numBucketsClosedDueToTimeForward: <num>,
    numBucketsClosedDueToTimeBackward: <num>,
    numBucketsClosedDueToMemoryThreshold: <num>,
    numCommits: <num>,
    numMeasurementsGroupCommitted: <num>,
    numWaits: <num>,
    numMeasurementsCommitted: <num>,
    avgNumMeasurementsPerCommit: <num>,
    numBucketsClosedDueToReopening: <num>,
    numBucketsArchivedDueToMemoryThreshold: <num>,
    numBucketsArchivedDueToTimeBackward: <num>,
    numBucketsReopened: <num>,
    numBucketsKeptOpenDueToLargeMeasurements: <num>,
    numBucketsClosedDueToCachePressure: <num>,
    numBucketsFrozen: <num>,
    numCompressedBucketsConvertedToUnsorted: <num>,
    numBucketsFetched: <num>,
    numBucketsQueried: <num>,
    numBucketFetchesFailed: <num>,
    numBucketQueriesFailed: <num>,
    numBucketReopeningsFailed: <num>,
    numDuplicateBucketsReopened: <num>,
    stateManagement: {
       bucketsManaged: <num>,
       currentEra: <num>,
       erasWithRemainingBuckets: <num>,
       trackedClearOperations: <num>
    }
 }
```

**New in version 5.0**

A document that reports metrics related to the [internal storage of time series collections.](https://www.mongodb.com/docs/manual/core/timeseries/timeseries-bucketing.md#std-label-timeseries-bucket-catalog)

The `bucketCatalog` returns the following metrics:

| Metric | Description |
| --- | --- |
| `numBuckets` | The total number of tracked buckets. Expected to be equal to the sum of `numOpenBuckets` and `numArchivedBuckets`. |
| `numOpenBuckets` | The number of tracked buckets with a full representation stored in-cache, ready to receive new documents. |
| `numIdleBuckets` | The number of buckets that are open and currently without an uncommitted document insertion pending. A subset of numOpenBuckets. |
| `numArchivedBuckets` | The number of tracked buckets with a minimal representation stored in-cache that can be efficiently reopened to receive new documents. |
| `memoryUsage` | The number of bytes used by internal bucketing data structures. |
| `numBucketInserts` | The number of new buckets created. |
| `numBucketUpdates` | The number times an existing bucket was updated to include additional documents. |
| `numBucketsOpenedDueToMetadata` | The number of buckets opened because a document arrived with a `metaField` value that didn't match any currently open buckets. |
| `numBucketsClosedDueToCount` | The number of buckets closed due to reaching their document count limit. |
| `numBucketsClosedDueToSchemaChange` | The number of buckets closed because the schema of an incoming document was incompatible with that of the documents in the open bucket. |
| `numBucketsClosedDueToSize` | The number of buckets closed because an incoming document would make the bucket exceed its size limit. |
| `numBucketsClosedDueToTimeForward` | The number of buckets closed because a document arrived with a `timeField` value after the maximum time of all currently open buckets for that `metaField` value. |
| `numBucketsClosedDueToTimeBackward` | The number of buckets closed because a document arrived with a `timeField` value before the minimum time of all currently open buckets for that `metaField` value. |
| `numBucketsClosedDueToMemoryThreshold` | The number of buckets closed because the set of active buckets didn't fit within the allowed bucket catalog cache size. |
| `numCommits` | The number of bucket-level commits to the time series collection. |
| `numMeasurementsGroupCommitted` | The number of commits that included measurements from concurrent insert commands. |
| `numWaits` | The number of times an operation waited on another thread to either reopen a bucket or finish a group commit. |
| `numMeasurementsCommitted` | The number of documents committed to the time series collection. |
| `avgNumMeasurementsPerCommit` | The average number of documents per commit. |
| `numBucketsClosedDueToReopening` | The number of buckets closed because a suitable bucket was re-opened instead. |
| `numBucketsArchivedDueToMemoryThreshold` | The number of buckets archived because the set of active buckets didn't fit within the allowed bucket catalog cache size. |
| `numBucketsArchivedDueToTimeBackward` | The number of buckets archived because a document arrived with a `timeField` value before the minimum time of all currently open buckets for that `metaField` value. |
| `numBucketsReopened` | The number of buckets re-opened because a document arrived that didn't match any open buckets, but did match an existing non-full bucket. |
| `numBucketsKeptOpenDueToLargeMeasurements` | The number of buckets that would have been closed due size, but were kept open due to not containing a minimum number of documents required to achieve reasonable compression. |
| `numBucketsClosedDueToCachePressure` | The number of buckets closed because their size exceeds the bucket catalog's dynamic [bucket size limit](https://www.mongodb.com/docs/manual/core/timeseries/timeseries-bucketing.md#std-label-timeseries-bucket-closure) derived from available storage engine cache size and `numBuckets`. This limit is distinct from the maximum bucket size limit. |
| `numBucketsFrozen` | The number of frozen buckets. Buckets are frozen if attempting to compress the bucket would corrupt its contents. |
| `numCompressedBucketsConvertedToUnsorted` | The number of compressed buckets that contain documents not sorted by their respective `timeField` values. |
| `numBucketsFetched` | The number of archived buckets fetched to check if they were suitable for re-opening. |
| `numBucketsQueried` | The total number of buckets queried to see if they could hold an incoming document. |
| `numBucketFetchesFailed` | The number of archived buckets fetched that were not suitable for re-opening. |
| `numBucketQueriesFailed` | The number of queries for a suitable open bucket that failed due to lack of candidate availability. |
| `numBucketReopeningsFailed` | The number of attempted bucket reopenings that failed due to reasons including conflicts with concurrent operations, malformed buckets, and more. |
| `numDuplicateBucketsReopened` | The number of re-opened buckets that are duplicates of currently open buckets. |
| `stateManagement` | A document that tracks bucket catalog state information. |
| `stateManagement.bucketsManaged` | The total number of buckets that are being tracked for conflict management. This includes open buckets in the bucket catalog and any buckets that are being directly written to, including by update and delete commands. |
| `stateManagement.currentEra` | The current era of the bucket catalog. The bucket catalog starts at era 0 and increments when a bucket is cleared. Attempting to insert into a bucket either causes it to be removed if it was cleared, or update it to the current era. |
| `stateManagement.erasWithRemainingBuckets` | The number of eras with tracked buckets. |
| `stateManagement.trackedClearOperations` | The number of times the a set of buckets has been cleared, but the removal of those buckets was deferred. This can happen due to events such as dropping a collection, moving a chunk in a sharded collection, or an election. |

You can also use the [`$collStats`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/collStats.md#mongodb-pipeline-pipe.-collStats) aggregation pipeline stage to find time series metrics. To learn more, see [storageStats Output on Time Series Collections.](https://www.mongodb.com/docs/manual/reference/operator/aggregation/collStats.md#std-label-storage-stats-time-series)

### catalogStats

**New in version 5.1**

```javascript
catalogStats: {
   collections: <num>,
   capped: <num>,
   views: <num>,
   timeseries: <num>,
   internalCollections: <num>,
   internalViews: <num>,
   systemProfile: <num>
}
```

A document that reports statistics on collection usage via collection counts.

The total number of user collections (not including system collections).

The total number of capped user collections.

The total number of user views.

The total number of time series collections.

The total number of system collections (collections on the `config`, `admin`, or `local` databases).

The total number of views of system collections (collections on the `config`, `admin`, or `local` databases).

The total number of [`profile`](https://www.mongodb.com/docs/manual/reference/system-collections.md#mongodb-data--database-.system.profile) collections on all databases.

### changeStreamPreImages

**New in version 5.0**

```javascript
changeStreamPreImages : {
   purgingJob : {
      totalPass : <num>,
      docsDeleted : <num>,
      bytesDeleted : <num>,
      scannedCollections : <num>,
      scannedInternalCollections : <num>,
      maxTimestampEligibleForTruncate : <timestamp>,
      maxStartWallTimeMillis : <num>,
      timeElapsedMillis : <num>,
   },
   expireAfterSeconds : <num>
}
```

A document that reports metrics related to [change stream pre-images.](https://www.mongodb.com/docs/manual/changeStreams.md#std-label-change-stream-pre-post-images)

**New in version 7.1**

A document that reports metrics related to the purging jobs for change stream pre-images. Purging jobs are background processes that the system uses to remove pre-images asynchronously.

The `changeStreamPreImages.purgingJob` field returns the following metrics:

| Metric | Description |
| --- | --- |
| `totalPass` | Total number of deletion passes completed by the purging job. |
| `docsDeleted` | Cumulative number of pre-image documents deleted by the purging job. |
| `bytesDeleted` | Cumulative size in bytes of all deleted documents from all pre-image collections by the purging job. |
| `scannedCollections` | Cumulative number of pre-image collections scanned by the purging job. In single-tenant environments, this number is the same as `totalPass` since each tenant has one pre-image collection. |
| `scannedInternalCollections` | Cumulative number of internal pre-image collections scanned by the purging job. Internal collections are the collections within the pre-image collections stored in `config.system.preimages`. |
| `maxTimestampEligibleForTruncate` | Most recent timestamp up to which old pre-images can be truncated to reduce storage space. Pre-images older than `maxTimestampEligibleForTruncate` can be truncated. **New in version 8.1** |
| `maxStartWallTimeMillis` | Maximum [wall clock time](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-wall-clock-time) in milliseconds from the first document of each pre-image collection. |
| `timeElapsedMillis` | Cumulative time in milliseconds of all deletion passes by the purging job. |

**New in version 7.1**

Amount of time in seconds that MongoDB retains pre-images. If [`expireAfterSeconds`](https://www.mongodb.com/docs/manual/reference/cluster-parameters/changeStreamOptions.md#mongodb-parameter-param.changeStreamOptions.preAndPostImages.expireAfterSeconds) is not defined, this metric does not appear in the `serverStatus` output.

### connections

```javascript
connections : {
   current : <num>,
   available : <num>,
   totalCreated : <num>,
   rejected : <num>,  // Added in MongoDB 6.3
   active : <num>,
   threaded : <num>,
   exhaustIsMaster : <num>,
   exhaustHello : <num>,
   awaitingTopologyChanges : <num>,
   loadBalanced : <num>,
   queuedForEstablishment : <num>, // Added in MongoDB 8.2 *(also available in 8.1.1, 8.0.12, and 7.0.23)*
   establishmentRateLimit : { // Added in MongoDB 8.2 *(also available in 8.1.1, 8.0.12, and 7.0.23)*
      rejected: <num>,
      exempted: <num>,
      interruptedDueToClientDisconnect: <num>
   }
}
```

A document that reports on the status of the connections. Use these values to assess the current load and capacity requirements of the server.

The number of incoming connections from clients to the database server. This includes connections from the current shell session and from other servers, such as [replica set](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-replica-set) members and [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) instances. Consider the value of [`connections.available`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.connections.available) for additional context.

The number of unused incoming connections available. Consider this value in combination with the value of [`connections.current`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.connections.current) to understand the connection load on the database, and the [UNIX `ulimit` Settings for Self-Managed Deployments](https://www.mongodb.com/docs/manual/reference/ulimit.md#std-label-ulimit) document for more information about system thresholds on available connections.

Count of **all** incoming connections created to the server. This number includes connections that have since closed.

**New in version 6.3**

The number of incoming connections the server rejected because the server doesn't have the capacity to accept additional connections or the [`net.maxIncomingConnections`](https://www.mongodb.com/docs/manual/reference/configuration-options.md#mongodb-setting-net.maxIncomingConnections) setting is reached.

**New in version 8.2**

*(also available in 8.1.1, 8.0.12, and 7.0.23)*

The number of incoming connections currently queued and waiting for establishment. This metric is relevant when connection establishment rate limiting is enabled using the [`ingressConnectionEstablishmentRateLimiterEnabled`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.ingressConnectionEstablishmentRateLimiterEnabled) parameter.

**New in version 8.2**

*(also available in 8.1.1, 8.0.12, and 7.0.23)*

A document that contains metrics related to the ingress connection establishment rate limiter. These metrics provide insights into how the rate limiter handles connection requests when [`ingressConnectionEstablishmentRateLimiterEnabled`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.ingressConnectionEstablishmentRateLimiterEnabled) is set to `true`. For more information on rate limiting, see [Configure the Ingress Connection Establishment Rate Limiter.](https://www.mongodb.com/docs/manual/tutorial/configure-rate-limiter.md#std-label-configure-rate-limiter)

**New in version 8.2**

*(also available in 8.1.1, 8.0.12, and 7.0.23)*

The number of incoming connections the server rejects due to connection establishment rate limiting. This metric shows how many connection attempts the server rejected rejected because they exceeded the rate limits set by the ingress connection establishment rate limiter parameters.

**New in version 8.2**

*(also available in 8.1.1, 8.0.12, and 7.0.23)*

The number of incoming connections that bypassed the rate limiter because they originated from IP addresses or CIDR ranges specified in the [`ingressConnectionEstablishmentRateLimiterBypass`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.ingressConnectionEstablishmentRateLimiterBypass) parameter. The server does note rate limit these connections and establishes them immediately, regardless of current queue size or rate limits.

**New in version 8.2**

*(also available in 8.1.1, 8.0.12, and 7.0.23)*

The number of incoming connections that were interrupted while waiting in the establishment queue because the client disconnected before establishment could complete. A high value for this metric sometimes indicates that the client's `connectTimeoutMS` setting is too short relative to the queue wait time, which is affected by [`ingressConnectionEstablishmentMaxQueueDepth`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.ingressConnectionEstablishmentMaxQueueDepth) and [`ingressConnectionEstablishmentRatePerSec`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.ingressConnectionEstablishmentRatePerSec). If this value is high, consider adjusting these parameters using the following formula: `maxQueueDepth < (establishmentRatePerSec / 1000) * (connectTimeoutMs - avgEstablishmentTimeMs)`.

The number of active client connections to the server. Active client connections refers to client connections that currently have operations in progress.

The number of incoming connections from clients that are assigned to threads that service client requests.

**New in version 5.0**

The number of connections whose last request was an `isMaster` request with [exhaustAllowed.](https://www.mongodb.com/docs/manual/reference/mongodb-wire-protocol.md#std-label-wire-msg-flags)

**Note:**

If you are running MongoDB 5.0 or later, do not use the `isMaster` command. Instead, use [`hello`.](https://www.mongodb.com/docs/manual/reference/command/hello.md#mongodb-dbcommand-dbcmd.hello)

The number of connections whose last request was a [`hello`](https://www.mongodb.com/docs/manual/reference/command/hello.md#mongodb-dbcommand-dbcmd.hello) request with [exhaustAllowed.](https://www.mongodb.com/docs/manual/reference/mongodb-wire-protocol.md#std-label-wire-msg-flags)

**New in version 5.0**

The number of clients currently waiting in a [`hello`](https://www.mongodb.com/docs/manual/reference/command/hello.md#mongodb-dbcommand-dbcmd.hello) or `isMaster` request for a topology change.

**Note:**

If you are running MongoDB 5.0 or later, do not use the `isMaster` command. Instead, use [`hello`.](https://www.mongodb.com/docs/manual/reference/command/hello.md#mongodb-dbcommand-dbcmd.hello)

**New in version 5.3**

The current number of incoming connections received through the load balancer.

### defaultRWConcern

The `defaultRWConcern` section provides information on the local copy of the global default read or write concern settings. The data may be stale or out of date. See [`getDefaultRWConcern`](https://www.mongodb.com/docs/manual/reference/command/getDefaultRWConcern.md#mongodb-dbcommand-dbcmd.getDefaultRWConcern) for more information.

```javascript
defaultRWConcern : {
  defaultReadConcern : {
    level : <string>
  },
  defaultWriteConcern : {
    w : <string> | <int>,
    wtimeout : <int>,
    j : <bool>
  },
  defaultWriteConcernSource: <string>,
  defaultReadConcernSource: <string>,
  updateOpTime : Timestamp,
  updateWallClockTime : Date,
  localUpdateWallClockTime : Date
}
```

The last known global default read or write concern settings.

The last known global default [read concern](https://www.mongodb.com/docs/manual/reference/read-concern.md#std-label-read-concern) setting.

If [`serverStatus`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-dbcommand-dbcmd.serverStatus) does not return this field, the global default read concern has either not been set *or* has not yet propagated to the instance.

The last known global default [read concern level](https://www.mongodb.com/docs/manual/reference/read-concern.md#std-label-read-concern-levels) setting.

If [`serverStatus`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-dbcommand-dbcmd.serverStatus) does not return this field, the global default for this setting has either not been set *or* has not yet propagated to the instance.

The last known global default [write concern](https://www.mongodb.com/docs/manual/reference/write-concern.md#std-label-write-concern) setting.

If [`serverStatus`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-dbcommand-dbcmd.serverStatus) does not return this field, the global default write concern has either not been set *or* has not yet propagated to the instance.

The last known global default [w](https://www.mongodb.com/docs/manual/reference/write-concern.md#std-label-wc-w) setting.

If [`serverStatus`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-dbcommand-dbcmd.serverStatus) does not return this field, the global default for this setting has either not been set *or* has not yet propagated to the instance.

The last known global default [wtimeout](https://www.mongodb.com/docs/manual/reference/write-concern.md#std-label-wc-wtimeout) setting.

If [`serverStatus`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-dbcommand-dbcmd.serverStatus) does not return this field, the global default for this setting has either not been set *or* has not yet propagated to the instance.

The source of the default [write concern](https://www.mongodb.com/docs/manual/reference/write-concern.md#std-label-write-concern). By default, the value is `"implicit"`. Once you set the default write concern with [`setDefaultRWConcern`](https://www.mongodb.com/docs/manual/reference/command/setDefaultRWConcern.md#mongodb-dbcommand-dbcmd.setDefaultRWConcern), the value becomes `"global"`.

**New in version 5.0**

The source of the default [read concern](https://www.mongodb.com/docs/manual/reference/read-concern.md#std-label-read-concern). By default, the value is `"implicit"`. Once you set the default read concern with [`setDefaultRWConcern`](https://www.mongodb.com/docs/manual/reference/command/setDefaultRWConcern.md#mongodb-dbcommand-dbcmd.setDefaultRWConcern), the value becomes `"global"`.

**New in version 5.0**

The timestamp when the instance last updated its copy of any global read or write concern settings. If the [`defaultRWConcern.defaultReadConcern`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.defaultRWConcern.defaultReadConcern) and [`defaultRWConcern.defaultWriteConcern`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.defaultRWConcern.defaultWriteConcern) fields are absent, this field indicates the timestamp when the defaults were last unset.

The [wall clock time](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-wall-clock-time) when the instance last updated its copy of any global read or write concern settings. If the [`defaultRWConcern.defaultReadConcern`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.defaultRWConcern.defaultReadConcern) and [`defaultRWConcern.defaultWriteConcern`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.defaultRWConcern.defaultWriteConcern) fields are absent, this field indicates the time when the defaults were last unset.

The local system [wall clock time](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-wall-clock-time) when the instance last updated its copy of any global read or write concern setting. If this field is the *only* field under [`defaultRWConcern`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.defaultRWConcern), the instance has never had knowledge of a global default read or write concern setting.

### electionMetrics

The `electionMetrics` section provides information on elections called by this [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance in a bid to become the primary:

```javascript
electionMetrics : {
   stepUpCmd : {
      called : Long("<num>"),
      successful : Long("<num>")
   },
   priorityTakeover : {
      called : Long("<num>"),
      successful : Long("<num>")
   },
   catchUpTakeover : {
      called : Long("<num>"),
      successful : Long("<num>")
   },
   electionTimeout : {
      called : Long("<num>"),
      successful : Long("<num>")
   },
   freezeTimeout : {
      called : Long("<num>"),
      successful : Long("<num>")
   },
   numStepDownsCausedByHigherTerm : Long("<num>"),
   numCatchUps : Long("<num>"),
   numCatchUpsSucceeded : Long("<num>"),
   numCatchUpsAlreadyCaughtUp : Long("<num>"),
   numCatchUpsSkipped : Long("<num>"),
   numCatchUpsTimedOut : Long("<num>"),
   numCatchUpsFailedWithError : Long("<num>"),
   numCatchUpsFailedWithNewTerm : Long("<num>"),
   numCatchUpsFailedWithReplSetAbortPrimaryCatchUpCmd : Long("<num>"),
   averageCatchUpOps : <double>
}
```

Metrics on elections that were called by the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance as part of an election handoff when the primary stepped down.

The [`stepUpCmd`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.electionMetrics.stepUpCmd) includes both the number of elections called and the number of elections that succeeded.

Metrics on elections that were called by the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance because its [`priority`](https://www.mongodb.com/docs/manual/reference/replica-configuration.md#mongodb-rsconf-rsconf.members-n-.priority) is higher than the primary's.

The [`electionMetrics.priorityTakeover`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.electionMetrics.priorityTakeover) includes both the number of elections called and the number of elections that succeeded.

Metrics on elections called by the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance because it is more current than the primary.

The [`catchUpTakeover`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.electionMetrics.catchUpTakeover) includes both the number of elections called and the number of elections that succeeded.

**See also:**

[`settings.catchUpTakeoverDelayMillis`](https://www.mongodb.com/docs/manual/reference/replica-configuration.md#mongodb-rsconf-rsconf.settings.catchUpTakeoverDelayMillis)

Metrics on elections called by the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance because it has not been able to reach the primary within [`settings.electionTimeoutMillis`.](https://www.mongodb.com/docs/manual/reference/replica-configuration.md#mongodb-rsconf-rsconf.settings.electionTimeoutMillis)

The [`electionTimeout`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.electionMetrics.electionTimeout) includes both the number of elections called and the number of elections that succeeded.

**See also:**

[`settings.electionTimeoutMillis`](https://www.mongodb.com/docs/manual/reference/replica-configuration.md#mongodb-rsconf-rsconf.settings.electionTimeoutMillis)

Metrics on elections called by the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance after its [`freeze period`](https://www.mongodb.com/docs/manual/reference/command/replSetFreeze.md#mongodb-dbcommand-dbcmd.replSetFreeze) (during which the member cannot seek an election) has expired.

The [`electionMetrics.freezeTimeout`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.electionMetrics.freezeTimeout) includes both the number of elections called and the number of elections that succeeded.

Number of times the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance stepped down because it saw a higher term (specifically, other member(s) participated in additional elections).

Number of elections where the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance as the newly-elected primary had to catch up to the highest known oplog entry.

Number of times the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance as the newly-elected primary successfully caught up to the highest known oplog entry.

Number of times the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance as the newly-elected primary concluded its catchup process because it was already caught up when elected.

Number of times the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance as the newly-elected primary skipped the catchup process.

Number of times the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance as the newly-elected primary concluded its catchup process because of the [`settings.catchUpTimeoutMillis`](https://www.mongodb.com/docs/manual/reference/replica-configuration.md#mongodb-rsconf-rsconf.settings.catchUpTimeoutMillis) limit.

Number of times the newly-elected primary's catchup process failed with an error.

Number of times the newly-elected primary's catchup process concluded because another member(s) had a higher term (specifically, other member(s) participated in additional elections).

Number of times the newly-elected primary's catchup process concluded because the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) received the [`replSetAbortPrimaryCatchUp`](https://www.mongodb.com/docs/manual/reference/command/replSetAbortPrimaryCatchUp.md#mongodb-dbcommand-dbcmd.replSetAbortPrimaryCatchUp) command.

Average number of operations applied during the newly-elected primary's catchup processes.

### extra\_info

```javascript
extra_info : {
   note : 'fields vary by platform',
   page_faults : <num>
},
```

A document that provides additional information about the underlying system.

A string with the text `'fields vary by platform'`

The total number of page faults. The [`extra_info.page_faults`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.extra_info.page_faults) counter may increase dramatically during moments of poor performance and may correlate with limited memory environments and larger data sets. Limited and sporadic page faults do not necessarily indicate an issue.

Windows differentiates "hard" page faults involving disk I/O from "soft" page faults that only require moving pages in memory. MongoDB counts both hard and soft page faults in this statistic.

### flowControl

```javascript
flowControl : {
   enabled : <boolean>,
   targetRateLimit : <int>,
   timeAcquiringMicros : Long("<num>"),
   locksPerKiloOp : <double>,
   sustainerRate : <int>,
   isLagged : <boolean>,
   isLaggedCount : <int>,
   isLaggedTimeMicros : Long("<num>")
},
```

A document that returns statistics on the [Flow Control](https://www.mongodb.com/docs/manual/tutorial/troubleshoot-replica-sets.md#std-label-flow-control). With flow control enabled, as the [`majority commit`](https://www.mongodb.com/docs/manual/reference/command/replSetGetStatus.md#mongodb-data-replSetGetStatus.optimes.lastCommittedOpTime) point lag grows close to the [`flowControlTargetLagSeconds`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.flowControlTargetLagSeconds), writes on the primary must obtain tickets before taking locks. As such, the metrics returned are meaningful when run on the primary.

A boolean that indicates whether [Flow Control](https://www.mongodb.com/docs/manual/tutorial/troubleshoot-replica-sets.md#std-label-flow-control) is enabled (`true`) or disabled (`false`).

See also [`enableFlowControl`.](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.enableFlowControl)

When run on the primary, the maximum number of tickets that can be acquired per second.

When run on a secondary, the returned number is a placeholder.

When run on the primary, the total time write operations have waited to acquire a ticket.

When run on a secondary, the returned number is a placeholder.

When run on the primary, an approximation of the number of locks taken per 1000 operations.

When run on a secondary, the returned number is a placeholder.

When run on the primary, an approximation of operations applied per second by the secondary that is sustaining the commit point.

When run on a secondary, the returned number is a placeholder.

When run on the primary, a boolean that indicates whether flow control has engaged. Flow control engages when the majority committed lag is greater than some percentage of the configured [`flowControlTargetLagSeconds`.](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.flowControlTargetLagSeconds)

Replication lag can occur without engaging flow control. An unresponsive [secondary](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-secondary) might lag without the replica set receiving sufficient load to engage flow control, leaving the [`flowControl.isLagged`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.flowControl.isLagged) value at `false`.

For additional information, see [Flow Control.](https://www.mongodb.com/docs/manual/tutorial/troubleshoot-replica-sets.md#std-label-flow-control)

When run on a primary, the number of times flow control has engaged since the last restart. Flow control engages when the majority committed lag is greater than some percentage of the [`flowControlTargetLagSeconds`.](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.flowControlTargetLagSeconds)

When run on a secondary, the returned number is a placeholder.

When run on the primary, the amount of time flow control has spent being engaged since the last restart. Flow control engages when the majority committed lag is greater than some percentage of the [`flowControlTargetLagSeconds`.](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.flowControlTargetLagSeconds)

When run on a secondary, the returned number is a placeholder.

### globalLock

```javascript
globalLock : {
   totalTime : Long("<num>"),
   currentQueue : {
      total : <num>,
      readers : <num>,
      writers : <num>
   },
   activeClients : {
      total : <num>,
      readers : <num>,
      writers : <num>
   }
},
```

A document that reports on the database's lock state.

Generally, the [locks](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#std-label-locks) document provides more detailed data on lock uses.

The time, in microseconds, since the database last started and created the [`globalLock`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.globalLock). This is approximately equivalent to the total server uptime.

A document that provides information concerning the number of operations queued because of a lock.

The total number of operations queued waiting for the lock (that is, the sum of [`globalLock.currentQueue.readers`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.globalLock.currentQueue.readers) and [`globalLock.currentQueue.writers`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.globalLock.currentQueue.writers)).

A consistently small queue, particularly of shorter operations, should cause no concern. The [`globalLock.activeClients`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.globalLock.activeClients) readers and writers information provides context for this data.

The number of operations that are currently queued and waiting for the read lock. A consistently small read queue, particularly of shorter operations, should cause no concern.

The number of operations that are currently queued and waiting for the write lock. A consistently small write queue, particularly of shorter operations, is no cause for concern.

A document that provides information about the number of connected clients and the read and write operations performed by these clients.

Use this data to provide context for the [`globalLock.currentQueue`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.globalLock.currentQueue) data.

The total number of internal client connections to the database including system threads as well as queued readers and writers. This metric is higher than the total of `activeClients.readers` and `activeClients.writers` due to the inclusion of system threads.

The number of the active client connections performing read operations.

The number of active client connections performing write operations.

### ftdcCollectionMetrics

*Available on both mongod and mongos.*

Reports aggregate metrics for FTDC (Full-Time Diagnostic Data Capture) collection runs since the MongoDB process started. Use these metrics to detect whether FTDC collections are falling behind the configured sampling period.

```javascript
ftdcCollectionMetrics : {
   collections : Long("<num>"),
   durationMicros : Long("<num>"),
   delayed : Long("<num>")
},
```

A document that contains FTDC collection run metrics.

**New in version 8.3**

*(also available in 8.2.2)*

The total number of FTDC collection runs since the MongoDB process started.

**New in version 8.3**

*(also available in 8.2.2)*

The cumulative time, in microseconds, spent collecting FTDC samples since the MongoDB process started.

**New in version 8.3**

*(also available in 8.2.2)*

The number of FTDC collection runs that met or exceeded the configured sampling period (see [`diagnosticDataCollectionPeriodMillis`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.diagnosticDataCollectionPeriodMillis)). An increasing `delayed` value may indicate that the server is under heavy load, which can delay FTDC data collection.

**New in version 8.3**

*(also available in 8.2.2)*

### indexBuilds

```javascript
indexBuilds : {
   total : <num>,
   killedDueToInsufficientDiskSpace : <num>,
   failedDueToDataCorruption : <num>
},
```

Provides metrics on [index builds](https://www.mongodb.com/docs/manual/core/index-creation.md#std-label-index-operations) after the server last started.

Total number of index builds.

Total number of index builds that were ended because of insufficient disk space. Starting in MongoDB 7.1, you can set the minimum amount of disk space required for building indexes using the [`indexBuildMinAvailableDiskSpaceMB`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.indexBuildMinAvailableDiskSpaceMB) parameter.

**New in version 7.1**

Total number of index builds that failed because of data corruption.

**New in version 7.1**

### indexBulkBuilder

```json
indexBulkBuilder: {
   count: <long>,
   resumed: <long>,
   filesOpenedForExternalSort: <long>,
   filesClosedForExternalSort: <long>,
   spilledRanges: <long>,
   bytesSpilledUncompressed: <long>,
   bytesSpilled: <long>,
   numSorted: <long>,
   bytesSorted: <long>,
   memUsage: <long>
}
```

Provides metrics for index bulk builder operations.  Use these metrics to diagnose index build issues with [`createIndexes`](https://www.mongodb.com/docs/manual/reference/command/createIndexes.md#mongodb-dbcommand-dbcmd.createIndexes), collection cloning during initial sync, index builds that resume after startup, and statistics on disk usage by the external sorter.

**New in version 6.0.4**

The number of bytes written to disk by the external sorter.

**New in version 6.0.4**

The number of bytes to be written to disk by the external sorter before compression.

The number of instances of the bulk builder created.

The number of times the external sorter closed a file handle to spill data to disk.  Combine this value with [`filesOpenedForExternalSort`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.indexBulkBuilder.filesOpenedForExternalSort) to determine the number of open file handles in use by the external sorter.

The number of times the external sorter opened a file handle to spill data to disk.  Combine this value with [`filesClosedForExternalSort`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.indexBulkBuilder.filesClosedForExternalSort) to determine the number of open file handles in use by the external sorter.

The number of times the bulk builder was created for a resumable index build.

**New in version 6.0.4**

The number of times the external sorter spilled to disk.

**New in version 6.3**

The total number of sorted documents.

**New in version 6.3**

The total number of bytes for sorted documents. For example, if a total of 10 documents were sorted and each document is 20 bytes, the total number of bytes sorted is 200.

**New in version 6.3**

The current bytes of memory allocated for building indexes.

### indexStats

```json
indexStats: {
   count: Long("<num>"),
   features: {
      '2d': { count: Long("<num>"), accesses: Long("<num>") },
      '2dsphere': { count: Long("<num>"), accesses: Long("<num>") },
      '2dsphere_bucket': { count: Long("<num>"), accesses: Long("<num>") },
      collation: { count: Long("<num>"), accesses: Long("<num>") },
      compound: { count: Long("<num>"), accesses: Long("<num>") },
      hashed: { count: Long("<num>"), accesses: Long("<num>") },
      id: { count: Long("<num>"), accesses: Long("<num>") },
      normal: { count: Long("<num>"), accesses: Long("<num>") },
      partial: { count: Long("<num>"), accesses: Long("<num>") },
      prepareUnique: { count: Long("<num>"), accesses: Long("<num>") }, // Added in 8.1 (and 8.0.4, 7.0.14, and 6.0.20)
      single: { count: Long("<num>"), accesses: Long("<num>") },
      sparse: { count: Long("<num>"), accesses: Long("<num>") },
      text: { count: Long("<num>"), accesses: Long("<num>") },
      ttl: { count: Long("<num>"), accesses: Long("<num>") },
      unique: { count: Long("<num>"), accesses: Long("<num>") },
      wildcard: { count: Long("<num>"), accesses: Long("<num>") }
   }
}
```

A document that reports statistics on all indexes on databases and collections in non-system namespaces only. `indexStats` does not report statistics on indexes in the `admin`, `local`, and `config` databases.

**New in version 6.0**

The total number of indexes.

**New in version 6.0**

A document that provides counters for each index type and the number of accesses on each index. Each index type under `indexStats.features` has a `count` field that counts the total number of indexes for that type, and an `accesses` field that counts the number of accesses on that index.

**New in version 6.0**

### Instance Information

```javascript
host : <string>,
advisoryHostFQDNs : <array>,
version : <string>,
process : <'mongod'|'mongos'>,
pid : Long("<num>"),
uptime : <num>,
uptimeMillis : Long("<num>"),
uptimeEstimate : Long("<num>"),
localTime : ISODate("<Date>"),
```

The system's hostname. In Unix/Linux systems, this should be the same as the output of the `hostname` command.

An array of the system's fully qualified domain names (FQDNs).

The MongoDB version of the current MongoDB process.

The current MongoDB process. Possible values are: [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) or [`mongod`.](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod)

The process ID number.

The number of seconds that the current MongoDB process has been active.

The number of milliseconds that the current MongoDB process has been active.

The uptime in seconds as calculated from MongoDB's internal coarse-grained time keeping system.

The ISODate representing the current time, according to the server, in UTC.

### locks

```javascript
locks : {
   <type> : {
         acquireCount : {
            <mode> : Long("<num>"),
            ...
         },
         acquireWaitCount : {
            <mode> : Long("<num>"),
            ...
         },
         timeAcquiringMicros : {
            <mode> : Long("<num>"),
            ...
         },
         deadlockCount : {
            <mode> : Long("<num>"),
            ...
         }
   },
   ...
```

A document that reports for each lock `<type>`, data on lock `<modes>`.

The possible lock `<types>` are:

| Lock Type | Description |
| --- | --- |
| `ParallelBatchWriterMode` | Represents a lock for parallel batch writer mode. In earlier versions, PBWM information was reported as part of the `Global` lock information. |
| `ReplicationStateTransition` | Represents lock taken for [replica set member state](https://www.mongodb.com/docs/manual/reference/replica-states.md) transitions. |
| `Global` | Represents global lock. |
| `Database` | Represents database lock. |
| `Collection` | Represents collection lock. |
| `Mutex` | Represents mutex. |
| `Metadata` | Represents metadata lock. |
| `DDLDatabase` | Represents a [DDL](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-DDL--Data-Definition-Language-) database lock. **New in version 7.1** |
| `DDLCollection` | Represents a [DDL](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-DDL--Data-Definition-Language-) collection lock. **New in version 7.1** |
| `oplog` | Represents lock on the [oplog.](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-oplog) |

The possible `<modes>` are:

| Lock Mode | Description |
| --- | --- |
| `R` | Represents Shared (S) lock. |
| `W` | Represents Exclusive (X) lock. |
| `r` | Represents Intent Shared (IS) lock. |
| `w` | Represents Intent Exclusive (IX) lock. |

All values are of the `Long()` type.

Number of times the lock was acquired in the specified mode.

Number of times the [`locks.<type>.acquireCount`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.locks.-type-.acquireCount) lock acquisitions encountered waits because the locks were held in a conflicting mode.

Cumulative wait time in microseconds for the lock acquisitions.

[`locks.<type>.timeAcquiringMicros`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.locks.-type-.timeAcquiringMicros) divided by [`locks.<type>.acquireWaitCount`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.locks.-type-.acquireWaitCount) gives an approximate average wait time for the particular lock mode.

Number of times the lock acquisitions encountered deadlocks.

### lockContentionMetrics

```javascript
lockContentionMetrics: {
   "<tag>": {
      exclusive: {
         total:       Long("<num>"),
         contentions: Long("<num>"),
         waitCycles:  Long("<num>")
      },
      shared: {
         total:       Long("<num>"),
         contentions: Long("<num>"),
         waitCycles:  Long("<num>")
      },
      // Only present if you specify { lockContentionMetrics: { listAll: 1 } }:
      mutexes: [
         {
            id:         Long("<num>"),
            registered: ISODate("<Date>"),
            exclusive: { total, contentions, waitCycles },
            shared:    { total, contentions, waitCycles }
         },
         ...
      ]
   },
   ...
}
```

A document that shows how often threads use certain internal server locks and how often these locks cause threads to wait. This document focuses on a small set of important, long-lived locks that coordinate core server activities, such as global server state, replication, and connection management. Contention on these locks has a noticeable impact on performance. Use these metrics to identify when coordination points become bottlenecks, such as when contention and wait time increase alongside slower operations or replication lag.

By default, `serverStatus` does not include `lockContentionMetrics` in its output. Use the following syntax to include `lockContentionMetrics` in your output:

```javascript
// Aggregated per‑tag metrics only
db.runCommand({ serverStatus: 1, lockContentionMetrics: 1 })

// Aggregated per‑tag metrics plus per‑instance details
db.runCommand({ serverStatus: 1, lockContentionMetrics: { listAll: 1 } })
```

Aggregated statistics for exclusive or write acquisitions of all mutex instances that use `<tag>`.

Counts how many times this lock runs in write mode, blocking other threads until the write finishes.

Counts how many write‑mode lock requests wait because another operation holds the lock.

Total CPU cycles spent waiting for contended write‑mode lock requests on `<tag>`.

Aggregated statistics for shared or read acquisitions of all mutex instances that use `<tag>`.

Total number of read‑mode lock acquisitions on `<tag>`.

Number of read‑mode lock requests that encounter contention on `<tag>`.

Total CPU cycles spent waiting for contended read‑mode lock requests on `<tag>`.

List of individual lock instances for `<tag>`, each with its own:

- ID

- registration time

- per‑instance read/write contention statistics

The `mutexes` array appears only when you request `lockContentionMetrics` with the `listAll` option.

### logicalSessionRecordCache

```javascript
logicalSessionRecordCache : {
   activeSessionsCount : <num>,
   sessionsCollectionJobCount : <num>,
   lastSessionsCollectionJobDurationMillis : <num>,
   lastSessionsCollectionJobTimestamp : <Date>,
   lastSessionsCollectionJobEntriesRefreshed : <num>,
   lastSessionsCollectionJobEntriesEnded : <num>,
   lastSessionsCollectionJobCursorsClosed : <num>,
   transactionReaperJobCount : <num>,
   lastTransactionReaperJobDurationMillis : <num>,
   lastTransactionReaperJobTimestamp : <Date>,
   lastTransactionReaperJobEntriesCleanedUp : <num>,
   sessionCatalogSize : <num>
},
```

Provides metrics around the caching of [server sessions.](https://www.mongodb.com/docs/manual/reference/server-sessions.md#std-label-server-sessions)

The number of all active local sessions cached in memory by the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) or [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) instance since the last refresh period.

**See also:**

- [`$listLocalSessions`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/listLocalSessions.md#mongodb-pipeline-pipe.-listLocalSessions)

- [`logicalSessionRefreshMillis`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.logicalSessionRefreshMillis)

The number of times the refresh process has run on the [`config.system.sessions`](https://www.mongodb.com/docs/manual/reference/config-database.md#mongodb-data-config.system.sessions) collection.

**See also:**

[`logicalSessionRefreshMillis`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.logicalSessionRefreshMillis)

The length in milliseconds of the last refresh.

The time at which the last refresh occurred.

The number of sessions that were refreshed during the last refresh.

The number of sessions that ended during the last refresh.

The number of cursors that were closed during the last [`config.system.sessions`](https://www.mongodb.com/docs/manual/reference/config-database.md#mongodb-data-config.system.sessions) collection refresh.

The number that tracks the number of times the transaction record cleanup process has run on the [`config.transactions`](https://www.mongodb.com/docs/manual/reference/config-database.md#mongodb-data-config.transactions) collection.

The length (in milliseconds) of the last transaction record cleanup.

The time of the last transaction record cleanup.

The number of entries in the [`config.transactions`](https://www.mongodb.com/docs/manual/reference/config-database.md#mongodb-data-config.transactions) collection that were deleted during the last transaction record cleanup.

- For a [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance,

  The size of its in-memory cache of the `config.transactions` entries. This corresponds to retryable writes or transactions whose sessions have not expired within the [`localLogicalSessionTimeoutMinutes`.](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.localLogicalSessionTimeoutMinutes)

- For a [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) instance,

  The number of the in-memory cache of its sessions that have had transactions within the most recent [`localLogicalSessionTimeoutMinutes`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.localLogicalSessionTimeoutMinutes) interval.

### mem

```javascript
mem : {
   bits : <int>,
   resident : <int>,
   virtual : <int>,
   supported : <boolean>
},
```

A document that reports on the system architecture of the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) and current memory use.

A number, either `64` or `32`, that indicates whether the MongoDB instance is compiled for 64-bit or 32-bit architecture.

The value of [`mem.resident`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.mem.resident) is roughly equivalent to the amount of RAM, in mebibyte (MiB), currently used by the database process. During normal use, this value tends to grow. In dedicated database servers, this number tends to approach the total amount of system memory.

[`mem.virtual`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.mem.virtual) displays the quantity, in mebibyte (MiB), of virtual memory used by the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) process.

A boolean that indicates whether the underlying system supports extended memory information. If this value is false and the system does not support extended memory information, then other [`mem`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.mem) values may not be accessible to the database server.

The field [`mem.note`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.mem.note) appears if [`mem.supported`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.mem.supported) is false.

The [`mem.note`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.mem.note) field contains the text: `'not all mem
    info support on this platform'`.

### metrics

```javascript
metrics : {
   abortExpiredTransactions: {
      passes: <integer>,
      successfulKills: <integer>,
      timedOutKills: <integer>
   },
   apiVersions: {
      <appName1>: <string>,
      <appName2>: <string>,
      <appName3>: <string>
   },
   aggStageCounters : {
      <aggregation stage> : Long("<num>")
   },
   changeStreams: {
      largeEventsFailed: Long("<num>"),
      largeEventsSplit: Long("<num>"),
      showExpandedEvents: Long("<num>")
   },
   commands: {
      <command>: {
         failed: Long("<num>"),
         validator: {
           total: Long("<num>"),
           failed: Long("<num>"),
           jsonSchema: Long("<num>")
         },
         total: Long("<num>"),
         rejected: Long("<num>")
      }
   },
   cursor : {
      moreThanOneBatch : Long("<num>"),
      timedOut : Long("<num>"),
      totalOpened : Long("<num>"),
      lifespan : {
         greaterThanOrEqual10Minutes : Long("<num>"),
         lessThan10Minutes : Long("<num>"),
         lessThan15Seconds : Long("<num>"),
         lessThan1Minute : Long("<num>"),
         lessThan1Second : Long("<num>"),
         lessThan30Seconds : Long("<num>"),
         lessThan5Seconds : Long("<num>")
      },
      open : {
         noTimeout : Long("<num>"),
         pinned : Long("<num>"),
         multiTarget : Long("<num>"),
         singleTarget : Long("<num>"),
         total : Long("<num>")
      }
   },
   document : {
      deleted : Long("<num>"),
      inserted : Long("<num>"),
      returned : Long("<num>"),
      updated : Long("<num>")
   },
   dotsAndDollarsFields : {
         inserts : Long("<num>"),
         updates : Long("<num>")
   },
   extension: {
      totalAggStageExecMicros: NumberLong(0),
      apiCallSuccesses: NumberLong(0),
      apiCallFailures: NumberLong(0),
      vectorSearch: {
         legacyVectorSearchUsed: NumberLong(0),
         extensionVectorSearchUsed: NumberLong(0),
         onViewKickbackRetries: NumberLong(0),
         inSubpipelineKickbackRetries: NumberLong(0),
      }
   }
   getLastError : {
      wtime : {
         num : <num>,
         totalMillis : <num>
      },
      wtimeouts : Long("<num>"),
      default : {
         unsatisfiable : Long("<num>"),
         wtimeouts : Long("<num>")
      }
   },
   mongos : {
      cursor : {
         moreThanOneBatch : Long("<num>"),
         totalOpened : Long("<num>")
      }
   },
   network : {  // Added in MongoDB 6.3
      totalEgressConnectionEstablishmentTimeMillis : Long("<num>"),
      totalIngressTLSConnections : Long("<num>"),
      totalIngressTLSHandshakeTimeMillis : Long("<num>"),
      totalTimeForEgressConnectionAcquiredToWireMicros : Long("<num>"),
      totalTimeToFirstNonAuthCommandMillis : Long("<num>")
      "averageTimeToCompletedTLSHandshakeMicros": Long("<num>"), // Added in MongoDB 8.2
      "averageTimeToCompletedHelloMicros": Long("<num>"), // Added in MongoDB 8.2
      "averageTimeToCompletedAuthMicros": Long("<num>") // Added in MongoDB 8.2
   },
   operation : {
      killedDueToClientDisconnect : Long("<num>"),  // Added in MongoDB 7.1
      killedDueToDefaultMaxTimeMSExpired : Long("<num>"),
      killedDueToMaxTimeMSExpired : Long("<num>"),  // Added in MongoDB 7.2
      killedDueToRangeDeletion: Long("<num>"), // Added in MongoDB 8.2
      numConnectionNetworkTimeouts : Long("<num>"),  // Added in MongoDB 6.3
      scanAndOrder : Long("<num>"),
      totalTimeWaitingBeforeConnectionTimeoutMillis : Long("<num>"),  // Added in MongoDB 6.3
      unsendableCompletedResponses : Long("<num>"),  // Added in MongoDB 7.1
      writeConflicts : Long("<num>")
   },
   operatorCounters : {
      expressions : {
         <command> : Long("<num>")
      },
      match : {
         <command> : Long("<num>")
      }
   },
   query: {
      allowDiskUseFalse: Long("<num>"),
      cbr: {
         choseWinningPlan: Long("<num>"),
         count: Long("<num>"),
         histograms: {
            micros: [
               {
                  lowerBound: Long("<num>"),
                  count: Long("<num>"),
               }
            ]
            numPlans: [
               {
                  lowerBound: Long("<num>"),
                  count: Long("<num>"),
               }
            ]
            samplingMicros: [
               {
                  lowerBound: Long("<num>"),
                  count: Long("<num>"),
               }
            ]
         },
         micros: Long("<num>"),
         numPlans: Long("<num>"),
         numPlansFailedCostEstimation: Long("<num>"),
         numPlansTiedCostEstimation: Long("<num>"),
         samplingMicros: Long("<num>"),
      },
      updateOneOpStyleBroadcastWithExactIDCount: Long("<num>"),
      bucketAuto: {
         spilledBytes: Long("<num>"),
         spilledDataStorageSize: Long("<num>"),
         spilledRecords: Long("<num>"),
         spills: Long("<num>")
      },
      lookup: {
         hashLookup: Long("<num>"),
         hashLookupSpillToDisk: Long("<num>"),
         indexedLoopJoin: Long("<num>"),
         nestedLoopJoin: Long("<num>")
      },
      multiPlanner: {
         classicCount: Long("<num>"),
         classicMicros: Long("<num>"),
         classicWorks: Long("<num>"),
         sbeCount: Long("<num>"),
         sbeMicros: Long("<num>"),
         sbeNumReads: Long("<num>"),
         histograms: {
            classicMicros: [
               { lowerBound: Long("0"), count: Long("<num>") },
               { < Additional histogram groups not shown. > },
               { lowerBound: Long("1073741824"), count: Long("<num>")> }>
            ],
            classicNumPlans: [
               { lowerBound: Long("0"), count: Long("<num>") },
               { < Additional histogram groups not shown. > },
               { lowerBound: Long("32"), count: Long("<num>") }
            ],
            classicWorks: [
               { lowerBound: Long("0"), count: Long("<num>") },
               { < Additional histogram groups not shown. > },
               { lowerBound: Long("32768"), count: Long("<num>") }
            ],
            sbeMicros: [
               { lowerBound: Long("0"), count: Long("<num>") },
               { < Additional histogram groups not shown. > },
               { lowerBound: Long("1073741824"), count: Long("<num>") }
            ],
            sbeNumPlans: [
               { lowerBound: Long("0"), count: Long("<num>") },
               { < Additional histogram groups not shown. > },
               { lowerBound: Long("32"), count: Long("<num>") }
            ],
            sbeNumReads: [
               { lowerBound: Long("0"), count: Long("<num>") },
               { < Additional histogram groups not shown. > },
               { lowerBound: Long("32768"), count: Long("<num>") }
            ]
         }
      },
      planCache: {
         classic: { hits: Long("<num>"), misses: Long("<num>"), replanned: Long("<num>") },
         sbe: { hits: Long("<num>"), misses: Long("<num>"), replanned: Long("<num>") }
      },
      queryFramework: {
         aggregate: {
            classicHybrid: Long("<num>"),
            classicOnly: Long("<num>"),
            cqf: Long("<num>"),
            sbeHybrid: Long("<num>"),
            sbeOnly: Long("<num>")
         },
         find: { classic: Long("<num>"), cqf: Long("<num>"), sbe: Long("<num>") }
      }
   },
   queryExecutor: {
      scanned : Long("<num>"),
      scannedObjects : Long("<num>"),
      collectionScans : {
         nonTailable : Long("<num>"),
         total : Long("<num>")
      },
      profiler : {
         collectionScans : {
            nonTailable : Long("<num>"),
            tailable : Long("<num>"),
            total : Long("<num>")
         }
      }
   },
   record : {
      moves : Long("<num>")
   },
   repl : {
      executor : {
         pool : {
            inProgressCount : <num>
         },
         queues : {
            networkInProgress : <num>,
            sleepers : <num>
         },
         unsignaledEvents : <num>,
         shuttingDown : <boolean>,
         networkInterface : <string>
      },
      apply : {
         attemptsToBecomeSecondary : Long("<num>"),
         batchSize: <num>,
         batches : {
            num : <num>,
            totalMillis : <num>
         },
         ops : Long("<num>")
      },
      write : {
         batchSize: <num>,
         batches : {
            num : <num>,
            totalMillis : <num>
         }
      },
      buffer : {
         write: {
            count : Long("<num>"),
            maxSizeBytes : Long("<num>"),
            sizeBytes : Long("<num>")
         },
         apply: {
            count : Long("<num>"),
            sizeBytes : Long("<num>"),
            maxSizeBytes : Long("<num>"),
            maxCount: Long("<num>")
         },
      },
      initialSync : {
         completed : Long("<num>"),
         failedAttempts : Long("<num>"),
         failures : Long("<num>")
      },
      network : {
         bytes : Long("<num>"),
         getmores : {
            num : <num>,
            totalMillis : <num>
         },
         notPrimaryLegacyUnacknowledgedWrites : Long("<num>"),
         notPrimaryUnacknowledgedWrites : Long("<num>"),
         oplogGetMoresProcessed : {
            num : <num>,
            totalMillis : <num>
         },
         ops : Long("<num>"),
         readersCreated : Long("<num>"),
         replSetUpdatePosition : {
            num : Long("<num>")
         }
      },
      reconfig : {
         numAutoReconfigsForRemovalOfNewlyAddedFields : Long("<num>")
      },
      stateTransition : {
         lastStateTransition : <string>,
         totalOperationsKilled : Long("<num>"),
         totalOperationsRunning : Long("<num>")
      },
      syncSource : {
         numSelections : Long("<num>"),
         numTimesChoseSame : Long("<num>"),
         numTimesChoseDifferent : Long("<num>"),
         numTimesCouldNotFind : Long("<num>")
      },
      waiters : {
         opTime : Long("<num>"),
         replication : Long("<num>"),
         replCoordMutexTotalWaitTimeInOplogServerStatusMillis: Long("<num>")
      }
   },
   storage : {
      freelist : {
         search : {
            bucketExhausted : <num>,
            requests : <num>,
            scanned : <num>
         }
      }
   },
   ttl : {
      deletedDocuments : Long("<num>"),
      passes : Long("<num>"),
      subPasses : Long("<num>")
   }
}
```

A document that returns various statistics that reflect the current use and state of a running [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance.

Document that returns statistics on the current state of the `abortExpiredTransactions` thread.

Indicates the number of successful passes aborting transactions older than the [`transactionLifetimeLimitSeconds`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.transactionLifetimeLimitSeconds) parameter.

If the `passes` value stops incrementing, it indicates that the `abortExpiredTransactions` thread may be stuck.

Number of expired transactions successfully ended by MongoDB.

A session is checked out from a session pool to run database operations.

[`AbortExpiredTransactionsSessionCheckoutTimeout`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.AbortExpiredTransactionsSessionCheckoutTimeout) sets the maximum number of milliseconds for a session to be checked out when attempting to end an expired transaction.

If the expired transaction is successfully ended, MongoDB increments [`metrics.abortExpiredTransactions.successfulKills`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.abortExpiredTransactions.successfulKills). If the transaction isn't successfully ended because it timed out when attempting to check out a session, MongoDB increments [`metrics.abortExpiredTransactions.timedOutKills`.](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.abortExpiredTransactions.timedOutKills)

**New in version 8.1**

*(also available in 8.0.13)*

Number of expired transactions unsuccessfully ended by MongoDB because it timed out when attempting to check out a session.

A session is checked out from a session pool to run database operations.

[`AbortExpiredTransactionsSessionCheckoutTimeout`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.AbortExpiredTransactionsSessionCheckoutTimeout) sets the maximum number of milliseconds for a session to be checked out when attempting to end an expired transaction.

If the expired transaction is successfully ended, MongoDB increments [`metrics.abortExpiredTransactions.successfulKills`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.abortExpiredTransactions.successfulKills). If the transaction isn't successfully ended because it timed out when attempting to check out a session, MongoDB increments [`metrics.abortExpiredTransactions.timedOutKills`.](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.abortExpiredTransactions.timedOutKills)

**New in version 8.1**

*(also available in 8.0.13)*

A document that reports on the use of [aggregation pipeline stages](https://www.mongodb.com/docs/manual/reference/mql/aggregation-stages.md#std-label-aggregation-pipeline-operator-reference). The fields in [`metrics.aggStageCounters`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.aggStageCounters) are the names of aggregation pipeline stages. For each pipeline stage, [`serverStatus`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-dbcommand-dbcmd.serverStatus) reports the number of times that stage has been executed.

*Updated in version 5.2 (and 5.0.6).*

A document that contains:

- The name of each client application

- The Stable API version that each application was configured with within the last 24-hour period

Consider the following when viewing `metrics.apiVersions`:

- The possible returned values for each `appname` are:

  - `default`: The command was issued without a Stable API version specified.

  - `1`: The command was issued with Stable API version 1.

  **Note:**

  You may see both return values for an `appname` because you can specify a Stable API version at the command level. Some of your commands may have been issued with no Stable API version, while others were issued with version 1.

- API version metrics are retained for 24 hours. If no commands are issued with a specific API version from an application in the past 24 hours, that `appname` and API version are removed from the metrics. This also applies to the `default` API version metric.

- Set the `appname` when connecting to a MongoDB instance by specifying the `appname` in the connection URI. `?appName=ZZZ` sets the `appname` to `ZZZZ`.

- Drivers accessing the Stable API can set a default `appname`.

- If no `appname` is configured, a default value is automatically populated based on the product. For example, for a [MongoDB Compass](https://www.mongodb.com/docs/compass/current/) connection with no `appname` in the URI, the metric returns: `'MongoDB Compass': [ 'default' ]`.

*New in version 5.0.*

A document that reports on the use of [aggregation pipeline](https://www.mongodb.com/docs/manual/core/aggregation-pipeline.md#std-label-aggregation-pipeline) operators and expressions.

A document with a number that indicates how often [Expressions](https://www.mongodb.com/docs/manual/reference/mql/expressions.md#std-label-aggregation-expression-operators) ran.

To get metrics for a specific operator, such as the greater-than operator ([`$gt`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/gt.md#mongodb-expression-exp.-gt)), append the operator to the command:

```javascript
db.runCommand( { serverStatus: 1 } ).metrics.operatorCounters.expressions.$gt
```

**New in version 5.0**

A document with a number that indicates how often [match expressions](https://www.mongodb.com/docs/manual/reference/mql/query-predicates.md#std-label-query-projection-operators-top) ran.

[Match expression operators](https://www.mongodb.com/docs/manual/reference/mql/query-predicates.md#std-label-query-projection-operators-top) also increment as part of an aggregation pipeline [`$match`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/match.md#mongodb-pipeline-pipe.-match) stage. If the `$match` stage uses the [`$expr`](https://www.mongodb.com/docs/manual/reference/operator/query/expr.md#mongodb-query-op.-expr) operator, the counter for `$expr` increments, but the component counters do not increment.

Consider the following query:

```javascript
db.matchCount.aggregate(
   [
      { $match:
         {  $expr: { $gt: [ "$_id", 0 ] } }
      }
   ]
)
```

The counter for `$expr` increments when the query runs. The counter for `$gt` does not.

The number of change stream events larger than 16 MB that were split into smaller fragments. Events are only split if you use the [`$changeStreamSplitLargeEvent`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/changeStreamSplitLargeEvent.md#mongodb-pipeline-pipe.-changeStreamSplitLargeEvent) pipeline stage.

**New in version 7.0**

(*Also available in 6.0.9*)

A document that reports information about [change stream](https://www.mongodb.com/docs/manual/changeStreams.md#std-label-changeStreams) events larger than 16 MB.

**New in version 7.0**

The number of change stream events that caused a `BSONObjectTooLarge` exception because the event was larger than 16 MB. To prevent the exception, see [`$changeStreamSplitLargeEvent`.](https://www.mongodb.com/docs/manual/reference/operator/aggregation/changeStreamSplitLargeEvent.md#mongodb-pipeline-pipe.-changeStreamSplitLargeEvent)

**New in version 7.0**

(*Also available in 6.0.9 and 5.0.19*)

The number of change stream cursors with the [showExpandedEvents](https://www.mongodb.com/docs/manual/reference/change-events.md#std-label-change-streams-expanded-events) option set to `true`.

The counter for `showExpandedEvents` increments when you:

- Open a change stream cursor.

- Run the [`explain`](https://www.mongodb.com/docs/manual/reference/command/explain.md#mongodb-dbcommand-dbcmd.explain) command on a change stream cursor.

**New in version 7.1**

A document that reports on the use of database commands. The fields in [`metrics.commands`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.commands) are the names of [database commands](https://www.mongodb.com/docs/manual/reference/command.md#std-label-database-commands). For each command, the [`serverStatus`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-dbcommand-dbcmd.serverStatus) reports the total number of executions and the number of failed executions.

[`metrics.commands`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.commands) includes `replSetStepDownWithForce` (that is, the [`replSetStepDown`](https://www.mongodb.com/docs/manual/reference/command/replSetStepDown.md#mongodb-dbcommand-dbcmd.replSetStepDown) command with `force: true`) as well as the overall `replSetStepDown`. In earlier versions, the command reported only overall `replSetStepDown` metrics.

The number of times `<command>` failed on this [`mongod`.](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod)

For the [`create`](https://www.mongodb.com/docs/manual/reference/command/create.md#mongodb-dbcommand-dbcmd.create) and [`collMod`](https://www.mongodb.com/docs/manual/reference/command/collMod.md#mongodb-dbcommand-dbcmd.collMod) commands, a document that reports on non-empty `validator` objects passed to the command to specify [validation rules or expressions](https://www.mongodb.com/docs/manual/core/schema-validation.md#std-label-schema-validation-overview) for the collection.

The number of times a non-empty `validator` object was passed as an option to the command on this [`mongod`.](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod)

The number of times a call to the command on this [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) failed with a non-empty `validator` object due to a schema validation error.

The number of times a `validator` object with a `$jsonSchema` was passed as an option to the command on this [`mongod`.](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod)

The number of times `<command>` executed on this [`mongod`.](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod)

The number of times `<command>` was rejected on this [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) because the command or operation has an associated query setting where the `reject` field is `true`.

To set the `reject` field, use `setQuerySettings`.

**New in version 8.0**

The number of times an [aggregation pipeline](https://www.mongodb.com/docs/manual/reference/mql/aggregation-stages.md#std-label-aggregation-pipeline-operator-reference) was used to update documents on this [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod). Subtract this value from the total number of updates to get the number of updates made with [document](https://www.mongodb.com/docs/manual/reference/mql/update.md#std-label-update-operators-top-level) syntax.

The `pipeline` counter is only available for `update` and `findAndModify` operations.

The number of times [`findAndModify()`](https://www.mongodb.com/docs/manual/reference/method/db.collection.findAndModify.md#mongodb-method-db.collection.findAndModify) was used in an [aggregation pipeline](https://www.mongodb.com/docs/manual/reference/mql/aggregation-stages.md#std-label-aggregation-pipeline-operator-reference) to update documents on this [`mongod`.](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod)

The `pipeline` counter is only available for `update` and `findAndModify` operations.

The number of times an [arrayFilter](https://www.mongodb.com/docs/manual/reference/method/db.collection.findAndModify.md#std-label-findAndModify-arrayFilters) was used to update documents on this [`mongod`.](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod)

The `arrayFilters` counter is only available for `update` and `findAndModify` operations.

The number of times an [arrayFilter](https://www.mongodb.com/docs/manual/reference/method/db.collection.findAndModify.md#std-label-findAndModify-arrayFilters) was used with [`findAndModify()`](https://www.mongodb.com/docs/manual/reference/method/db.collection.findAndModify.md#mongodb-method-db.collection.findAndModify) to update documents on this [`mongod`.](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod)

The `arrayFilters` counter is only available for `update` and `findAndModify` operations.

A document that reflects document access and modification patterns. Compare these values to the data in the [`opcounters`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.opcounters) document, which track total number of operations.

The total number of documents deleted.

The total number of documents inserted.

The total number of documents returned by queries.

The total number of documents matched for update operations. This value is not necessarily the same as the number of documents modified by updates.

A document with a number that indicates how often [insert](https://www.mongodb.com/docs/manual/tutorial/insert-documents.md#std-label-write-op-insert) or [update](https://www.mongodb.com/docs/manual/tutorial/update-documents.md#std-label-write-op-update) operations ran using a dollar (`$`) prefixed name. The value does not report the exact number of operations.

When an [upsert](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-upsert) operation creates a new document, it is considered to be an `insert` rather than an `update`.

**New in version 5.0**

A document that reports on various statistics for the replication executor.

**New in version 8.3**

A document that reports information on the MongoDB Extension API for aggregation stages.

The amount of time spent within any extension's query execution callback in microseconds.

The number of successful calls to the MongoDB Extension API.

The number of failed calls to the MongoDB Extension API.

A document that contains information on vector search usage.

The number of legacy (non-extension) vector search operations.

The number of vector search operations that use the MongoDB Extension API.

The number of times MongoDB executes operations with legacy vector search due to a view.

The number of times MongoDB executes operations with legacy vector search due to a nested pipeline.

A document that reports on [write concern](https://www.mongodb.com/docs/manual/reference/write-concern.md#std-label-write-concern) use.

A document that reports [write concern](https://www.mongodb.com/docs/manual/reference/write-concern.md#std-label-write-concern) operation counts with a `w` argument greater than `1`.

The total number of operations with a specified write concern (that is, `w`) that wait for one or more members of a replica set to acknowledge the write operation (that is, a `w` value greater than `1`.)

The total amount of time in milliseconds that the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) has spent performing [write concern](https://www.mongodb.com/docs/manual/reference/write-concern.md#std-label-write-concern) operations with a write concern (that is, `w`) that waits for one or more members of a replica set to acknowledge the write operation (that is, a `w` value greater than `1`.)

The number of times that [write concern](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-write-concern) operations have timed out as a result of the `wtimeout` threshold. This number increments for both default and non-default write concern specifications.

A document that reports on when a default [write concern](https://www.mongodb.com/docs/manual/reference/write-concern.md#std-label-write-concern) was used (meaning, a non-`clientSupplied` write concern). The possible origins of a default write concern are:

- `implicitDefault`

- `customDefault`

- `getLastErrorDefaults`

Refer to the following table for information on each possible write concern origin, or `provenance`:

| Provenance | Description |
| --- | --- |
| `clientSupplied` | The write concern was specified in the application. |
| `customDefault` | The write concern originated from a custom defined default value. See [`setDefaultRWConcern`.](https://www.mongodb.com/docs/manual/reference/command/setDefaultRWConcern.md#mongodb-dbcommand-dbcmd.setDefaultRWConcern) |
| `getLastErrorDefaults` | The write concern originated from the replica set's [`settings.getLastErrorDefaults`](https://www.mongodb.com/docs/manual/reference/replica-configuration.md#mongodb-rsconf-rsconf.settings.getLastErrorDefaults) field. |
| `implicitDefault` | The write concern originated from the server in absence of all other write concern specifications. |

Number of times that a non-`clientSupplied` write concern returned the `UnsatisfiableWriteConcern` error code.

Number of times a non-`clientSupplied` write concern timed out.

A document that contains metrics about [`mongos`.](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos)

A document that contains metrics for cursors used by [`mongos`.](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos)

The total number of cursors that have returned more than one batch since [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) started. Additional batches are retrieved using the [`getMore`](https://www.mongodb.com/docs/manual/reference/command/getMore.md#mongodb-dbcommand-dbcmd.getMore) command.

**New in version 5.0**

The total number of cursors that have been opened since [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) started, including cursors currently open. Differs from [`metrics.cursor.open.total`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.cursor.open.total), which is the number of currently open cursors only.

**New in version 5.0**

**New in version 6.3**

A document that reports server network metrics.

**New in version 6.3**

The total time in milliseconds to establish server connections.

**New in version 6.3**

The total number of incoming connections to the server that use TLS. The number is cumulative and is the total after the server was started.

**New in version 6.3**

The total time in milliseconds that incoming connections to the server have to wait for the TLS network handshake to complete. The number is cumulative and is the total after the server was started.

**New in version 6.3**

The total time in microseconds that operations wait between acquisition of a server connection and writing the bytes to send to the server over the network. The number is cumulative and is the total after the server was started.

**New in version 6.3**

The total time in milliseconds from accepting incoming connections to the server and receiving the first operation that isn't part of the connection authentication handshake. The number is cumulative and is the total after the server was started.

**New in version 8.2**

*(also available in 8.1.1)*

The average time in microseconds that it takes to complete a TLS handshake for incoming connections.

**New in version 8.2**

*(also available in 8.1.1)*

The time in microseconds between the beginning of connection establishment and the completion of the `hello` command. You can use this metric to tune the [`ingressConnectionEstablishmentMaxQueueDepth`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.ingressConnectionEstablishmentMaxQueueDepth) and [`ingressConnectionEstablishmentRatePerSec`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.ingressConnectionEstablishmentRatePerSec) to ensure that there is proper time allotted to complete the connection establishment after exiting the queue.

**New in version 8.2**

*(also available in 8.1.1)*

The time in microseconds the SASL auth exchange takes to be completed after the beginning of connection establishment.

A document that holds counters for several types of update and query operations that MongoDB handles using special operation types.

A document that holds counters for server interrupt checks.

**New in version 8.3**

Also available in 8.2.2 and 8.0.20.

Total number of interrupt checks performed since the server started.

**New in version 8.3**

Also available in 8.2.2 and 8.0.20.

**New in version 7.1**

Total number of operations cancelled before completion because the client disconnected.

**New in version 8.0**

Total number of operations that timed out due to the cluster-level default timeout, [`defaultMaxTimeMS`.](https://www.mongodb.com/docs/manual/reference/cluster-parameters/defaultMaxTimeMS.md#mongodb-parameter-param.defaultMaxTimeMS)

**New in version 7.2**

Total number of operations that timed out due to the operation-level timeout, [`cursor.maxTimeMS()`.](https://www.mongodb.com/docs/manual/reference/method/cursor.maxTimeMS.md#mongodb-method-cursor.maxTimeMS)

**New in version 8.2**

Total number of operations terminated because of orphan range cleanup. To learn more, see [`terminateSecondaryReadsOnOrphanCleanup`.](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.terminateSecondaryReadsOnOrphanCleanup)

**New in version 6.3**

Total number of operations that failed because of server connection acquisition time out errors.

The total number of queries that return sorted numbers that cannot perform the sort operation using an index.

**New in version 6.3**

Total time in milliseconds that operations waited before failing because of server connection acquisition time out errors.

**New in version 7.1**

Total number of operations that completed server-side but did not send their response to the client because the connection between the client and server failed or disconnected.

The total number of queries that encountered write conflicts.

The number of in-memory bytes spilled to disk by the [`$bucketAuto`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/bucketAuto.md#mongodb-pipeline-pipe.-bucketAuto) stage.

**New in version 8.2**

The total disk space, in bytes, used by the spilled data from the [`$bucketAuto`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/bucketAuto.md#mongodb-pipeline-pipe.-bucketAuto) stage.

**New in version 8.2**

The number of records spilled to disk by the [`$bucketAuto`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/bucketAuto.md#mongodb-pipeline-pipe.-bucketAuto) stage.

**New in version 8.2**

The number of times the [`$bucketAuto`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/bucketAuto.md#mongodb-pipeline-pipe.-bucketAuto) stage spilled to disk.

**New in version 8.2**

A document that holds metrics on the cost-based ranking (CBR) of query plans.

**New in version 8.3.3**

Number of times the cost-based ranker chose a winning plan.

**New in version 8.3.3**

Number of times the server used the cost-based ranker.

**New in version 8.3.3**

A document that holds cost-based ranker histograms.

**New in version 8.3.3**

A histogram measuring the amount of time in microseconds spent on cost-based ranking query plans, which includes both sampling and ranking time.

**New in version 8.3.3**

A histogram measuring the number of plans in the candidate set used by the cost-based ranker.

**New in version 8.3.3**

A histogram measuring the amount of time in microseconds the server spent on sampling during cost-based ranking of query plans.

**New in version 8.3.3**

Amount of time in microseconds spent on cost-based ranking query plans, which includes both sampling and ranking time.

**New in version 8.3.3**

Number of candidate plans compared by the cost-based ranker.

**New in version 8.3.3**

Number of candidate plans for which the cost-based ranker could not estimate a cost.

**New in version 8.3.3**

Number of candidate plans that tied in cost-based ranking.

**New in version 8.3.3**

Amount of time in microseconds the server spent on sampling during cost-based ranking of query plans.

**New in version 8.3.3**

A document that provides detailed data on the use of the  [`$lookup`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/lookup.md#mongodb-pipeline-pipe.-lookup) stage with the slot-based query execution engine. To learn more, see [`$lookup` Optimization.](https://www.mongodb.com/docs/manual/core/aggregation-pipeline-optimization.md#std-label-agg-lookup-optimization-sbe)

These metrics are primarily intended for internal use by MongoDB.

*New in version 6.1*

Provides detailed query planning data for the slot-based query execution engine and the classic query engine. For more information on the slot-based query execution engine see: [Slot-Based Query Execution Engine Pipeline Optimizations.](https://www.mongodb.com/docs/manual/core/aggregation-pipeline-optimization.md#std-label-sbe-pipeline-optimizations)

These metrics are primarily intended for internal use by MongoDB.

*New in version 6.0.0 and 5.0.9*

A document that holds counters related to sort stages.

**New in version 6.2**

The total number of writes to disk caused by sort stages.

**New in version 6.2**

The total amount of sorted data in bytes.

**New in version 6.2**

The total number of keys used in sorts.

**New in version 6.2**

Aggregates the total number of microseconds spent in the classic multiplanner.

Aggregates the total number of "works" performed in the classic multiplanner.

Aggregates the total number of invocations of the classic multiplanner.

Aggregates the total number of microseconds spent in the slot-based execution engine multiplanner.

Aggregates the total number of reads done in the slot-based execution engine multiplanner.

Aggregates the total number of invocations of the slot-based execution engine multiplanner.

A histogram measuring the number of microseconds spent in an invocation of the classic multiplanner.

A histogram measuring the number of "works" performed during an invocation of the classic multiplanner.

A histogram measuring the number of plans in the candidate set during an invocation of the classic multiplanner.

A histogram measuring the number of microseconds spent in an invocation of the slot-based execution engine multiplanner.

A histogram measuring the number of reads during an invocation of the slot-based execution engine multiplanner.

A histogram measuring the number of plans in the candidate set during an invocation of the slot-based execution engine multiplanner.

The number of queries that use an optimized index scan plan consisting of one of the following plan stages:

- `EXPRESS_CLUSTERED_IXSCAN`

- `EXPRESS_DELETE`

- `EXPRESS_IXSCAN`

- `EXPRESS_UPDATE`

For more information on query plans, see [Explain Results.](https://www.mongodb.com/docs/manual/reference/explain-results.md#std-label-explain-results)

**New in version 8.1**

The number of queries that contain the `_id` field. For these queries, MongoDB uses the default index on the `_id` field and skips all query plan analysis.

**New in version 8.1**

A document that reports on the number of aggregation operations run on each [query framework](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-query-framework). The subfields in `query.queryFramework.aggregate` indicate the number of times each framework was used to perform an aggregation operation.

A document that reports on the number of find operations run on each [query framework](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-query-framework). The subfields in `query.queryFramework.find` indicate the number of times each framework was used to perform a find operation.

A document that reports data from the query execution system.

The total number of index items scanned during queries and query-plan evaluation. This counter is the same as [`totalKeysExamined`](https://www.mongodb.com/docs/manual/reference/explain-results.md#mongodb-data-explain.executionStats.totalKeysExamined) in the output of [`explain()`.](https://www.mongodb.com/docs/manual/reference/method/cursor.explain.md#mongodb-method-cursor.explain)

The total number of documents scanned during queries and query-plan evaluation. This counter is the same as [`totalDocsExamined`](https://www.mongodb.com/docs/manual/reference/explain-results.md#mongodb-data-explain.executionStats.totalDocsExamined) in the output of [`explain()`.](https://www.mongodb.com/docs/manual/reference/method/cursor.explain.md#mongodb-method-cursor.explain)

A document that reports on the number of queries that performed a collection scan.

The number of queries that performed a collection scan that did not use a [tailable cursor.](https://www.mongodb.com/docs/manual/core/tailable-cursors.md#std-label-tailable-cursors-landing-page)

The total number queries that performed a collection scan. The total consists of queries that did and did not use a [tailable cursor.](https://www.mongodb.com/docs/manual/core/tailable-cursors.md#std-label-tailable-cursors-landing-page)

The number of queries that performed a collection scan on a [`profile`](https://www.mongodb.com/docs/manual/reference/system-collections.md#mongodb-data--database-.system.profile) collection that did not use a [tailable cursor.](https://www.mongodb.com/docs/manual/core/tailable-cursors.md#std-label-tailable-cursors-landing-page)

The number of queries that performed a collection scan on a [`profile`](https://www.mongodb.com/docs/manual/reference/system-collections.md#mongodb-data--database-.system.profile) collection that used a [tailable cursor.](https://www.mongodb.com/docs/manual/core/tailable-cursors.md#std-label-tailable-cursors-landing-page)

The total number of queries that performed a collection scan on a [`profile`](https://www.mongodb.com/docs/manual/reference/system-collections.md#mongodb-data--database-.system.profile) collection. This includes queries that used both tailable and non-tailable cursors.

A document that reports on data related to record allocation in the on-disk memory files.

A document that reports metrics related to the replication process. [`metrics.repl`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.repl) document appears on all [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instances, even those that aren't members of [replica sets.](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-replica-set)

A document that reports on the application of operations from the replication [oplog.](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-oplog)

The total number of oplog entries applied. The [`metrics.repl.apply.batchSize`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.repl.apply.batchSize) is incremented with the number of oplog entries in a batch at the batch boundaries instead of being incremented by one after each entry.

For finer granularity, see [`metrics.repl.apply.ops`.](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.repl.apply.ops)

[`metrics.repl.apply.batches`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.repl.apply.batches) reports on the oplog application process on [secondaries](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-secondary) members of replica sets. See [Multithreaded Replication](https://www.mongodb.com/docs/manual/core/replica-set-sync.md#std-label-replica-set-internals-multi-threaded-replication) for more information on the oplog application processes.

The total number of batches applied across all databases.

The total amount of time in milliseconds the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) has spent applying operations from the oplog.

The total number of operations applied during the replication process. [`metrics.repl.apply.ops`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.repl.apply.ops) is incremented after each operation, including operations that derive from oplog entries during application, such as updates to internal metadata collections like `config.transactions`.

**See also:**

[`metrics.repl.apply.batchSize`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.repl.apply.batchSize)

Document that reports on entries written to the oplog.

**New in version 8.0**

Total number of entries written to the oplog. This metric updates with the number of entries in each batch as the member finishes writing the batch to the oplog.

**New in version 8.0**

Document that reports on the oplog writing process for secondary members.

**New in version 8.0**

Total number of batches written across all databases.

**New in version 8.0**

Total time in milliseconds the member has spent writing entries to the oplog.

**New in version 8.0**

MongoDB buffers oplog operations from the replication sync source buffer before applying oplog entries in a batch. [`metrics.repl.buffer`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.repl.buffer) provides a way to track oplog buffers. See [Multithreaded Replication](https://www.mongodb.com/docs/manual/core/replica-set-sync.md#std-label-replica-set-internals-multi-threaded-replication) for more information on the oplog application process.

**Changed in version 8.0**

Starting in MongoDB 8.0, secondaries now update the local oplog and apply changes to the database in parallel. For each batch of oplog entries, MongoDB uses two buffers:

- The [`write`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.repl.buffer.write) buffer receives new oplog entries from the primary. The writer adds these entries to the local oplog and sends them to the applier.

- The [`apply`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.repl.buffer.apply) buffer receives new oplog entries from the writer. The applier uses these entries to update the local database.

This is a breaking change as it deprecates the older `metrics.repl.buffer` status metrics.

Provides information on the status of the oplog apply buffer.

**New in version 8.0**

The current number of operations in the oplog apply buffer.

**New in version 8.0**

Maximum number of operations in the oplog apply buffer. [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#std-program-mongod) sets this value using a constant, which is not configurable.

**New in version 8.0**

Maximum size of the apply buffer. [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#std-program-mongod) sets this size using a constant, which is not configurable.

**New in version 8.0**

The current size of the contents of the oplog apply buffer.

**New in version 8.0**

**Deprecated since version 8.0**

Starting in MongoDB 8.0, secondaries use separate buffers to write and apply oplog entries. For the current number of operations in the oplog buffers, see the [`apply.count`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.repl.buffer.apply.count) or [`write.count`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.repl.buffer.write.count) status metrics.

**Deprecated since version 8.0**

Starting in MongoDB 8.0, secondaries use separate buffers to write and apply oplog entries. For the maximum size of the buffers, see the [`apply.maxSizeBytes`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.repl.buffer.apply.maxSizeBytes) or [`write.maxSizeBytes`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.repl.buffer.write.maxSizeBytes) status metrics.

**Deprecated since version 8.0**

Starting in MongoDB 8.0, secondaries use separate buffers to write and apply oplog entries. For the current size of the oplog buffers, see the [`apply.sizeBytes`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.repl.buffer.apply.sizeBytes) or [`write.sizeBytes`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.repl.buffer.write.sizeBytes) status metrics.

Provides information on the status of the oplog write buffer.

**New in version 8.0**

The current number of operations in the oplog write buffer.

**New in version 8.0**

Maximum size of the write buffer. [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#std-program-mongod) sets this value using a constant, which is not configurable.

**New in version 8.0**

The current size of the contents of the oplog write buffer.

**New in version 8.0**

[`metrics.repl.network`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.repl.network) reports network use by the replication process.

[`metrics.repl.network.bytes`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.repl.network.bytes) reports the total amount of data read from the replication sync source.

[`metrics.repl.network.getmores`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.repl.network.getmores) reports on the `getmore` operations, which are requests for additional results from the oplog [cursor](https://www.mongodb.com/docs/manual/core/cursors.md#std-label-cursors) as part of the oplog replication process.

[`metrics.repl.network.getmores.num`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.repl.network.getmores.num) reports the total number of `getmore` operations, which are operations that request an additional set of operations from the replication sync source.

[`metrics.repl.network.getmores.totalMillis`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.repl.network.getmores.totalMillis) reports the total amount of time required to collect data from `getmore` operations.

**Note:**

This number can be quite large, as MongoDB will wait for more data even if the `getmore` operation does not initial return data.

The number of empty `oplog` batches a secondary receives from its sync source. A secondary receives an empty batch if it is fully synced with its source and either:

- The `getmore` times out waiting for more data, or

- The sync source's majority commit point has advanced since the last batch sent to this secondary.

For a primary, if the instance was previously a secondary, the number reports on the empty batches received when it was a secondary. Otherwise, for a primary, this number is `0`.

The number of unacknowledged (`w: 0`) legacy write operations (see [Opcodes](https://www.mongodb.com/docs/manual/reference/mongodb-wire-protocol.md#std-label-wp-request-opcodes)) that failed because the current [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) is not in [`PRIMARY`](https://www.mongodb.com/docs/manual/reference/replica-states.md#mongodb-replstate-replstate.PRIMARY) state.

The number of unacknowledged (`w: 0`) write operations that failed because the current [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) is not in [`PRIMARY`](https://www.mongodb.com/docs/manual/reference/replica-states.md#mongodb-replstate-replstate.PRIMARY) state.

The highest optime that the oplog fetcher has fetched from its sync source in the most recent batch.

The replication fetch lag, in seconds, between the sync source’s last applied optime and the oplog fetcher’s highest fetched optime on this node.

A document that reports the number of [`getMore`](https://www.mongodb.com/docs/manual/reference/command/getMore.md#mongodb-dbcommand-dbcmd.getMore) commands to fetch the [oplog](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-oplog) that a node processed as a sync source.

The number of [`getMore`](https://www.mongodb.com/docs/manual/reference/command/getMore.md#mongodb-dbcommand-dbcmd.getMore) commands to fetch the [oplog](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-oplog) that a node processed as a sync source.

The time, in milliseconds, that a node spent processing the [`getMore`](https://www.mongodb.com/docs/manual/reference/command/getMore.md#mongodb-dbcommand-dbcmd.getMore) commands counted in [`metrics.repl.network.oplogGetMoresProcessed.num`.](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.repl.network.oplogGetMoresProcessed.num)

The total number of operations read from the replication source.

The total number of oplog query processes created. MongoDB creates a new oplog query any time an error occurs in the connection, including a timeout, or a network operation. This value also increments every time MongoDB selects a new source for replication.

A document that reports the number of `replSetUpdatePosition` commands a node sent to its sync source.

The number of `replSetUpdatePosition` commands a node sent to its sync source. `replSetUpdatePosition` commands are internal replication commands that communicate replication progress from nodes to their sync sources.

**Note:**

Replica set members in the [`STARTUP2`](https://www.mongodb.com/docs/manual/reference/replica-states.md#mongodb-replstate-replstate.STARTUP2) state do not send the `replSetUpdatePosition` command to their sync source.

A document containing the number of times that member `newlyAdded` fields were automatically removed by the primary. When a member is first added to the replica set, the member's `newlyAdded` field is set to `true`.

**New in version 5.0**

The number of times that `newlyAdded` member fields were automatically removed by the primary. When a member is first added to the replica set, the member's `newlyAdded` field is set to `true`. After the primary receives the member's heartbeat response indicating the member state is [`SECONDARY`](https://www.mongodb.com/docs/manual/reference/replica-states.md#mongodb-replstate-replstate.SECONDARY), [`RECOVERING`](https://www.mongodb.com/docs/manual/reference/replica-states.md#mongodb-replstate-replstate.RECOVERING), or [`ROLLBACK`](https://www.mongodb.com/docs/manual/reference/replica-states.md#mongodb-replstate-replstate.ROLLBACK), the primary automatically removes the member's `newlyAdded` field. The `newlyAdded` fields are stored in the [`local.system.replset`](https://www.mongodb.com/docs/manual/reference/local-database.md#mongodb-data-local.system.replset) collection.

**New in version 5.0**

Information on user operations when the member undergoes one of the following transitions that can stop user operations:

- The member steps up to become a primary.

- The member steps down to become a secondary.

- The member is actively performing a rollback.

The transition being reported:

| State Change | Description |
| --- | --- |
| `"stepUp"` | The member steps up to become a primary. |
| `"stepDown"` | The member steps down to become a secondary. |
| `"rollback"` | The member is actively performing a rollback. |
| `""` | The member has not undergone any state changes. |

The total number of operations stopped during the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance's state change.

**New in version 7.3**

`totalOperationsKilled` replaces [`userOperationsKilled`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.repl.stateTransition.userOperationsKilled)

The total number of operations that remained running during the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance's state change.

**New in version 7.3**

`totalOperationsRunning` replaces [`userOperationsRunning`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.repl.stateTransition.userOperationsRunning)

**Deprecated since version 7.3**[`totalOperationsKilled`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.repl.stateTransition.totalOperationsKilled) replaces `userOperationsKilled`.

**Deprecated since version 7.3**[`totalOperationsRunning`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.repl.stateTransition.totalOperationsRunning) replaces `userOperationsRunning`.

Information on a replica set node's [sync source selection](https://www.mongodb.com/docs/manual/core/replica-set-sync.md#std-label-replica-set-sync) process.

Number of times a node attempted to choose a node to sync from among the available sync source options. A node attempts to choose a node to sync from if, for example, the sync source is re-evaluated or the node receives an error from its current sync source.

Number of times a node kept its original sync source after re-evaluating if its current sync source was optimal.

Number of times a node chose a new sync source after re-evaluating if its current sync source was optimal.

Number of times a node could not find an available sync source when attempting to choose a node to sync from.

A document that reports on the replication timestamps.

**New in version 8.1**

The timestamp for the oldest [snapshot](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-snapshot). A snapshot is a copy of the data in a [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance at a specific point in time.

**New in version 8.1**

The number of threads waiting for replicated or journaled [write concern acknowledgments.](https://www.mongodb.com/docs/manual/reference/write-concern.md#std-label-wc-ack-behavior)

**New in version 7.3**

The number of threads queued for local replication [optime](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-optime) assignments.

**New in version 7.3**

The average wait time in milliseconds to acquire the replication coordinator mutex. MongoDB measures this time when it generates the server status oplog section. This metric helps you identify potential replication performance issues related to mutex contention.

**New in version 8.2**

The number of times that [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) has examined the free list without finding a large record allocation.

The number of times [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) has searched for available record allocations.

The number of available record allocations [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) has searched.

A document that reports on the operation of the resource use of the [ttl index](https://www.mongodb.com/docs/manual/tutorial/expire-data.md#std-label-ttl-collections) process.

The total number of documents deleted from collections with a [ttl index.](https://www.mongodb.com/docs/manual/tutorial/expire-data.md#std-label-ttl-collections)

The number of index keys that the TTL monitor deleted.

**New in version 8.3**

The cumulative amount of time, in microseconds, that the TTL monitor has spent deleting expired documents and index keys.

**New in version 8.3**

The number of documents TTL monitor examined.

**New in version 8.3**

The number of index keys the TTL monitor examined.

**New in version 8.3**

Number of TTL deletes skipped due to a TTL [secondary index](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-secondary-index) being present, but not valid for TTL deletion.

- `0` indicates all secondary TTL indexes are eligible for TTL deletion.

- A non-zero value indicates there is an invalid secondary TTL index.

If there is an invalid secondary TTL index, you must manually modify the secondary index to use automatic TTL deletion.

**New in version 8.1**

Number of passes performed by the TTL background process to check for expired documents. A pass is complete when the TTL monitor has deleted as many candidate documents as it can find from all TTL indexes. For more information on the TTL index deletion process, see [Deletion Process.](https://www.mongodb.com/docs/manual/core/index-ttl.md#std-label-ttl-monitor-deletion-process)

Number of sub-passes performed by the TTL background process to check for expired documents. For more information on the TTL index deletion process, see [Deletion Process.](https://www.mongodb.com/docs/manual/core/index-ttl.md#std-label-ttl-monitor-deletion-process)

A document that contains data regarding cursor state and use.

The total number of cursors that have returned more than one batch since the server process started. Additional batches are retrieved using the [`getMore`](https://www.mongodb.com/docs/manual/reference/command/getMore.md#mongodb-dbcommand-dbcmd.getMore) command.

**New in version 5.0**

The total number of cursors that have timed out since the server process started. If this number is large or growing at a regular rate, this may indicate an application error.

The total number of cursors that have been opened since the server process started, including cursors currently open. Differs from [`metrics.cursor.open.total`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.cursor.open.total), which is the number of currently open cursors only.

**New in version 5.0**

A document that reports the number of cursors that have lifespans within specified time periods. The cursor lifespan is the time period from when the cursor is created to when the cursor is killed using the [`killCursors`](https://www.mongodb.com/docs/manual/reference/command/killCursors.md#mongodb-dbcommand-dbcmd.killCursors) command or the cursor has no remaining objects in the [batch.](https://www.mongodb.com/docs/manual/core/cursors.md#std-label-cursor-batches)

The lifespan time periods are:

- \< 1 second

- \>= 1 second to \< 5 seconds

- \>= 5 seconds to \< 15 seconds

- \>= 15 seconds to \< 30 seconds

- \>= 30 seconds to \< 1 minute

- \>= 1 minute to \< 10 minutes

- \>= 10 minutes

**New in version 5.0**

The number of cursors with a lifespan >= 10 minutes.

**New in version 5.0**

The number of cursors with a lifespan >= 1 minute to \< 10 minutes.

**New in version 5.0**

The number of cursors with a lifespan >= 5 seconds to \< 15 seconds.

**New in version 5.0**

The number of cursors with a lifespan >= 30 seconds to \< 1 minute.

**New in version 5.0**

The number of cursors with a lifespan \< 1 second.

**New in version 5.0**

The number of cursors with a lifespan >= 15 seconds to \< 30 seconds.

**New in version 5.0**

The number of cursors with a lifespan >= 1 second to \< 5 seconds.

**New in version 5.0**

A document that contains data regarding open cursors.

The number of open cursors with the option [`DBQuery.Option.noTimeout`](https://www.mongodb.com/docs/manual/reference/method/cursor.addOption.md#mongodb-data-DBQuery.Option.noTimeout) set to prevent timeout after a period of inactivity.

The number of "pinned" open cursors.

The number of cursors that MongoDB is maintaining for clients. Because MongoDB exhausts unused cursors, typically this value small or zero. However, if there is a queue, or stale tailable cursors, or a large number of operations this value may increase.

The total number of cursors that only target a *single* shard. Only [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) instances report [`metrics.cursor.open.singleTarget`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.cursor.open.singleTarget) values.

The total number of cursors that only target *more than one* shard. Only [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) instances report [`metrics.cursor.open.multiTarget`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.cursor.open.multiTarget) values.

### mirroredReads

*Available on mongod only.*

```javascript
"mirroredReads" : {
      "seen" : <num>,
      "sent" : <num>
},
```

*Available on mongod only.*

A document that reports on [mirrored reads](https://www.mongodb.com/docs/manual/replication.md#std-label-mirrored-reads). To return [`mirroredReads`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.mirroredReads) information, you must explicitly specify the inclusion:

```javascript
db.runCommand( { serverStatus: 1, mirroredReads: 1 } )
```

**New in version 6.2**

The number of mirrored reads processed by this member while a secondary. For more information, see the [`mirrorReads`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.mirrorReads) parameter.

The number of [operations that support mirroring](https://www.mongodb.com/docs/manual/replication.md#std-label-mirrored-reads-supported-operations) received by this member. For more information, see the [`mirrorReads`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.mirrorReads) parameter.

The number of mirrored reads sent by this member when primary. For example, if a read is mirrored and sent to two secondaries, the number of mirrored reads is `2`.

**See also:**

[`mirrorReads`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.mirrorReads) Parameter

### network

```javascript
network : {
   egress : {
      bytesIn : Long("<num>"),
      bytesOut : Long("<num>"),
      physicalBytesIn : Long("<num>"),
      physicalBytesOut : Long("<num>"),
      numRequests : Long("<num>"),
   },
   ingressRequestRateLimiter : {
      "rejectedAdmissions": Long,
      "successfulAdmissions": Long,
      "exemptedAdmissions": Long,
      "attemptedAdmissions": Long,
      "totalAvailableTokens": Long
   }, // Added in MongoDB 8.0.20
   bytesIn : Long("<num>"),
   bytesOut : Long("<num>"),
   physicalBytesIn : Long("<num>"),
   physicalBytesOut : Long("<num>"),
   numSlowDNSOperations : Long("<num>"),
   numSlowSSLOperations : Long("<num>"),
   numRequests : Long("<num>"),
   tcpFastOpen : {
      kernelSetting : Long("<num>"),
      serverSupported : <bool>,
      clientSupported : <bool>,
      accepted : Long("<num>")
   },
   compression : {
      snappy : {
         compressor : { bytesIn : Long("<num>"), bytesOut : Long("<num>") },
         decompressor : { bytesIn : Long("<num>"), bytesOut : Long("<num>") }
      },
      zstd : {
         compressor : { bytesIn : Long("<num>"), bytesOut : Long("<num>") },
         decompressor : { bytesIn : Long("<num>"), bytesOut : Long("<num>") }
      },
      zlib : {
         compressor : { bytesIn : Long("<num>"), bytesOut : Long("<num>") },
         decompressor : { bytesIn : Long("<num>"), bytesOut : Long("<num>") }
      }
   },
   serviceExecutors : {
      passthrough : {
         threadsRunning : <num>,
         clientsInTotal : <num>,
         clientsRunning : <num>,
         clientsWaitingForData : <num>
      },
      fixed : {
         threadsRunning : <num>,
         clientsInTotal : <num>,
         clientsRunning : <num>,
         clientsWaitingForData : <num>
      }
   },
   listenerProcessingTime : { durationMicros : <num> }  // Added in MongoDB 6.3
}
```

A document that reports data on MongoDB's network use. These statistics measure ingress and egress connections, specifically the traffic seen by the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) or [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) over network connections initiated by clients or other [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) or [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) instances.

Reports data on the traffic from egress connections initiated by this `mongod` or `mongos` instance. In most cases, the egress connections are `mongos` communicating with `mongod` for sharding, or `mongod` communicating with `mongod` for replication. It is also possible that `mongod` or `mongos` are communicating with external services, such as `mongot`.

The total number of logical bytes that `mongod` or `mongos` instances have *received* over network connections that they have initiated to other nodes/services. Logical bytes are the exact number of bytes that a given file contains.

The total number of logical bytes that `mongod` or `mongos` instances have *sent* over network connections that they have initiated to other nodes/services. Logical bytes correspond to the number of bytes that a given file contains.

The total number of physical bytes that `mongod` or `mongos` instances has *received* over network connections that they have initiated to other nodes/services. Physical bytes are the number of bytes that actually reside on disk.

The total number of physical bytes that `mongod` or `mongos` instances have *sent* over network connections that they have initiated to other nodes/services. Physical bytes are the number of bytes that actually reside on disk.

The total number of distinct requests that `mongod` or `mongos` have sent and received responses to. Use this value to provide context for the [`network.egress.bytesIn`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.network.egress.bytesIn) and [`network.egress.bytesOut`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.network.egress.bytesOut) values to ensure that MongoDB's network utilization is consistent with expectations and application use.

The total number of logical bytes that the server has *received* over network connections initiated by clients or other `mongod` or `mongos` instances. Logical bytes are the exact number of bytes that a given file contains.

The total number of logical bytes that the server has *sent* over network connections initiated by clients or other `mongod` or `mongos` instances. Logical bytes correspond to the number of bytes that a given file contains.

The total number of physical bytes that the server has *received* over network connections initiated by clients or other `mongod` or `mongos` instances. Physical bytes are the number of bytes that actually reside on disk.

The total number of physical bytes that the server has *sent* over network connections initiated by clients or other `mongod` or `mongos` instances. Physical bytes are the number of bytes that actually reside on disk.

The total number of DNS resolution operations which took longer than 1 second.

The total number of SSL handshake operations which took longer than 1 second.

The total number of distinct requests that the server has received. Use this value to provide context for the [`network.bytesIn`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.network.bytesIn) and [`network.bytesOut`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.network.bytesOut) values to ensure that MongoDB's network utilization is consistent with expectations and application use.

A document that reports data on MongoDB's support and use of TCP Fast Open (TFO) connections.

*Linux only*

Returns the value of `/proc/sys/net/ipv4/tcp_fastopen`:

- `0` - TCP Fast Open is disabled on the system.

- `1` - TCP Fast Open is enabled for outgoing connections.

- `2` - TCP Fast Open is enabled for incoming connections.

- `3` - TCP Fast Open is enabled for incoming and outgoing connections.

* Returns `true` if the host operating system supports inbound TCP Fast Open (TFO) connections.

* Returns `false` if the host operating system does *not* support inbound TCP Fast Open (TFO) connections.

- Returns `true` if the host operating system supports outbound TCP Fast Open (TFO) connections.

- Returns `false` if the host operating system does *not* support outbound TCP Fast Open (TFO) connections.

The total number of accepted incoming TCP Fast Open (TFO) connections to the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) or [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) since the `mongod` or `mongos` last started.

A document that reports on the amount of data compressed and decompressed by each network compressor library.

A document that returns statistics on the number of bytes that have been compressed and decompressed with the [snappy](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-snappy) library.

A document that returns statistics on the number of bytes that have been compressed and decompressed with the [zstd](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-zstd) library.

A document that returns statistics on the number of bytes that have been compressed and decompressed with the [zlib](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-zlib) library.

**New in version 5.0**

A document that reports data on the service executors, which run operations for client requests.

**New in version 5.0**

A document that reports data about the threads and clients for the `passthrough` service executor. The `passthrough` service executor creates a new thread for each client and destroys the thread after the client ends.

**New in version 5.0**

Number of threads running in the `passthrough` service executor.

**New in version 5.0**

Total number of clients allocated to the `passthrough` service executor. A client can be allocated to the `passthrough` service executor and not currently running requests.

**New in version 5.0**

Number of clients currently using the `passthrough` service executor to run requests.

**New in version 5.0**

Number of clients using the `passthrough` service executor that are waiting for incoming data from the network.

**New in version 5.0**

A document that reports data about the threads and clients for the `fixed` service executor. The `fixed` service executor has a fixed number of threads. A thread is temporarily assigned to a client and the thread is preserved after the client ends.

**New in version 5.0**

Number of threads running in the `fixed` service executor.

**New in version 5.0**

Total number of clients allocated to the `fixed` service executor. A client can be allocated to the `fixed` service executor and not currently running requests.

**New in version 5.0**

Number of clients currently using the `fixed` service executor to run requests.

**New in version 5.0**

Number of clients using the `fixed` service executor that are waiting for incoming data from the network.

**New in version 6.3**

A document that reports the total time the database listener spends allocating incoming database connection requests to dedicated threads.

**New in version 6.3**

Total time in microseconds the database listener spends allocating incoming database connection requests to dedicated threads that perform database operations.

### opLatencies

```javascript
opLatencies : {
   reads : <document>,
   writes : <document>,
   commands : <document>,
   transactions : <document>
},
```

A document containing operation latencies for the instance as a whole. See [latencyStats Document](https://www.mongodb.com/docs/manual/reference/operator/aggregation/collStats.md#std-label-latency-stats-document) for a description of this document.

Starting in MongoDB 6.2, the [`opLatencies`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.opLatencies) metric reports for both [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) and [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) instances. Latencies reported by `mongos` include operation latency time and communication time between the `mongod` and `mongos` instances.

To include the histogram in the `opLatencies` output, run the following command:

```javascript
db.runCommand( { serverStatus: 1, opLatencies: { histograms: true } } ).opLatencies
```

Latency statistics for read requests.

Latency statistics for write operations.

Latency statistics for database commands.

Latency statistics for database transactions.

### opWorkingTime

```javascript
opWorkingTime : {
   commands : <document>,
   reads : <document>,
   writes : <document>,
   transactions : <document>
}
```

Document that includes information on operation execution for the instance. See [latencyStats Document](https://www.mongodb.com/docs/manual/reference/operator/aggregation/collStats.md#std-label-latency-stats-document) for a description of this document.

The fields under `opWorkingTime` are measured in `workingMillis`, which is the amount of time that MongoDB spends working on that operation. This means that factors such as waiting for locks and flow control don't affect `opWorkingTime`.

To include the histogram in the `opWorkingTime` output, run the following command:

```javascript
db.runCommand( { serverStatus: 1, opWorkingTime: { histogram: true } } ).opWorkingTime
```

**New in version 8.0**

Document that reports execution statistics for database commands.

**New in version 8.0**

Document that reports execution statistics for read operations.

**New in version 8.0**

Document that reports execution statistics for write operations.

**New in version 8.0**

Document that reports execution statistics for transactions.

**New in version 8.0**

### opReadConcernCounters

**Warning: Removed**

Starting in version 5.0, [`opReadConcernCounters`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.opReadConcernCounters) is replaced by [`readConcernCounters`.](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.readConcernCounters)

*Only for mongod instances*

```javascript
opReadConcernCounters : {
   available : Long("<num>"),
   linearizable : Long("<num>"),
   local : Long("<num>"),
   majority : Long("<num>"),
   snapshot : Long("<num>"),
   none : Long("<num>")
}
```

*Removed in version 5.0*. Replaced by [`readConcernCounters`.](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.readConcernCounters)

A document that reports on the [read concern level](https://www.mongodb.com/docs/manual/reference/read-concern.md#std-label-read-concern-levels) specified by query operations to the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance since it last started.

| Specified `w` | Description |
| --- | --- |
| `"available"` | Number of query operations that specified read concern level [`"available"`.](https://www.mongodb.com/docs/manual/reference/read-concern-available.md#mongodb-readconcern-readconcern.-available-) |
| `"linearizable"` | Number of query operations that specified read concern level [`"linearizable"`.](https://www.mongodb.com/docs/manual/reference/read-concern-linearizable.md#mongodb-readconcern-readconcern.-linearizable-) |
| `"local"` | Number of query operations that specified read concern level [`"local"`.](https://www.mongodb.com/docs/manual/reference/read-concern-local.md#mongodb-readconcern-readconcern.-local-) |
| `"majority"` | Number of query operations that specified read concern level [`"majority"`.](https://www.mongodb.com/docs/manual/reference/read-concern-majority.md#mongodb-readconcern-readconcern.-majority-) |
| `"snapshot"` | Number of query operations that specified read concern level [`"snapshot"`.](https://www.mongodb.com/docs/manual/reference/read-concern-snapshot.md#mongodb-readconcern-readconcern.-snapshot-) |
| `"none"` | Number of query operations that did not specify a read concern level and instead used the default [read concern level.](https://www.mongodb.com/docs/manual/reference/read-concern.md#std-label-read-concern-levels) |

The sum of the [`opReadConcernCounters`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.opReadConcernCounters) equals [`opcounters.query`.](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.opcounters.query)

### opWriteConcernCounters

*Only for mongod instances*

```javascript
opWriteConcernCounters : {
   insert : {
      wmajority : Long("<num>"),
      wnum : {
         <num> :  Long("<num>"),
         ...
      },
      wtag : {
         <tag1> :  Long("<num>"),
         ...
      },
      none : Long("<num>"),
      noneInfo : {
         CWWC : {
            wmajority : Long("<num>"),
            wnum : {
               <num> :  Long("<num>"),
               ...
            },
            wtag : {
               <tag1> :  Long("<num>"),
               ...
            }
         },
         implicitDefault : {
            wmajority : Long("<num>")
            wnum : {
               <num> :  Long("<num>"),
               ...
            }
         }
      }
   },
   update : {
      wmajority : Long("<num>"),
      wnum : {
         <num> :  Long("<num>"),
         ...
      },
      wtag : {
         <tag1> :  Long("<num>"),
         ...
      },
      none : Long("<num>"),
      noneInfo : {
         CWWC : {
            wmajority : Long("<num>"),
            wnum : {
               <num> :  Long("<num>"),
               ...
            }
            wtag : {
               <tag1> :  Long("<num>"),
               ...
            }
         },
         implicitDefault : {
            wmajority : Long("<num>")
            wnum : {
               <num> :  Long("<num>"),
               ...
            }
         }
      }
   },
   delete : {
      wmajority :  Long("<num>")
      wnum : {
         <num> :  Long("<num>"),
         ...
      },
      wtag : {
         <tag1> :  Long("<num>"),
         ...
      },
      none : Long("<num>"),
      noneInfo : {
         CWWC : {
            wmajority : Long("<num>"),
            wnum : {
               <num> :  Long("<num>"),
               ...
            },
            wtag : {
               <tag1> :  Long("<num>"),
               ...
            }
         },
         implicitDefault : {
            wmajority : Long("<num>")
            wnum : {
               <num> :  Long("<num>"),
               ...
            }
         }
      }
   }
}
```

A document that reports on the [write concerns](https://www.mongodb.com/docs/manual/reference/write-concern.md#std-label-write-concern) specified by write operations to the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance since it last started.

More specifically, the [`opWriteConcernCounters`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.opWriteConcernCounters) reports on the [w: \<value>](https://www.mongodb.com/docs/manual/reference/write-concern.md#std-label-wc-w) specified by the write operations. The journal flag option (`j`) and the timeout option (`wtimeout`) of the write concerns does not affect the count. The count is incremented even if the operation times out.

**Note:**

Only available when [`reportOpWriteConcernCountersInServerStatus`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.reportOpWriteConcernCountersInServerStatus) parameter is set to `true` (`false` by default).

A document that reports on the [w: \<value>](https://www.mongodb.com/docs/manual/reference/write-concern.md#std-label-wc-w) specified by insert operations to the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance since it last started:

**Note:**

Only available when [`reportOpWriteConcernCountersInServerStatus`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.reportOpWriteConcernCountersInServerStatus) parameter is set to `true` (`false` by default).

```javascript
insert : {
   wmajority : Long("<num>"),
   wnum : {
      <num> :  Long("<num>"),
      ...
   },
   wtag : {
      <tag1> :  Long("<num>"),
      ...
   },
   none : Long("<num>"),
   noneInfo : {
      CWWC : {
         wmajority : Long("<num>"),
         wnum : {},
         wtag : {}
      },
      implicitDefault : {
         wmajority : Long("<num>")
         wnum : {}
      }
   }
},
```

| Specified `w` | Description |
| --- | --- |
| `"wmajority"` | Number of insert operations that specified [`w: "majority"`.](https://www.mongodb.com/docs/manual/reference/write-concern.md#mongodb-writeconcern-writeconcern.-majority-) |
| `"wnum"` | Number of insert operations that specified [`w: <num>`](https://www.mongodb.com/docs/manual/reference/write-concern.md#mongodb-writeconcern-writeconcern.-number-). The counts are grouped by the specific``<num>``. |
| `"wtag"` | Number of insert operations that specified [`w: <tag>`](https://www.mongodb.com/docs/manual/reference/write-concern.md#mongodb-writeconcern-writeconcern.-custom-write-concern-name-). The counts are grouped by the specific `<tag>`. |
| `"none"` | Number of insert operations that did not specify `w` value. These operations use the default `w` value of ["majority".](https://www.mongodb.com/docs/manual/reference/write-concern.md#std-label-wc-default-behavior) |
| `"noneInfo"` | Number of non-transaction query operations that use default write concerns. The metrics track usage of the [`cluster wide write concern`](https://www.mongodb.com/docs/manual/reference/command/setDefaultRWConcern.md#mongodb-dbcommand-dbcmd.setDefaultRWConcern) (the global default write concern) and the implicit-default write concern. The sum of the values in `opWriteConcernCounters.noneInfo` should equal the value of `opWriteConcernCounters.none`. |

The sum of the [`opWriteConcernCounters.insert`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.opWriteConcernCounters.insert) equals [`opcounters.insert`.](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.opcounters.insert)

A document that reports on the [w: \<value>](https://www.mongodb.com/docs/manual/reference/write-concern.md#std-label-wc-w) specified by update operations to the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance since it last started:

**Note:**

Only available when [`reportOpWriteConcernCountersInServerStatus`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.reportOpWriteConcernCountersInServerStatus) parameter is set to `true` (`false` by default).

```javascript
update : {
   wmajority : Long("<num>"),
   wnum : {
      <num> :  Long("<num>"),
      ...
   },
   wtag : {
      <tag1> :  Long("<num>"),
      ...
   },
   none : Long("<num>"),
   noneInfo : {
      CWWC : {
         wmajority : Long("<num>"),
         wnum : {},
         wtag : {}
      },
      implicitDefault : {
         wmajority : Long("<num>")
         wnum : {}
      }
   }
},
```

| Specified `w` | Description |
| --- | --- |
| `"wmajority"` | Number of update operations that specified [`w: "majority"`.](https://www.mongodb.com/docs/manual/reference/write-concern.md#mongodb-writeconcern-writeconcern.-majority-) |
| `"wnum"` | Number of update operations that specified [`w: <num>`](https://www.mongodb.com/docs/manual/reference/write-concern.md#mongodb-writeconcern-writeconcern.-number-). The counts are grouped by the specific `<num>`. |
| `"wtag"` | Number of update operations that specified [`w: <tag>`](https://www.mongodb.com/docs/manual/reference/write-concern.md#mongodb-writeconcern-writeconcern.-custom-write-concern-name-). The counts are grouped by the specific `<tag>`. |
| `"none"` | Number of update operations that did not specify `w` value. These operations use the default `w` value of `1`. |
| `"noneInfo"` | Number of non-transaction query operations that use default write concerns. The metrics track usage of the [`cluster wide write concern`](https://www.mongodb.com/docs/manual/reference/command/setDefaultRWConcern.md#mongodb-dbcommand-dbcmd.setDefaultRWConcern) (the global default write concern) and the implicit-default write concern. The sum of the values in `opWriteConcernCounters.noneInfo` should equal the value of `opWriteConcernCounters.none`. |

The sum of the [`opWriteConcernCounters.update`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.opWriteConcernCounters.update) equals [`opcounters.update`.](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.opcounters.update)

A document that reports on the [w: \<value>](https://www.mongodb.com/docs/manual/reference/write-concern.md#std-label-wc-w) specified by delete operations to the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance since it last started:

**Note:**

Only available when [`reportOpWriteConcernCountersInServerStatus`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.reportOpWriteConcernCountersInServerStatus) parameter is set to `true` (`false` by default).

```javascript
delete : {
   wmajority :  Long("<num>"),
   wnum : {
      <num> :  Long("<num>"),
      ...
   },
   wtag : {
      <tag1> :  Long("<num>"),
      ...
   },
   none : Long("<num>"),
   noneInfo : {
      CWWC : {
         wmajority : Long("<num>"),
         wnum : {},
         wtag : {}
      },
      implicitDefault : {
         wmajority : Long("<num>")
         wnum : {}
      }
   }
}
```

| Specified `w` | Description |
| --- | --- |
| `"wmajority"` | Number of delete operations that specified [`w: "majority"`.](https://www.mongodb.com/docs/manual/reference/write-concern.md#mongodb-writeconcern-writeconcern.-majority-) |
| `"wnum"` | Number of delete operations that specified [`w: <num>`](https://www.mongodb.com/docs/manual/reference/write-concern.md#mongodb-writeconcern-writeconcern.-number-). The counts are grouped by the specific `<num>`. |
| `"wtag"` | Number of delete operations that specified [`w: <tag>`](https://www.mongodb.com/docs/manual/reference/write-concern.md#mongodb-writeconcern-writeconcern.-custom-write-concern-name-). The counts are grouped by the specific `<tag>`. |
| `"none"` | Number of delete operations that did not specify `w` value. These operations use the default `w` value of `1`. |
| `"noneInfo"` | Number of non-transaction query operations that use default write concerns. The metrics track usage of the [`cluster wide write concern`](https://www.mongodb.com/docs/manual/reference/command/setDefaultRWConcern.md#mongodb-dbcommand-dbcmd.setDefaultRWConcern) (the global default write concern) and the implicit-default write concern. The sum of the values in `opWriteConcernCounters.noneInfo` should equal the value of `opWriteConcernCounters.none`. |

The sum of the [`opWriteConcernCounters.delete`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.opWriteConcernCounters.delete) equals [`opcounters.delete`.](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.opcounters.delete)

### opcounters

```javascript
opcounters : {
   insert : Long("<num>"),
   query : Long("<num>"),
   update : Long("<num>"),
   delete : Long("<num>"),
   getmore : Long("<num>"),
   command : Long("<num>"),
},
```

A document that reports on database operations by type since the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance last started.

These numbers will grow over time until next restart. Analyze these values over time to track database utilization.

**Note:**

The data in [`opcounters`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.opcounters) treats operations that affect multiple documents, such as bulk insert or multi-update operations, as a single operation. See [`metrics.document`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.metrics.document) for more granular document-level operation tracking.

Additionally, these values reflect received operations, and increment even when operations are not successful.

The total number of insert operations received since the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance last started.

The total number of queries received since the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance last started. Starting in MongoDB 7.1, aggregations count as query operations and increment this value.

The total number of update operations received since the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance last started.

The total number of delete operations since the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance last started.

The total number of [`getMore`](https://www.mongodb.com/docs/manual/reference/command/getMore.md#mongodb-dbcommand-dbcmd.getMore) operations since the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance last started. This counter can be high even if the query count is low. Secondary nodes send [`getMore`](https://www.mongodb.com/docs/manual/reference/command/getMore.md#mongodb-dbcommand-dbcmd.getMore) operations as part of the replication process.

The total number of commands issued to the database since the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance last started.

[`opcounters.command`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.opcounters.command) counts all [commands](https://www.mongodb.com/docs/manual/reference/command.md#std-label-database-commands) **except** the following:

- [`insert`](https://www.mongodb.com/docs/manual/reference/command/insert.md#mongodb-dbcommand-dbcmd.insert)

- [`update`](https://www.mongodb.com/docs/manual/reference/command/update.md#mongodb-dbcommand-dbcmd.update)

- [`delete`](https://www.mongodb.com/docs/manual/reference/command/delete.md#mongodb-dbcommand-dbcmd.delete)

- [`aggregate`](https://www.mongodb.com/docs/manual/reference/command/aggregate.md#mongodb-dbcommand-dbcmd.aggregate)

`opQuery` counts the number of requests for opcodes that are deprecated in MongoDB 5.0 but are temporarily supported. This section only appears in the `db.serverStatus()` output when a deprecated opcode has been used.

The counter is reset when `mongod` starts.

```javascript
deprecated: {
   opQuery: Long("<num>"),
}
```

### opcountersRepl

The returned opcountersRepl.\* values are type NumberLong.

```javascript
opcountersRepl : {
   insert : Long("<num>"),
   query : Long("<num>"),
   update : Long("<num>"),
   delete : Long("<num>"),
   getmore : Long("<num>"),
   command : Long("<num>"),
},
```

A document that reports on database replication operations by type since the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance last started.

These values only appear when the current host is a member of a replica set.

These values differ from the [`opcounters`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.opcounters) values because of how MongoDB serializes operations during replication. See [Replication](https://www.mongodb.com/docs/manual/replication.md#std-label-replication) for more information on replication.

These numbers grow over time in response to database use until next restart. Analyze these values over time to track database utilization.

The returned opcountersRepl.\* values are type NumberLong.

The total number of replicated insert operations since the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance last started.

The returned opcountersRepl.\* values are type NumberLong.

The total number of replicated queries since the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance last started.

The returned opcountersRepl.\* values are type NumberLong.

The total number of replicated update operations since the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance last started.

The returned opcountersRepl.\* values are type NumberLong.

The total number of replicated delete operations since the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance last started.

The returned opcountersRepl.\* values are type NumberLong.

The total number of [`getMore`](https://www.mongodb.com/docs/manual/reference/command/getMore.md#mongodb-dbcommand-dbcmd.getMore) operations since the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance last started. This counter can be high even if the query count is low. Secondary nodes send [`getMore`](https://www.mongodb.com/docs/manual/reference/command/getMore.md#mongodb-dbcommand-dbcmd.getMore) operations as part of the replication process.

The returned opcountersRepl.\* values are type NumberLong.

The total number of replicated commands issued to the database since the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance last started.

The returned opcountersRepl.\* values are type NumberLong.

### oplogTruncation

```javascript
oplogTruncation : {
   totalTimeProcessingMicros : Long("<num>"),
   processingMethod : <string>,
   oplogMinRetentionHours : <double>
   totalTimeTruncatingMicros : Long("<num>"),
   truncateCount : Long("<num>")
},
```

A document that reports on oplog truncations.

The field only appears when the current instance is a member of a replica set and uses either the [WiredTiger Storage Engine](https://www.mongodb.com/docs/manual/core/wiredtiger.md#std-label-storage-wiredtiger) or [In-Memory Storage Engine for Self-Managed Deployments.](https://www.mongodb.com/docs/manual/core/inmemory.md#std-label-storage-inmemory)

Available in the [WiredTiger Storage Engine.](https://www.mongodb.com/docs/manual/core/wiredtiger.md#std-label-storage-wiredtiger)

The total time taken, in microseconds, to scan or sample the oplog to determine the oplog truncation points.

[`totalTimeProcessingMicros`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.oplogTruncation.totalTimeProcessingMicros) is only meaningful if the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance started on existing data files (that is, not meaningful for [In-Memory Storage Engine for Self-Managed Deployments](https://www.mongodb.com/docs/manual/core/inmemory.md#std-label-storage-inmemory)).

See [`oplogTruncation.processingMethod`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.oplogTruncation.processingMethod)

Available in the [WiredTiger Storage Engine.](https://www.mongodb.com/docs/manual/core/wiredtiger.md#std-label-storage-wiredtiger)

The method used at start up to determine the oplog truncation points. The value can be either `"sampling"` or `"scanning"`.

[`processingMethod`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.oplogTruncation.processingMethod) is only meaningful if the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance started on existing data files (that is, not meaningful for [In-Memory Storage Engine for Self-Managed Deployments](https://www.mongodb.com/docs/manual/core/inmemory.md#std-label-storage-inmemory)).

Available in the [WiredTiger Storage Engine.](https://www.mongodb.com/docs/manual/core/wiredtiger.md#std-label-storage-wiredtiger)

The minimum retention period for the oplog in hours. If the oplog has exceeded the oplog size, the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) only truncates oplog entries older than the configured retention value.

Only visible if the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) is a member of a replica set *and*:

- The [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) was started with the [`--oplogMinRetentionHours`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#std-option-mongod.--oplogMinRetentionHours) command line option *or* the [`storage.oplogMinRetentionHours`](https://www.mongodb.com/docs/manual/reference/configuration-options.md#mongodb-setting-storage.oplogMinRetentionHours) configuration file option,

  *or*

- The minimum retention period was configured after startup using [`replSetResizeOplog`.](https://www.mongodb.com/docs/manual/reference/command/replSetResizeOplog.md#mongodb-dbcommand-dbcmd.replSetResizeOplog)

The cumulative time spent, in microseconds, performing oplog truncations.

Available in the [WiredTiger Storage Engine.](https://www.mongodb.com/docs/manual/core/wiredtiger.md#std-label-storage-wiredtiger)

The cumulative number of oplog truncations.

Available in the [WiredTiger Storage Engine.](https://www.mongodb.com/docs/manual/core/wiredtiger.md#std-label-storage-wiredtiger)

### planCache

**New in version 7.0**

```javascript
planCache : {
   totalQueryShapes : Long("<num>"),
   totalSizeEstimateBytes : Long("<num>"),
   classic : {
      hits : Long("<num>"),
      misses : Long("<num>"),
      replanned : Long("<num>"),
      replanned_plan_is_cached_plan : Long("<num>"),
      skipped : Long("<num>")
   },
   sbe : {
      hits : Long("<num>"),
      misses: Long("<num>"),
      replanned : Long("<num>"),
      replanned_plan_is_cached_plan : Long("<num>"),
      skipped : Long("<num>")
   }
}
```

A document that reports query plan cache statistics.

Approximate number of [plan cache query shapes](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-plan-cache-query-shape)

Prior to version 7.2, information on the number of plan cache query shapes was stored in the `query.planCacheTotalQueryShapes` field.

**New in version 7.2**

Total size of the plan cache in bytes.

Prior to version 7.2, information on the plan cache size was stored in the `query.planCacheTotalSizeEstimateBytes` field.

**New in version 7.2**

Number of classic execution engine query plans found in the query cache and reused to avoid the query planning phase.

Number of classic execution engine query plans which were not found in the query cache and went through the query planning phase.

Number of classic execution engine query plans that were discarded and re-optimized.

**New in version 8.0**

*(Also available in 7.0.22)*

Number of times the server performed a replan operation for the classic execution engine that produced a plan identical to one already in the query cache.

**New in version 8.2**

Number of classic execution engine query plans that were not found in the query cache because the query is ineligible for caching.

**New in version 7.3**

Number of slot-based execution engine query plans found in the query cache and reused to avoid the query planning phase.

Number of slot-based execution engine plans which were not found in the query cache and went through the query planning phase.

Number of slot-based execution engine query plans that were discarded and re-optimized.

**New in version 8.0**

*(Also available in 7.0.22)*

Number of times the server performed a replan operation for the slot-based execution engine that produced a plan identical to one already in the query cache.

**New in version 8.2**

Number of slot-based execution engine query plans that were not found in the query cache because the query is ineligible for caching.

**New in version 7.3**

### profiler

```javascript
profiler: {
   totalWrites: <integer>,
   activeWriters: <integer>
}
```

Total number of writes to [`profile`](https://www.mongodb.com/docs/manual/reference/system-collections.md#mongodb-data--database-.system.profile) collections on all databases.

The instantaneous number of operations writing to a profile collection on all databases.

**New in version 8.3**

Total number of abandoned writes to [`profile`](https://www.mongodb.com/docs/manual/reference/system-collections.md#mongodb-data--database-.system.profile) collections to preserve availability.

You can specify the amount of time to wait before abandoning writes to [`profile`](https://www.mongodb.com/docs/manual/reference/system-collections.md#mongodb-data--database-.system.profile) collections by setting the [`internalQueryGlobalProfilingLockDeadlineMs`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.internalQueryGlobalProfilingLockDeadlineMs) parameter.

**New in version 8.3**

Total number of databases where the [Database Profiler](https://www.mongodb.com/docs/manual/tutorial/manage-the-database-profiler.md#std-label-database-profiler) is disabled after reaching the lock timeout threshold.

You can specify the maximum number of lock timeouts per second that disable the profiler by setting the [`internalProfilingMaxAbandonedWritesPerSecondPerDb`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.internalProfilingMaxAbandonedWritesPerSecondPerDb) parameter.

### queryStats

**New in version 7.1**

```javascript
queryStats: {
   numEvicted: Long("<num>"),
   numRateLimitedRequests: Long("<num>"),
   queryStatsStoreSizeEstimateBytes: Long("<num>"),
   numQueryStatsStoreWriteErrors: Long("<num>"),
   numHmacApplicationErrors: Long("<num>")
},
```

A document that contains metrics for the [`$queryStats`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/queryStats.md#mongodb-pipeline-pipe.-queryStats) aggregation stage.

Number of queries that the `$queryStats` virtual collection has evicted due to space contraints.

Number of times that query stats were not recorded for a query due to rate limiting.

Current estimated size of objects in the `$queryStats` virtual collection.

Number of times this MongoDB process failed to store a new query stats key. Generally, these failures happen when the `$queryStats` virtual collection runs out of space.

Number of times this MongoDB process failed to compute a one-way tokenized query stats key when `$queryStats` was called with the `transformIdentifiers` option.

### queryAnalyzers

**New in version 7.0**

```javascript
queryAnalyzers: {
  activeCollections: <integer>,
  totalCollections: <integer>,
  totalSampledReadsCount: <integer>,
  totalSampledWritesCount: <integer>,
  totalSampledReadsBytes: <integer>,
  totalSampledWritesBytes: <integer>
}
```

Number of collections the [query analyzer](https://www.mongodb.com/docs/manual/reference/command/configureQueryAnalyzer.md#std-label-configureQueryAnalyzer) actively samples.

Total number of sampled collections.

Total number of sampled read queries.

Total number of sampled write queries.

Total size of sampled read queries, in bytes. This metric is only available when running `serverStatus` on `mongod`.

Total size of sampled write queries, in bytes. This metric is only available when running `serverStatus` on `mongod`.

### queues

As an operation proceeds through its stages, it may enter a queue if the number of concurrent operations at the current stage exceeds a maximum threshold. This prevents excessive resource contention and provides observability into the state of the database.

**New in version 8.0**

```json
queues: {
   execution: {
      admissions: <object>,
      backgroundTasksDeprioritization: <boolean>,
      deprioritizationGate: <boolean>,
      heuristicDeprioritization: <boolean>,
      heuristicDeprioritizationThreshold: Int("<num>"),
      totalDeprioritizations: Long("<num>"),
      usesPrioritization: <boolean>,
      usesThroughputProbing: <boolean>,
      write: <object>,
      read: <object>,
      monitor: {
         timesDecreased: Long("<num>"),
         timesIncreased: Long("<num>"),
         totalAmountDecreased: Long("<num>"),
         totalAmountIncreased: Long("<num>"),
         resizeDurationMicros: Long("<num>"),
         timesProbedStable: Long("<num>"),
         timesProbedUp: Long("<num>"),
         timesProbedDown: Long("<num>")
      },
      nonDeprioritizable: <object>,
      deprioritizable: <object>,
   },
   ingress: {
      out: Long("<num>"),
      available: Long("<num>"),
      totalTickets: Long("<num>"),
      exempt: {
         addedToQueue: Long("<num>"),
         removedFromQueue: Long("<num>"),
         queueLength: Long("<num>"),
         startedProcessing: Long("<num>"),
         processing: Long("<num>"),
         finishedProcessing: Long("<num>"),
         totalTimeProcessingMicros: Long("<num>"),
         canceled: Long("<num>"),
         newAdmissions: Long("<num>"),
         totalTimeQueuedMicros: Long("<num>")
      },
      normalPriority: {
         addedToQueue: Long("<num>"),
         removedFromQueue: Long("<num>"),
         queueLength: Long("<num>"),
         startedProcessing: Long("<num>"),
         processing: Long("<num>"),
         finishedProcessing: Long("<num>"),
         totalTimeProcessingMicros: Long("<num>"),
         canceled: Long("<num>"),
         newAdmissions: Long("<num>"),
         totalTimeQueuedMicros: Long("<num>")
      }
   },
   ingressSessionEstablishment: { // Added in MongoDB 8.2
      "addedToQueue": Long("<num>"),
      "removedFromQueue": Long("<num>"),
      "interruptedInQueue": Long("<num>")
      "rejectedAdmissions": Long("<num>"),
      "exemptedAdmissions": Long("<num>"),
      "successfulAdmissions": Long("<num>"),
      "attemptedAdmissions": Long("<num>"),
      "averageTimeQueuedMicros": Long("<num>"),
      "totalAvailableTokens": Long("<num>")
   }
}
```

**New in version 8.0**

A document that returns monitoring and [queue](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#std-label-server-status-queue-information) information for operations waiting to be scheduled for execution within the storage layer (concurrent transactions).

These settings are MongoDB-specific. To change the settings for concurrent reads and write transactions (read and write tickets), see [`storageEngineConcurrentReadTransactions`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.storageEngineConcurrentReadTransactions) and [`storageEngineConcurrentWriteTransactions`.](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.storageEngineConcurrentWriteTransactions)

**Important:**

Starting in version 7.0, MongoDB uses a default algorithm to dynamically adjust the maximum number of concurrent storage engine transactions (including both read and write tickets) to optimize database throughput during overload.

The following table summarizes how to identify overload scenarios for MongoDB post-7.0 and for earlier releases:

| Version | Diagnosing Overload Scenarios |
| --- | --- |
| 7.0 and later | A large number of queued operations that persists for a prolonged period of time likely indicates an overload. A concurrent storage engine transaction (ticket) availability of 0 for a prolonged period of time **does not** indicate an overload. |
| 6.0 and earlier | A large number of queued operations that persists for a prolonged period of time likely indicates an overload. A concurrent storage engine transaction (ticket) availibility of 0 for a prolonged period of time likely indicates an overload. |

**New in version 8.3**

A histogram that tracks the distribution of completed operations by their total number of ticket acquisitions.

See the following example:

```json
admissions: {
   "1-2": 1000,
   "3-4": 500,
   "5-8": 200,
   "9-16": 50,
   "17-32": 10,
   "33-64": 5,
   "65-128": 2,
   "129-256": 1,
   "257-512": 0,
   "513-1024": 0,
   "1025+": 0
}
```

**New in version 8.3**

If `true` and [`deprioritizationGate`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.queues.execution.deprioritizationGate) is `true`, background tasks such as index builds and TTL deletions initiate as low priority.

**New in version 8.3**

If `false`, all deprioritization mechanisms are disabled.

**New in version 8.3**

If `true` and [`deprioritizationGate`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.queues.execution.deprioritizationGate) is `true`, operations that re-acquire tickets frequently are automatically deprioritized to the low-priority pool.

**New in version 8.3**

The number of ticket re-acquisitions required before an operation triggers heuristic deprioritization.

**New in version 8.3**

The cumulative count of operations that are heuristically deprioritized during the server's lifetime.

**New in version 8.3**

Indicates whether operations can be deprioritized to a separate low-priority ticket pool.

**New in version 8.3**

Indicates whether the system dynamically adjusts concurrency using the throughput probing algorithm.

**New in version 8.3**

A document containing operation metrics for non-deprioritizable operations in this queue. For fields, see [Queue Operation Execution Statistics.](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#std-label-server-status-query-operation-execution)

**New in version 8.3**

A document containing operation metrics for deprioritizable operations in this queue. For fields, see [Queue Operation Execution Statistics.](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#std-label-server-status-query-operation-execution)

Returns a document containing [Queue Information](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#std-label-server-status-queue-information) for concurrent write transactions (write tickets) allowed into the WiredTiger storage engine.

Returns a document containing [Queue Information](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#std-label-server-status-queue-information) for concurrent read transactions (read tickets) allowed into the WiredTiger storage engine.

A document that returns monitoring metrics for adjustments that the system has made to the number of allowed concurrent transactions (tickets).

The number of times the queue size was decreased.

The number of times the queue size was increased.

The total amount of operations the queue decreased by.

The total number of operations the queue increased by.

The cumulative time in milliseconds that the system spent resizing the queue.

**New in version 8.3**

The number of probing iterations in a stable state.

**New in version 8.3**

The number of probing iterations while testing increased concurrency.

**New in version 8.3**

The number of probing iterations while testing decreased concurrency.

**New in version 8.0**

A document that returns [Queue Information](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#std-label-server-status-queue-information) for ingress admission control. Use these values to protect and mitigate against resource overload by limiting the number of operations waiting for entry to the database from the network.

The maximum number of allowed concurrent operations is constrained by [`ingressAdmissionControllerTicketPoolSize`.](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.ingressAdmissionControllerTicketPoolSize)

**New in version 8.2**

*(also available in 8.1.1, 8.0.12, and 7.0.23)*

A document that contains information about the ingress session establishment queue. This includes metrics related to connections established and processed through the connection establishment rate limiter.

**New in version 8.2**

*(also available in 8.1.1, 8.0.12, and 7.0.23)*

The number of incoming connections that the server adds to the ingress session establishment queue. This metric tracks connections that are processed through the rate limiter queue when the rate limiter is enabled.

**New in version 8.2**

*(also available in 8.1.1, 8.0.12, and 7.0.23)*

The number of incoming connections that the server removes from the ingress session establishment queue after acquiring a connection establishment token. This metric tracks connections that have completed their wait in the rate limiter queue.

**New in version 8.2**

*(also available in 8.1.1, 8.0.12, and 7.0.23)*

The number of incoming connections that halt while waiting in the queue, typically due to client disconnects or server shutdown.

**New in version 8.2**

*(also available in 8.1.1, 8.0.12, and 7.0.23)*

The number of incoming connection attempts that the server rejects because the queue depth exceeded the [`ingressConnectionEstablishmentMaxQueueDepth`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.ingressConnectionEstablishmentMaxQueueDepth) limit. When this happens, the server immediately closes the connection rather than queuing it.

**New in version 8.2**

*(also available in 8.1.1, 8.0.12, and 7.0.23)*

The number of incoming connection attempts that bypass the rate limiter due to being on the [`ingressConnectionEstablishmentRateLimiterBypass`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.ingressConnectionEstablishmentRateLimiterBypass) list. Connections from IP addresses or CIDR ranges specified in [`ingressConnectionEstablishmentRateLimiterBypass`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.ingressConnectionEstablishmentRateLimiterBypass) are not subject to rate limiting.

**New in version 8.2**

*(also available in 8.1.1, 8.0.12, and 7.0.23)*

The total number of incoming connection attempts that the rate limiter successfully processes, either immediately or after waiting in the queue.

**New in version 8.2**

*(also available in 8.1.1, 8.0.12, and 7.0.23)*

The total number of incoming connection attempts on the rate limiter.

**New in version 8.2**

*(also available in 8.1.1, 8.0.12, and 7.0.23)*

The average time in microseconds that connections spend waiting in the queue before the server processes them. This metric uses an exponentially-weighted moving average formula and can be used to tune the [`ingressConnectionEstablishmentMaxQueueDepth`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.ingressConnectionEstablishmentMaxQueueDepth). The value roughly equals `(maxQueueDepth / establishRatePerSec) * 1e6`.

**New in version 8.2**

*(also available in 8.1.1, 8.0.12, and 7.0.23)*

The current number of available tokens in the token bucket. This represents the capacity for immediately processing new connections without queuing. When this value is `0`, new connections must wait in the queue, or are rejected if the queue is full.

### Queue Information

```json
out: Int("<num>"),
available: Int("<num>"),
totalTickets: Int("<num>"),
nonDeprioritizable: <object>,
deprioritizable: <object>,
exempt: {
   addedToQueue: Long("<num>"),
   removedFromQueue: Long("<num>"),
   queueLength: Long("<num>"),
   startedProcessing: Long("<num>"),
   processing: Long("<num>"),
   finishedProcessing: Long("<num>"),
   totalTimeProcessingMicros: Long("<num>"),
   canceled: Long("<num>"),
   totalTimeQueuedMicros: Long("<num>")
},
normalPriority: {
   out: Int("<num>"),
   available: Int("<num>"),
   totalTickets: Int("<num>"),
   addedToQueue: Long("<num>"),
   removedFromQueue: Long("<num>"),
   queueLength: Long("<num>"),
   startedProcessing: Long("<num>"),
   processing: Long("<num>"),
   finishedProcessing: Long("<num>"),
   totalTimeProcessingMicros: Long("<num>"),
   canceled: Long("<num>"),
   newAdmissions: Long("<num>"),
   totalTimeQueuedMicros: Long("<num>"),
   totalDelinquentAcquisitions: Long("<num>"),
   totalAcquisitionDelinquencyMillis: Long("<num>"),
   maxAcquisitionDelinquencyMillis: Long("<num>")
},
lowPriority: {
   out: Int("<num>"),
   available: Int("<num>"),
   totalTickets: Int("<num>"),
   addedToQueue: Long("<num>"),
   removedFromQueue: Long("<num>"),
   queueLength: Long("<num>"),
   startedProcessing: Long("<num>"),
   processing: Long("<num>"),
   finishedProcessing: Long("<num>"),
   totalTimeProcessingMicros: Long("<num>"),
   canceled: Long("<num>"),
   newAdmissions: Long("<num>"),
   totalTimeQueuedMicros: Long("<num>"),
   totalDelinquentAcquisitions: Long("<num>"),
   totalAcquisitionDelinquencyMillis: Long("<num>"),
   maxAcquisitionDelinquencyMillis: Long("<num>")
}
```

The total number of currently held tickets. When [`usesPrioritization`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.queues.execution.usesPrioritization) is `false`, this value only includes tickets in the normal-priority queue.

The total number of available tickets. When [`usesPrioritization`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.queues.execution.usesPrioritization) is `false`, this value only includes tickets in the normal-priority queue.

The ticket capacity across all pools. When [`usesPrioritization`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.queues.execution.usesPrioritization) is `false`, this value only includes tickets in the normal-priority queue.

**New in version 8.3**

A document containing operation metrics for non-deprioritizable operations in this queue. For fields, see [Queue Operation Execution Statistics.](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#std-label-server-status-query-operation-execution)

**New in version 8.3**

A document containing operation metrics for deprioritizable operations in this queue. For fields, see [Queue Operation Execution Statistics.](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#std-label-server-status-query-operation-execution)

A document that returns metrics for operations exempt from the queue.

The total number of operations that acquired an admission ticket.

The total number of operations that are currently being processed.

The total number of operations that released their admission ticket.

The total time operations held their admission tickets.

The total number of operations that timed out in the queue.

The total number of new admissions to the queue.

The total time operations spent waiting on the queue.

A document that returns metrics for operations subject to the queue.

The number of tickets currently held by active operations in the queue.

The number of tickets remaining for acquisition in the queue.

The total capacity of the ticket pool.

The total number of operations added to the queue.

The total number of operations removed from the queue.

The total number of operations in the queue.

The total number of operations that acquired an admission ticket.

The total number of operations that are currently being processed.

The total number of operations that released their admission ticket.

The total time operations held their admission tickets.

The total number of operations that timed out in the queue.

The total number of new admissions to the queue.

The total time that operations spend waiting on the queue.

**New in version 8.3**

The amount of tickets that are held longer than the configured delinquency threshold.

**New in version 8.3**

The cumulative excess time in milliseconds beyond the threshold for all delinquent holds in the queue.

**New in version 8.3**

The maximum excess time in milliseconds observed for any single delinquent hold in the queue.

**New in version 8.3**

A document that returns metrics for operations that were deprioritized to a separate low-priority ticket pool.

The number of tickets currently held by active operations in the low-priority queue.

The number of tickets remaining for acquisition in the low-priority queue.

The total capacity of the low-priority ticket pool.

The total number of operations added to the low-priority queue.

The total number of operations removed from the low-priority queue.

The total number of operations in the low-priority queue.

The total number of operations that acquired a low-priority admission ticket.

The total number of operations that are currently being processed with a low-priority admission ticket.

The total number of operations that released their low-priority admission ticket.

The total time operations held their low-priority admission tickets.

The total number of operations that timed out in the low-priority queue.

The total number of new admissions to the low-priority queue.

The total time operations spent waiting on the low-priority queue.

The number of ticket holds that exceed the delinquency threshold in the low-priority queue.

The cumulative excess time in milliseconds beyond the threshold for all delinquent holds in the low-priority queue.

The maximum excess time in milliseconds for any single delinquent hold in the low-priority queue.

### Queue Operation Execution Statistics

**New in version 8.3**

```json
totalElapsedTimeMicros: Long("<num>"),
totalCPUUsageMicros: Long("<num>"),
totalTimeProcessingMicros: Long("<num>"),
totalTimeQueuedMicros: Long("<num>"),
totalAdmissions: Long("<num>"),
totalOpsFinished: Long("<num>"),
totalOpsLoadShed: Long("<num>"),
totalAdmissionsLoadShed: Long("<num>"),
totalCPUUsageLoadShed: Long("<num>"),
totalElapsedTimeMicrosLoadShed: Long("<num>"),
totalQueuedTimeMicrosLoadShed: Long("<num>"),
totalDelinquentAcquisitions: Long("<num>"),
totalAcquisitionDelinquencyMillis: Long("<num>"),
maxAcquisitionDelinquencyMillis: Long("<num>")
```

The total time in microseconds for all operations in this bucket.

The total CPU time in microseconds consumed by operations in the corresponding group (short-running or long-running operations).

The total time in microseconds spent holding tickets across all acquisitions.

The total time in microseconds spent waiting for tickets across all acquisitions.

The total number of ticket acquisitions, including re-acquisitions after yields.

The number of operations that completed in this group.

The number of unique operations that are load-shed due to queue overflow.

The total number of admissions for load-shed operations.

The CPU time in microseconds consumed by operations before being shed.

The elapsed time in microseconds for operations before being shed.

The queue time in microseconds for operations before being shed.

The number of ticket holds that exceeded the delinquency threshold.

The cumulative excess time in milliseconds beyond the threshold for all delinquent holds.

The maximum excess time in milliseconds observed for any single delinquent hold.

### querySettings

**New in version 8.0**

```javascript
querySettings: {
  count: <num>,
  rejectCount: <num>,
  size: <num>
}
```

Document with configuration counts and usage for query settings.

Starting in MongoDB 8.0, use query settings instead of adding [index filters](https://www.mongodb.com/docs/manual/core/query-plans.md#std-label-index-filters). Index filters are deprecated starting in MongoDB 8.0.

Query settings have more functionality than index filters. Also, index filters aren't persistent and you cannot easily create index filters for all cluster nodes. To add query settings and explore examples, see [`setQuerySettings`.](https://www.mongodb.com/docs/manual/reference/command/setQuerySettings.md#mongodb-dbcommand-dbcmd.setQuerySettings)

Total number of query settings.

Total number of query settings that have the `reject` field set to `true`. To set the `reject` field, use `setQuerySettings`.

Total size in bytes for query settings.

### readConcernCounters

**New in version 5.0**

```javascript
readConcernCounters : {
   nonTransactionOps : {
      none : Long("<num>"),
      noneInfo : {
         CWRC : {
            local : Long("<num>"),
            available : Long("<num>"),
            majority : Long("<num>")
         },
         implicitDefault : {
            local : Long("<num>"),
            available : Long("<num>")
         }
      },
      local : Long("<num>"),
      available : Long("<num>"),
      majority : Long("<num>"),
      snapshot : {
         withClusterTime : Long("<num>"),
         withoutClusterTime : Long("<num>")
      },
      linearizable : Long("<num>")
   },
   transactionOps : {
      none : Long("<num>"),
      noneInfo : {
         CWRC : {
            local : Long("<num>"),
            available : Long("<num>"),
            majority : Long("<num>")
         },
         implicitDefault : {
            local : Long("<num>"),
            available : Long("<num>")
         }
      },
      local : Long("<num>"),
      majority : Long("<num>"),
      snapshot : {
         withClusterTime : Long("<num>"),
         withoutClusterTime : Long("<num>")
      }
   }
},
```

A document that reports on the [read concern level](https://www.mongodb.com/docs/manual/reference/read-concern.md#std-label-read-concern-levels) specified by query operations. This document contains the [`readConcernCounters.nonTransactionOps`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.readConcernCounters.nonTransactionOps) and [`readConcernCounters.transactionOps`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.readConcernCounters.transactionOps) documents.

A document that reports on the [read concern level](https://www.mongodb.com/docs/manual/reference/read-concern.md#std-label-read-concern-levels) specified by non-transaction query operations performed after the database server last started.

Number of non-transaction query operations that did not specify a read concern level and instead used either:

- the default [read concern level](https://www.mongodb.com/docs/manual/reference/read-concern.md#std-label-read-concern-levels), or

- the global default read concern configuration if it was set by the [`setDefaultRWConcern`](https://www.mongodb.com/docs/manual/reference/command/setDefaultRWConcern.md#mongodb-dbcommand-dbcmd.setDefaultRWConcern) command.

The number of non-transaction query operations that use the global default read concern and an implicit-default read concern.

The sum of the values in `readConcernCounters.nonTransactionOps.noneInfo` should equal the value of `readConcernCounters.nonTransactionOps.none`.

Number of non-transaction query operations that specified the [`"local"`](https://www.mongodb.com/docs/manual/reference/read-concern-local.md#mongodb-readconcern-readconcern.-local-) read concern level.

Number of non-transaction query operations that specified the [`"available"`](https://www.mongodb.com/docs/manual/reference/read-concern-available.md#mongodb-readconcern-readconcern.-available-) read concern level.

Number of non-transaction query operations that specified the [`"majority"`](https://www.mongodb.com/docs/manual/reference/read-concern-majority.md#mongodb-readconcern-readconcern.-majority-) read concern level.

Document containing non-transaction query operations that specified the [`"snapshot"`](https://www.mongodb.com/docs/manual/reference/read-concern-snapshot.md#mongodb-readconcern-readconcern.-snapshot-) read concern level.

Number of non-transaction query operations that specified the [`"snapshot"`](https://www.mongodb.com/docs/manual/reference/read-concern-snapshot.md#mongodb-readconcern-readconcern.-snapshot-) read concern level and the cluster time, which specified a point in time.

Number of non-transaction query operations that specified the [`"snapshot"`](https://www.mongodb.com/docs/manual/reference/read-concern-snapshot.md#mongodb-readconcern-readconcern.-snapshot-) read concern level without the cluster time, which means a point in time was omitted and the server will read the most recently committed snapshot available to the node.

Number of non-transaction query operations that specified the [`"linearizable"`](https://www.mongodb.com/docs/manual/reference/read-concern-linearizable.md#mongodb-readconcern-readconcern.-linearizable-) read concern level.

A document that reports on the [read concern level](https://www.mongodb.com/docs/manual/reference/read-concern.md#std-label-read-concern-levels) specified by transaction query operations performed after the database server last started.

Number of transaction query operations that did not specify a read concern level and instead used the default [read concern level](https://www.mongodb.com/docs/manual/reference/read-concern.md#std-label-read-concern-levels) or the global default read or write concern configuration added with the [`setDefaultRWConcern`](https://www.mongodb.com/docs/manual/reference/command/setDefaultRWConcern.md#mongodb-dbcommand-dbcmd.setDefaultRWConcern) command.

Information about the global default read concern and implicit-default read concern used by transaction query operations.

Number of transaction query operations that specified the [`"local"`](https://www.mongodb.com/docs/manual/reference/read-concern-local.md#mongodb-readconcern-readconcern.-local-) read concern level.

Number of transaction query operations that specified the [`"available"`](https://www.mongodb.com/docs/manual/reference/read-concern-available.md#mongodb-readconcern-readconcern.-available-) read concern level.

Number of transaction query operations that specified the [`"majority"`](https://www.mongodb.com/docs/manual/reference/read-concern-majority.md#mongodb-readconcern-readconcern.-majority-) read concern level.

Document containing transaction query operations that specified the [`"snapshot"`](https://www.mongodb.com/docs/manual/reference/read-concern-snapshot.md#mongodb-readconcern-readconcern.-snapshot-) read concern level.

Number of transaction query operations that specified the [`"snapshot"`](https://www.mongodb.com/docs/manual/reference/read-concern-snapshot.md#mongodb-readconcern-readconcern.-snapshot-) read concern level and the cluster time, which specified a point in time.

Number of transaction query operations that specified the [`"snapshot"`](https://www.mongodb.com/docs/manual/reference/read-concern-snapshot.md#mongodb-readconcern-readconcern.-snapshot-) read concern level without the cluster time, which means a point in time was omitted and the server will read the most recently committed snapshot available to the node.

### readPreferenceCounters

*Available starting in MongoDB 7.2 (and 7.0.3, 6.0.11).*

*Available on mongod only.*

```javascript
readPreferenceCounters : {
   executedOnPrimary : {
      primary : {
         internal : Long("<num>"),
         external : Long("<num>")
      },
      primaryPreferred : {
         internal : Long("<num>"),
         external : Long("<num>")
      },
      secondary : {
         internal : Long("<num>"),
         external : Long("<num>")
      },
      secondaryPreferred : {
         internal : Long("<num>"),
         external : Long("<num>")
      },
      nearest : {
         internal : Long("<num>"),
         external : Long("<num>")
      },
      tagged : {
         internal : Long("<num>"),
         external : Long("<num>")
      }
   },
   executedOnSecondary : {
      primary : {
         internal : Long("<num>"),
         external : Long("<num>")
      },
      primaryPreferred : {
         internal : Long("<num>"),
         external : Long("<num>")
      },
      secondary : {
         internal : Long("<num>"),
         external : Long("<num>")
      },
      secondaryPreferred : {
         internal : Long("<num>"),
         external : Long("<num>")
      },
      nearest : {
         internal : Long("<num>"),
         external : Long("<num>")
      },
      tagged : {
         internal : Long("<num>"),
         external : Long("<num>")
      }
   }
}
```

*Available on mongod only.*

A document that reports the number of operations received by this [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) node with the specified [read preference.](https://www.mongodb.com/docs/manual/core/read-preference.md#std-label-read-pref-summary)

The `tagged` sub-field refers to any read preference passed in with a [tag.](https://www.mongodb.com/docs/manual/core/read-preference-tags.md#std-label-replica-set-read-preference-tag-sets)

User-initiated operations that run through [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#std-program-mongos) increment `internal` counters and not `external` counters.

*Available on mongod only.*

A document that counts how many internal and external read preference operations the node received while serving as the primary.

*Available on mongod only.*

A document that counts how many internal and external read preference operations the node received while serving as a secondary.

### repl

```javascript
repl : {
   hosts : [
         <string>,
         <string>,
         <string>
   ],
   setName : <string>,
   setVersion : <num>,
   isWritablePrimary : <boolean>,
   secondary : <boolean>,
   primary : <hostname>,
   me : <hostname>,
   electionId : ObjectId(""),
   userWriteBlockReason : <num>,
   userWriteBlockModeCounters: {
      Unspecified: <num>,
      ClusterToClusterMigrationInProgress: <num>,
      DiskUseThresholdExceeded: <num>
   },
   primaryOnlyServices: {
      ReshardingRecipientService: { state: <string>, numInstances: <num> },
      RenameCollectionParticipantService: { state: <string>, numInstances: <num> },
      ShardingDDLCoordinator: { state: <string>, numInstances: <num> },
      ReshardingDonorService: { state: <string>, numInstances: <num> }
   },
   rbid : <num>,
   replicationProgress : [
         {
            rid : <ObjectId>,
            optime : { ts: <timestamp>, term: <num> },
            host : <hostname>,
            memberId : <num>
         },
        ...
   ]
   timestamps : {
      oldestTimestamp: <timestamp>
   }
}
```

A document that reports on the replica set configuration. [`repl`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.repl) only appear when the current host is a replica set. See [Replication](https://www.mongodb.com/docs/manual/replication.md#std-label-replication) for more information on replication.

An array of the current replica set members' hostname and port information (`"host:port"`).

A string with the name of the current replica set. This value reflects the [`--replSet`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#std-option-mongod.--replSet) command line argument, or [`replSetName`](https://www.mongodb.com/docs/manual/reference/configuration-options.md#mongodb-setting-replication.replSetName) value in the configuration file.

A boolean that indicates whether the current node is the [primary](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-primary) of the replica set.

A boolean that indicates whether the current node is a [secondary](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-secondary) member of the replica set.

The hostname and port information (`"host:port"`) of the current [primary](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-primary) member of the replica set.

The hostname and port information (`"host:port"`) for the current member of the replica set.

A numeric value that represents the reason why user writes are blocked. This field is relevant only when you set `userWriteBlockMode` to `2` to enable write-blocking.

Possible values are:

- `0`: Unspecified

- `1`: `ClusterToClusterMigrationInProgress`

- `2`: `DiskUseThresholdExceeded`

This field corresponds to the `reason` parameter specified in the [`setUserWriteBlockMode`](https://www.mongodb.com/docs/manual/reference/command/setUserWriteBlockMode.md#mongodb-dbcommand-dbcmd.setUserWriteBlockMode) command when write-blocking is enabled.

A document that contains counters tracking the number of times write-blocking is enabled with different reasons since the server started.

The number of times write-blocking is enabled with the reason `Unspecified` since the server started.

The number of times write-blocking is enabled with the reason `ClusterToClusterMigrationInProgress` since the server started.

The number of times write-blocking is enabled with the reason `DiskUseThresholdExceeded` since the server started.

Document that contains the number and status of instances of each primary service active on the server. Primary services can only start when a server is primary but can continue running to completion after the server changes state.

**New in version 5.0**

Document that contains the state and number of instances of the `ReshardingRecipientService`.

Recipients are the shards,that would own the chunks after as a result of the resharding operation, according to the new [shard key](https://www.mongodb.com/docs/manual/core/sharding-shard-key/) and [zones.](https://www.mongodb.com/docs/manual/core/zone-sharding/)

The resharding coordinator instructs each donor and recipient shard primary, to rename the temporary sharded collection. The temporary collection becomes the new resharded collection.

**New in version 5.0**

Document that contains the state and number of instances of the `RenameCollectionParticipantService`.

The `RenameCollectionParticipantService` ensures that, after a shard receives a [renameCollection](https://www.mongodb.com/docs/manual/reference/method/db.collection.renameCollection/) request, the shard is able to resume the local rename in case of system failure.

**New in version 5.0**

Document that contains the state and number of instances of the `ShardingDDLCoordinator`.

The `ShardingDDLCoordinator` service manages DDL operations for [primary](https://www.mongodb.com/docs/manual/core/replica-set-members/#std-label-replica-set-primary-member) databases such as: [create database](https://www.mongodb.com/docs/manual/core/databases-and-collections/#create-a-database), [drop database](https://www.mongodb.com/docs/manual/reference/method/db.dropDatabase/), [renameCollection.](https://www.mongodb.com/docs/manual/reference/method/db.collection.renameCollection/)

The `ShardingDDLCoordinator` ensures that one DDL operation for each database can happen at any one specific point in time within a sharded cluster.

**New in version 5.0**

Document that contains the state and number of instances of the `ReshardingDonorService`.

Donors are the shards that own chunks of the sharded collection before the rename operation completes.

The resharding coordinator instructs each donor and recipient shard primary, to rename the temporary sharded collection. The temporary collection becomes the new resharded collection.

**New in version 5.0**

[Rollback](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-rollback) identifier. Used to determine if a rollback has happened for this [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) instance.

An array with one document for each member of the replica set that reports replication process to this member. Typically this is the primary, or secondaries if using chained replication.

To include this output, you must pass the `repl` option to the [`serverStatus`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-dbcommand-dbcmd.serverStatus), as in the following:

```javascript
db.serverStatus({ "repl": 1 })
db.runCommand({ "serverStatus": 1, "repl": 1 })
```

The content of the [`repl.replicationProgress`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.repl.replicationProgress) section depends on the source of each member's replication. This section supports internal operation and is for internal and diagnostic use only.

An ObjectId used as an ID for the members of the replica set. For internal use only.

Information regarding the last operation from the [oplog](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-oplog) that the member applied, as reported from this member.

The name of the host in `[hostname]:[port]` format for the member of the replica set.

The integer identifier for this member of the replica set.

### security

```javascript
security : {
   authentication : {
      saslSupportedMechsReceived : <num>,
      mechanisms : {
         MONGODB-X509 : {
            speculativeAuthenticate : {
               received : Long("<num>"),
               successful : Long("<num>")
            },
            authenticate : {
               received : Long("<num>"),
               successful : Long("<num>")
            }
         },
         SCRAM-SHA-1 : {
            speculativeAuthenticate : {
               received : Long("<num>"),
               successful : Long("<num>")
            },
            authenticate : {
               received : Long("<num>"),
               successful : Long("<num>")
            }
         },
         SCRAM-SHA-256 : {
            speculativeAuthenticate : {
               received : Long("<num>"),
               successful : Long("<num>")
            },
            authenticate : {
               received : Long("<num>"),
               successful : Long("<num>")
            }
          }
       }
     },
     SSLServerSubjectName: <string>,
     SSLServerHasCertificateAuthority: <boolean>,
     SSLServerCertificateExpirationDate: <date>
},
```

A document that reports on:

- The number of times a given authentication mechanism has been used to authenticate against the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) or [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) instance.

- The [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) / [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) instance's TLS/SSL certificate. (Only appears for [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) or [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) instance with support for TLS)

**New in version 5.0**

The number of times a [`hello`](https://www.mongodb.com/docs/manual/reference/command/hello.md#mongodb-dbcommand-dbcmd.hello) request includes a valid [`hello.saslSupportedMechs`](https://www.mongodb.com/docs/manual/reference/command/hello.md#mongodb-data-hello.saslSupportedMechs) field.

A document that reports on the number of times a given authentication mechanism has been used to authenticate against the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) or [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) instance. The values in the document distinguish standard authentication and speculative authentication.&#x20;

**Note:**

The fields in the `mechanisms` document depend on the configuration of the [`authenticationMechanisms`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.authenticationMechanisms) parameter. The `mechanisms` document includes a field for each authentication mechanism supported by your [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) or [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) instance.

The following example shows the shape of the `mechanisms` document for a deployment that only supports [X.509](https://www.mongodb.com/docs/manual/core/security-x.509.md#std-label-security-auth-x509) authentication.

A document that reports on the number of times [X.509](https://www.mongodb.com/docs/manual/core/security-x.509.md#std-label-security-auth-x509) has been used to authenticate against the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) or [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) instance.

Includes total number of `X.509` authentication attempts and the subset of those attempts which were speculative.&#x20;

Number of speculative authentication attempts received using [X.509](https://www.mongodb.com/docs/manual/core/security-x.509.md#std-label-security-auth-x509). Includes both successful and failed speculative authentication attempts.&#x20;

Number of successful speculative authentication attempts received using X.509.&#x20;

Number of successful and failed authentication attempts received using X.509.  This value includes speculative authentication attempts received using X.509.

Number of successful authentication attempts received using x.508. This value includes successful speculative authentication attempts which used X.509.

Speculative authentication minimizes the number of network round trips during the authentication process to optimize performance.

The subject name associated with the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) / [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) instance's TLS/SSL certificate.

A boolean that is:

- `true` when the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) / [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) instance's TLS/SSL certificate is associated with a certificate authority.

- `false` when the TLS/SSL certificate is self-signed.

The expiration date and time of the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) / [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) instance's TLS/SSL certificate.

### sharding

```javascript
{
   configsvrConnectionString : 'csRS/cfg1.example.net:27019,cfg2.example.net:27019,cfg2.example.net:27019',
   lastSeenConfigServerOpTime : {
      ts : <timestamp>,
      t : Long("<num>")
   },
   maxChunkSizeInBytes : Long("<num>")
}
```

A document with data regarding the sharded cluster. The [`lastSeenConfigServerOpTime`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.sharding.lastSeenConfigServerOpTime) is present only for a [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) or a shard member, not for a config server.

The connection string for the config servers.

The latest optime of the CSRS primary that the [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#std-program-mongos) or the shard member has seen. The optime document includes:

- `ts`, the [Timestamp](https://www.mongodb.com/docs/manual/reference/bson-types.md#std-label-document-bson-type-timestamp) of the operation.

- `t`, the [`term`](https://www.mongodb.com/docs/manual/reference/command/replSetGetStatus.md#mongodb-data-replSetGetStatus.term) in which the operation was originally generated on the primary.

The [`lastSeenConfigServerOpTime`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.sharding.lastSeenConfigServerOpTime) is present only if the sharded cluster uses CSRS.

The maximum [size limit](https://www.mongodb.com/docs/manual/core/sharding-data-partitioning.md#std-label-sharding-chunk-size) for a range to migrate. If this value has been updated recently on the config server, the [`maxChunkSizeInBytes`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.sharding.maxChunkSizeInBytes) may not reflect the most recent value.

### shardingStatistics

### Shard

When run on a member of a shard:

```javascript
shardingStatistics : {
   countStaleConfigErrors : Long("<num>"),
   countDonorMoveChunkStarted : Long("<num>"),
   countDonorMoveChunkCommitted : Long("<num>"),
   countDonorMoveChunkAborted : Long("<num>"),
   totalDonorMoveChunkTimeMillis : Long("<num>"),
   totalDonorChunkCloneTimeMillis : Long("<num>"),
   totalCriticalSectionCommitTimeMillis : Long("<num>"),
   totalCriticalSectionTimeMillis : Long("<num>"),
   countDocsClonedOnRecipient : Long("<num>"),
   countBytesClonedOnRecipient : Long("<num>"),
   countDocsClonedOnCatchUpOnRecipient : Long("<num>"),
   countBytesClonedOnCatchUpOnRecipient : Long("<num>"),
   countDocsClonedOnDonor : Long("<num>"),
   countRecipientMoveChunkStarted : Long("<num>"),
   countDocsDeletedByRangeDeleter : Long("<num>"),
   countDonorMoveChunkLockTimeout : Long("<num>"),
   unfinishedMigrationFromPreviousPrimary : Long("<num>"),
   chunkMigrationConcurrency : Long("<num>"),
   unauthorizedDirectShardOps : Long("<num>"),
   countTransitionToDedicatedConfigServerStarted : Long("<num>"), // Added in MongoDB 8.0
   countTransitionToDedicatedConfigServerCompleted : Long("<num>"), // Added in MongoDB 8.0
   countTransitionFromDedicatedConfigServerCompleted : Long("<num>"), // Added in MongoDB 8.0
   databaseCriticalSectionStatistics : {  // Added in MongoDB 8.3
      totalTimeWaiting : Long("<num>"),
      activeWaitersCount : Long("<num>"),
      activeCatchupCount : Long("<num>"),
      activeCommitCount : Long("<num>"),
      totalTimeActiveCatchupMillis : Long("<num>"),
      totalTimeActiveCommitMillis : Long("<num>")
   },
   collectionCriticalSectionStatistics : {  // Added in MongoDB 8.3
      totalTimeWaiting : Long("<num>"),
      activeWaitersCount : Long("<num>"),
      activeCatchupCount : Long("<num>"),
      activeCommitCount : Long("<num>"),
      totalTimeActiveCatchupMillis : Long("<num>"),
      totalTimeActiveCommitMillis : Long("<num>")
   },
   databaseVersionUpdateCounters : {  // Added in MongoDB 8.3
      durableChanges : Long("<num>"),
      inMemoryClears : Long("<num>"),
      inMemorySets : Long("<num>"),
      inMemoryAccessTypeChanges : Long("<num>"),
      movePrimariesInProgerss : Long("<num>")
   },
   catalogCache : {
      numDatabaseEntries : Long("<num>"),
      numCollectionEntries : Long("<num>"),
      countStaleConfigErrors : Long("<num>"),
      totalRefreshWaitTimeMicros : Long("<num>"),
      numActiveIncrementalRefreshes : Long("<num>"),
      countIncrementalRefreshesStarted : Long("<num>"),
      numActiveFullRefreshes : Long("<num>"),
      countFullRefreshesStarted : Long("<num>"),
      countFailedRefreshes : Long("<num>")
   },
   rangeDeleterTasks : <num>,
   configServerInShardCache : <boolean>, // Added in MongoDB 8.0
   resharding : {
      countStarted : Long("1"),
       countSucceeded : Long("1"),
       countFailed : Long("0"),
       countCanceled : Long("0"),
       lastOpEndingChunkImbalance : Long("0"),
       active : {
               documentsCopied : Long("0"),
               bytesCopied : Long("0"),
               countWritesToStashCollections : Long("0"),
               countWritesDuringCriticalSection : Long("0"),
               countReadsDuringCriticalSection : Long("0"),
               oplogEntriesFetched : Long("0"),
               oplogEntriesApplied : Long("0"),
               insertsApplied : Long("0"),
               updatesApplied : Long("0"),
               deletesApplied : Long("0")
       },
       oldestActive : {
               coordinatorAllShardsHighestRemainingOperationTimeEstimatedMillis : Long("0"),
               coordinatorAllShardsLowestRemainingOperationTimeEstimatedMillis : Long("0"),
               recipientRemainingOperationTimeEstimatedMillis : Long("0")
       },
       latencies : {
               collectionCloningTotalRemoteBatchRetrievalTimeMillis : Long("0"),
               collectionCloningTotalRemoteBatchesRetrieved : Long("0"),
               collectionCloningTotalLocalInsertTimeMillis : Long("0"),
               collectionCloningTotalLocalInserts : Long("0"),
               oplogFetchingTotalRemoteBatchRetrievalTimeMillis : Long("0"),
               oplogFetchingTotalRemoteBatchesRetrieved : Long("0"),
               oplogFetchingTotalLocalInsertTimeMillis : Long("0"),
               oplogFetchingTotalLocalInserts : Long("0"),
               oplogApplyingTotalLocalBatchRetrievalTimeMillis : Long("0"),
               oplogApplyingTotalLocalBatchesRetrieved : Long("0"),
               oplogApplyingTotalLocalBatchApplyTimeMillis : Long("0"),
               oplogApplyingTotalLocalBatchesApplied : Long("0")
       },
       currentInSteps : {
               countInstancesInCoordinatorState1Initializing : Long("0"),
               countInstancesInCoordinatorState2PreparingToDonate : Long("0"),
               countInstancesInCoordinatorState3Cloning : Long("0"),
               countInstancesInCoordinatorState4Applying : Long("0"),
               countInstancesInCoordinatorState5BlockingWrites : Long("0"),
               countInstancesInCoordinatorState6Aborting : Long("0"),
               countInstancesInCoordinatorState7Committing : Long("-1"),
               countInstancesInRecipientState1AwaitingFetchTimestamp : Long("0"),
               countInstancesInRecipientState2CreatingCollection : Long("0"),
               countInstancesInRecipientState3Cloning : Long("0"),
               countInstancesInRecipientState4Applying : Long("0"),
               countInstancesInRecipientState5Error : Long("0"),
               countInstancesInRecipientState6StrictConsistency : Long("0"),
               countInstancesInRecipientState7Done : Long("0"),
               countInstancesInDonorState1PreparingToDonate : Long("0"),
               countInstancesInDonorState2DonatingInitialData : Long("0"),
               countInstancesInDonorState3DonatingOplogEntries : Long("0"),
               countInstancesInDonorState4PreparingToBlockWrites : Long("0"),
               countInstancesInDonorState5Error : Long("0"),
               countInstancesInDonorState6BlockingWrites : Long("0"),
               countInstancesInDonorState7Done : Long("0")
       }
    }
   }
},
```

A document which contains metrics on metadata refresh on sharded clusters.

The total number of times that threads hit stale config exception. Since a stale config exception triggers a refresh of the metadata, this number is roughly proportional to the number of metadata refreshes.

*Only present when run on a shard.*

The total number of times that MongoDB starts the [`moveChunk`](https://www.mongodb.com/docs/manual/reference/command/moveChunk.md#mongodb-dbcommand-dbcmd.moveChunk) command or [`moveRange`](https://www.mongodb.com/docs/manual/reference/command/moveRange.md#mongodb-dbcommand-dbcmd.moveRange) command on the primary node of the shard as part of the [range migration procedure](https://www.mongodb.com/docs/manual/core/sharding-balancer-administration.md#std-label-range-migration-procedure). This increasing number does not consider whether the chunk migrations succeed or not.

*Only present when run on a shard.*

The total number of chunk migrations that MongoDB commits on the primary node of the shard.

The chunk migration is performed by [`moveChunk`](https://www.mongodb.com/docs/manual/reference/command/moveChunk.md#mongodb-dbcommand-dbcmd.moveChunk) and [`moveRange`](https://www.mongodb.com/docs/manual/reference/command/moveRange.md#mongodb-dbcommand-dbcmd.moveRange) commands in a [range migration procedure.](https://www.mongodb.com/docs/manual/core/sharding-balancer-administration.md#std-label-range-migration-procedure)

*Only available on a shard.*

Available starting in MongoDB 7.1 (and 7.0, 6.3.2, 6.0.6, and 5.0.18).

The total number of chunk migrations that MongoDB aborts on the primary node of the shard.

The chunk migration is performed by [`moveChunk`](https://www.mongodb.com/docs/manual/reference/command/moveChunk.md#mongodb-dbcommand-dbcmd.moveChunk) and [`moveRange`](https://www.mongodb.com/docs/manual/reference/command/moveRange.md#mongodb-dbcommand-dbcmd.moveRange) commands in a [range migration procedure.](https://www.mongodb.com/docs/manual/core/sharding-balancer-administration.md#std-label-range-migration-procedure)

*Only available on a shard.*

Available starting in MongoDB 7.1 (and 7.0, 6.3.2, 6.0.6, and 5.0.18).

Cumulative time in milliseconds to move chunks from the current shard to another shard. For each chunk migration, the time starts when a [`moveRange`](https://www.mongodb.com/docs/manual/reference/command/moveRange.md#mongodb-dbcommand-dbcmd.moveRange) or [`moveChunk`](https://www.mongodb.com/docs/manual/reference/command/moveChunk.md#mongodb-dbcommand-dbcmd.moveChunk) command starts, and ends when the chunk is moved to another shard in a [range migration procedure.](https://www.mongodb.com/docs/manual/core/sharding-balancer-administration.md#std-label-range-migration-procedure)

*Only available on a shard.*

Available starting in MongoDB 7.1 (and 7.0, 6.3.2, 6.0.6, and 5.0.18).

The cumulative time, in milliseconds, that the [clone phase of the range migration procedure](https://www.mongodb.com/docs/manual/core/sharding-balancer-administration.md#std-label-range-migration-procedure) takes on the primary node of the shard.  Specifically, for each migration on this shard, the tracked time starts with the [`moveRange`](https://www.mongodb.com/docs/manual/reference/command/moveRange.md#mongodb-dbcommand-dbcmd.moveRange) and [`moveChunk`](https://www.mongodb.com/docs/manual/reference/command/moveChunk.md#mongodb-dbcommand-dbcmd.moveChunk) commands and ends before the destination shard enters a `catchup` phase to apply changes that occurred during the [range migration procedure.](https://www.mongodb.com/docs/manual/core/sharding-balancer-administration.md#std-label-range-migration-procedure)

*Only present when run on a shard.*

The cumulative time, in milliseconds, that the [update metadata phase of the range migrations procedure](https://www.mongodb.com/docs/manual/core/sharding-balancer-administration.md#std-label-range-migration-procedure) takes on the primary node of the shard. During the update metadata phase, MongoDB blocks all operations on the collection.

*Only present when run on a shard.*

The cumulative time, in milliseconds, that the [catch-up phase and the update metadata phase of the range migration procedure](https://www.mongodb.com/docs/manual/core/sharding-balancer-administration.md#std-label-range-migration-procedure) takes on the primary node of the shard.

To calculate the duration of the catch-up phase, subtract [`totalCriticalSectionCommitTimeMillis`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.shardingStatistics.totalCriticalSectionCommitTimeMillis) from [`totalCriticalSectionTimeMillis`:](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.shardingStatistics.totalCriticalSectionTimeMillis)

```none
totalCriticalSectionTimeMillis - totalCriticalSectionCommitTimeMillis
```

*Only present when run on a shard.*

The cumulative, always-increasing count of documents that MongoDB clones on the primary node of the recipient shard.

*Only present when run on a shard.*

The cumulative number of bytes that MongoDB clones on the primary node of the recipient shard during the [range migration procedure.](https://www.mongodb.com/docs/manual/core/sharding-balancer-administration.md#std-label-range-migration-procedure)

For details about data synchronization, see [Replica Set Data Synchronization.](https://www.mongodb.com/docs/manual/core/replica-set-sync.md#std-label-replica-set-sync)

*Only available on a shard.*

Available starting in MongoDB 7.1 (and 7.0, 6.3.2, 6.0.6, and 5.0.18).

The cumulative number of documents that MongoDB clones on the primary node of the recipient shard during the catch-up phase of the [range migration procedure.](https://www.mongodb.com/docs/manual/core/sharding-balancer-administration.md#std-label-range-migration-procedure)

For details about data synchronization, see [Replica Set Data Synchronization.](https://www.mongodb.com/docs/manual/core/replica-set-sync.md#std-label-replica-set-sync)

*Only available on a shard.*

Available starting in MongoDB 7.1 (and 7.0, 6.3.2, 6.0.6, and 5.0.18).

The cumulative number of bytes that MongoDB clones on the primary node of the recipient shard during the catch-up phase of the [range migration procedure.](https://www.mongodb.com/docs/manual/core/sharding-balancer-administration.md#std-label-range-migration-procedure)

For details about data synchronization, see [Replica Set Data Synchronization.](https://www.mongodb.com/docs/manual/core/replica-set-sync.md#std-label-replica-set-sync)

*Only available on a shard.*

Available starting in MongoDB 7.1 (and 7.0, 6.3.2, 6.0.6, and 5.0.18).

The cumulative, always-increasing count of documents that MongoDB clones on the primary node of the donor shard.

*Only present when run on a shard.*

Cumulative, always-increasing count of chunks this member, acting as the primary of the recipient shard, has started to receive (whether the move has succeeded or not).

*Only present when run on a shard.*

The cumulative, always-increasing count of documents that MongoDB deletes on the primary node of the donor shard during chunk migration.

*Only present when run on a shard.*

**Changed in version 7.1**

The cumulative, always-increasing count of chunk migrations that MongoDB aborts on the primary node of the donor shard due to lock acquisition timeouts.

*Only present when run on a shard.*

The number of unfinished migrations left by the previous primary after an election. This value is only updated after the newly-elected [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) completes the transition to primary.

*Only present when run on a shard.*

The number of threads on the source shard and the receiving shard for performing [chunk migration](https://www.mongodb.com/docs/manual/tutorial/migrate-chunks-in-sharded-cluster.md#std-label-migrate-chunks-sharded-cluster) operations.

*Only present when run on a shard.*

*Available starting in MongoDB 6.3 (and 5.0.15).*

The number of direct shard operations attempted without sufficient authorization.  If the operation generates a warning rather than an error, `unauthorizedDirectShardOps` might count it more than once.

On a sharded cluster with a single shard, you can control this counter by setting the `directConnectionChecksWithSingleShard` parameter to `true`.

A document with statistics about the critical sections for databases, including counts of how many operations hold the critical section, how many are waiting, and how long they have waited.

**New in version 8.3**

A document with statistics about the critical sections for collections, including counts of how many operations hold the critical section, how many are waiting, and how long they have waited.

**New in version 8.3**

A document with counters that track updates to the sharding database version, including information on how many sets, clears, access changes, and durable changes have been made since the server started.

**New in version 8.3**

A document with statistics about the cluster's routing information cache.

The total number of database entries that are currently in the catalog cache.

The total number of collection entries (across all databases) that are currently in the catalog cache.

The total number of times that threads hit stale config exception. A stale config exception triggers a refresh of the metadata.

The cumulative time, in microseconds, that threads had to wait for a refresh of the metadata.

The number of incremental catalog cache refreshes that are currently waiting to complete.

The cumulative number of incremental refreshes that have started.

The number of full catalog cache refreshes that are currently waiting to complete.

The cumulative number of full refreshes that have started.

The cumulative number of full or incremental refreshes that have failed.

Number of times the [`transitionToDedicatedConfigServer`](https://www.mongodb.com/docs/manual/reference/command/transitionToDedicatedConfigServer.md#mongodb-dbcommand-dbcmd.transitionToDedicatedConfigServer) command has started.

*Only present when run on a config server node.*

**New in version 8.0**

Number of times the [`transitionToDedicatedConfigServer`](https://www.mongodb.com/docs/manual/reference/command/transitionToDedicatedConfigServer.md#mongodb-dbcommand-dbcmd.transitionToDedicatedConfigServer) command has finished.

*Only present when run on a config server node.*

**New in version 8.0**

Number of times the [`transitionFromDedicatedConfigServer`](https://www.mongodb.com/docs/manual/reference/command/transitionFromDedicatedConfigServer.md#mongodb-dbcommand-dbcmd.transitionFromDedicatedConfigServer) command has finished.

*Only present when run on a config server node.*

**New in version 8.0**

The current total of the queued chunk range deletion tasks that are ready to run or are running as part of the [range migration procedure.](https://www.mongodb.com/docs/manual/core/sharding-balancer-administration.md#std-label-range-migration-procedure)

Inspect the documents in the [`config.rangeDeletions`](https://www.mongodb.com/docs/manual/reference/config-database.md#mongodb-data-config.rangeDeletions) collection for information about the chunk ranges pending deletion from a shard after a chunk migration.

*Only present when run on a shard member.*

A boolean that indicates whether the config server is a [config shard](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-config-shard). This value periodically refreshes, so the value of `configServerInShardCache` might be stale for up to approximately one minute in a healthy cluster. If the node can't communicate with the config server, `configServerInShardCache` may remain stale for a longer period.

A document with statistics about [resharding operations.](https://www.mongodb.com/docs/manual/core/sharding-reshard-a-collection.md#std-label-sharding-resharding)

Each shard returns its own resharding operation statistics. If a shard is not involved in a resharding operation, then that shard will not contain statistics about the resharding operation.

*Only present when run on a shard or config server.*

**New in version 5.0**

The sum of [`countSucceeded`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.shardingStatistics.resharding.countSucceeded), [`countFailed`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.shardingStatistics.resharding.countFailed), and [`countCanceled`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.shardingStatistics.resharding.countCanceled). The sum is further incremented by `1` if a [resharding operation](https://www.mongodb.com/docs/manual/core/sharding-reshard-a-collection.md#std-label-sharding-resharding) has started but has not yet completed. Sum is set to 0 when [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) is started or restarted.

*Only present when run on a shard or config server.*

**New in version 5.0**

Number of successful [resharding operations](https://www.mongodb.com/docs/manual/core/sharding-reshard-a-collection.md#std-label-sharding-resharding). Number is set to 0 when [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) is started or restarted.

*Only present when run on a shard or config server.*

**New in version 5.0**

Number of failed [resharding operations](https://www.mongodb.com/docs/manual/core/sharding-reshard-a-collection.md#std-label-sharding-resharding). Number is set to 0 when [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) is started or restarted.

*Only present when run on a shard or config server.*

**New in version 5.0**

Number of canceled [resharding operations](https://www.mongodb.com/docs/manual/core/sharding-reshard-a-collection.md#std-label-sharding-resharding). Number is set to 0 when [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) is started or restarted.

*Only present when run on a shard or config server.*

**New in version 5.0**

Number of documents copied from donor shards to recipient shards for the current [resharding operation](https://www.mongodb.com/docs/manual/core/sharding-reshard-a-collection.md#std-label-sharding-resharding). Number is set to 0 when a new resharding operation starts.

*Only present when run on a shard or config server. Returns 0 on a
config server.*

**New in version 5.0**

*Updated in version 6.1*

Number of bytes copied from donor shards to recipient shards for the current [resharding operation](https://www.mongodb.com/docs/manual/core/sharding-reshard-a-collection.md#std-label-sharding-resharding). Number is set to 0 when a new resharding operation starts.

*Only present when run on a shard or config server. Returns 0 on a
config server.*

**New in version 5.0**

*Updated in version 6.1*

During resharding, the number of writes to the recipient stash collections.

**New in version 6.1**

Number of writes perfomed in the critical section for the current [resharding operation](https://www.mongodb.com/docs/manual/core/sharding-reshard-a-collection.md#std-label-sharding-resharding). The critical section prevents new incoming writes to the collection currently being resharded. Number is set to 0 when a new resharding operation starts.

*Only present when run on a shard or config server. Returns 0 on a
config server.*

**New in version 5.0**

*Updated in version 6.1*

During resharding, the number of reads attempted during the donor's critical section.

**New in version 6.1**

Number of entries fetched from the [oplog](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-oplog) for the current [resharding operation](https://www.mongodb.com/docs/manual/core/sharding-reshard-a-collection.md#std-label-sharding-resharding). Number is set to 0 when a new resharding operation starts.

*Only present when run on a shard or config server. Returns 0 on a
config server.*

*Updated in version 6.1*

Number of entries applied to the [oplog](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-oplog) for the current [resharding operation](https://www.mongodb.com/docs/manual/core/sharding-reshard-a-collection.md#std-label-sharding-resharding). Number is set to 0 when a new resharding operation starts.

*Only present when run on a shard or config server. Returns 0 on a
config server.*

**New in version 5.0**

*Updated in version 6.1*

The total number of insert operations applied during resharding.

**New in version 6.1**

The total number of update operations applied during resharding.

**New in version 6.1**

The total number of delete operations applied during resharding.

**New in version 6.1**

Calculated across all shards, the highest estimate of the number of seconds remaining. If the time estimate cannot be computed, the value is set to -1.

**New in version 6.1**

Calculated across all shards, the lowest estimate of the number of seconds remaining. If the time estimate cannot be computed, the value is set to -1.

**New in version 6.1**

Estimated remaining time, in milliseconds, for the current resharding operation. Prior to [resharding](https://www.mongodb.com/docs/manual/core/sharding-reshard-a-collection.md#std-label-sharding-resharding), or when the time cannot be calculated, the value is set to -1.

If a shard is involved in multiple resharding operations, this field contains the remaining time estimate for the oldest resharding operation where this shard is a recipient.

**New in version 6.1**

Total elapsed time, in milliseconds, for the current [resharding operation](https://www.mongodb.com/docs/manual/core/sharding-reshard-a-collection.md#std-label-sharding-resharding). Time is set to 0 when a new resharding operation starts.

*Only present when run on a shard or config server. Returns 0 on a
config server.*

**New in version 5.0**

Timing metrics for resharding operations.

**New in version 6.1**

Total time recipients spent retrieving batches of documents from donors, in milliseconds.

**New in version 6.1**

Total number of batches of documents recipients retrieved from donors.

**New in version 6.1**

Total time recipients spent inserting batches of documents from donors, in milliseconds.

**New in version 6.1**

Total number of batches of documents from donors that recipients inserted.

**New in version 6.1**

Total time recipients spent retrieving batches of oplog entries from donors, in milliseconds.

**New in version 6.1**

Total number of batches of oplog entries recipients retrieved from donors.

**New in version 6.1**

Total time recipients spent inserting batches of oplog entries from donors, in milliseconds.

**New in version 6.1**

Total number of batches of oplog entries from donors that recipients inserted.

**New in version 6.1**

Total time recipients spent retrieving batches of oplog entries that were inserted during fetching, in milliseconds.

**New in version 6.1**

Total number of batches of oplog entries that were inserted during fetching that recipients retrieved.

**New in version 6.1**

Total time recipients spent applying batches of oplog entries, in milliseconds.

**New in version 6.1**

Total number of batches of oplog entries that recipients applied.

**New in version 6.1**

Total elapsed time, in milliseconds, for the apply step of the current [resharding operation](https://www.mongodb.com/docs/manual/core/sharding-reshard-a-collection.md#std-label-sharding-resharding). In the apply step, recipient shards modify their data based on new incoming writes from donor shards. Time is set to 0 when a new resharding operation starts.

*Only present when run on a shard or config server. Returns 0 on a
config server.*

**New in version 5.0**

Total elapsed time, in milliseconds, for the critical section of the current [resharding operation](https://www.mongodb.com/docs/manual/core/sharding-reshard-a-collection.md#std-label-sharding-resharding). The critical section prevents new incoming writes to the collection currently being resharded. Time is set to 0 when a new resharding operation starts.

*Only present when run on a shard or config server. Returns 0 on a
config server.*

**New in version 5.0**

State of the donor shard for the current [resharding operation](https://www.mongodb.com/docs/manual/core/sharding-reshard-a-collection.md#std-label-sharding-resharding). Number is set to 0 when a new resharding operation starts.

| Number Returned | Meaning | Description |
| --- | --- | --- |
| 0 | `unused` | The shard is not a donor in the current resharding operation. |
| 1 | `preparing-to-donate` | The donor shard is preparing to donate data to the recipient shards. |
| 2 | `donating-initial-data` | The donor shard is donating data to the recipient shards. |
| 3 | `donating-oplog-entries` | The donor shard is donating [oplog](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-oplog) entries to the recipient shards. |
| 4 | `preparing-to-block-writes` | The donor shard is about to prevent new incoming write operations to the collection that is being resharded. |
| 5 | `error` | An error occurred during the resharding operation. |
| 6 | `blocking-writes` | The donor shard is preventing new incoming write operations and the donor shard has notified all recipient shards that new incoming writes are prevented. |
| 7 | `done` | The donor shard has dropped the old sharded collection and the resharding operation is complete. |

*Only present when run on a shard or config server. Returns 0 on a
config server.*

**New in version 5.0**

State of the recipient shard for the current [resharding operation](https://www.mongodb.com/docs/manual/core/sharding-reshard-a-collection.md#std-label-sharding-resharding). Number is set to 0 when a new resharding operation starts.

| Number Returned | Meaning | Description |
| --- | --- | --- |
| 0 | `unused` | Shard is not a recipient in the current resharding operation. |
| 1 | `awaiting-fetch-timestamp` | The recipient shard is waiting for the donor shards to be prepared to donate their data |
| 2 | `creating-collection` | The recipient shard is creating the new sharded collection. |
| 3 | `cloning` | The recipient shard is receiving data from the donor shards. |
| 4 | `applying` | The recipient shard is applying [oplog](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-oplog) entries to modify its copy of the data based on the new incoming writes from donor shards. |
| 5 | `error` | An error occurred during the resharding operation. |
| 6 | `strict-consistency` | The recipient shard has all data changes stored in a temporary collection. |
| 7 | `done` | The resharding operation is complete. |

*Only present when run on a shard or config server. Returns 0 on a
config server.*

**New in version 5.0**

Indicates the number of shards targeted for `CRUD` operations and aggregation commands. When a `CRUD` operation or aggregation command is run, the following metrics increment.

| Name | Description |
| --- | --- |
| `allShards` | A command targeted all shards |
| `manyShards` | A command targeted more than one shard |
| `oneShard` | A command targeted one shard |
| `unsharded` | A command was run on an unsharded collection |

**Note:**

Running the [`serverStatus`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-dbcommand-dbcmd.serverStatus) command on [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) provides insight into the CRUD and aggregation operations that run on a sharded cluster.

Multi-shard operations can either be [scatter-gather](https://www.mongodb.com/docs/manual/core/sharding-choose-a-shard-key.md#std-label-sharding-query-patterns) or shard specific. Multi-shard scatter-gather operations can [consume more resources](https://www.mongodb.com/docs/manual/core/sharding-troubleshooting-shard-keys.md#std-label-sharding-troubleshooting-scatter-gather). By using the [`shardingStatistics.numHostsTargeted`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.shardingStatistics.numHostsTargeted) metrics you can tune the aggregation queries that run on a sharded cluster.

State of the resharding coordinator for the current [resharding operation](https://www.mongodb.com/docs/manual/core/sharding-reshard-a-collection.md#std-label-sharding-resharding). The resharding coordinator is a thread that runs on the [config server](https://www.mongodb.com/docs/manual/core/sharded-cluster-config-servers.md#std-label-sharding-config-server) primary. Number is set to 0 when a new resharding operation starts.

| Number Returned | Meaning | Description |
| --- | --- | --- |
| 0 | `unused` | The shard is not the coordinator in the current resharding operation. |
| 1 | `initializing` | The resharding coordinator has inserted the coordinator document into `config.reshardingOperations` and has added the `reshardingFields` to the `config.collections` entry for the original collection. |
| 2 | `preparing-to-donate` | The resharding coordinator has created a `config.collections` entry for the temporary resharding collection.; has inserted entries into `config.chunks` for ranges based on the new shard key.; has inserted entries into `config.tags` for any zones associated with the new shard key. The coordinator informs participant shards to begin the resharding operation. The coordinator then waits until all donor shards have picked a `minFetchTimestamp` and are ready to donate. |
| 3 | `cloning` | The resharding coordinator informs donor shards to donate data to recipient shards. The coordinator waits for all recipients to finish cloning the data from the donor. |
| 4 | `applying` | The resharding coordinator informs recipient shards to modify their copies of data based on new incoming writes from donor shards. The coordinator waits for all recipients to finish applying [oplog](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-oplog) entries. |
| 5 | `blocking-writes` | The resharding coordinator informs donor shards to prevent new incoming write operations to the collection being resharded. The coordinator then waits for all recipients to have all data changes. |
| 6 | `aborting` | An unrecoverable error occurred during the resharding operation or the [`abortReshardCollection`](https://www.mongodb.com/docs/manual/reference/command/abortReshardCollection.md#mongodb-dbcommand-dbcmd.abortReshardCollection) command (or the [`sh.abortReshardCollection()`](https://www.mongodb.com/docs/manual/reference/method/sh.abortReshardCollection.md#mongodb-method-sh.abortReshardCollection) method) was run. |
| 6 | `committing` | The resharding coordinator removes the `config.collections` entry for the temporary resharding collection. The coordinator then adds the `recipientFields` to the source collection's entry. |

*Only present when run on a shard or config server.*

**New in version 5.0**

Status for the current [resharding operation.](https://www.mongodb.com/docs/manual/core/sharding-reshard-a-collection.md#std-label-sharding-resharding)

| Number Returned | Description |
| --- | --- |
| -1 | Resharding operation not in progress. |
| 0 | Resharding operation succeeded. |
| 1 | Resharding operation failed. |
| 2 | Resharding operation canceled. |

*Only present when run on a shard or config server.*

**New in version 5.0**

This field contains the highest numeric difference for (`maxNumChunksInShard - minNumChunksInShard`) among all [zones](https://www.mongodb.com/docs/manual/core/zone-sharding.md#std-label-zone-sharding) for the collection that was processed by the most recent [resharding operation.](https://www.mongodb.com/docs/manual/core/sharding-reshard-a-collection.md#std-label-resharding_process)

See [Range Size.](https://www.mongodb.com/docs/manual/core/sharding-data-partitioning.md#std-label-sharding-chunk-size)

*Only updated on config servers.*

**New in version 5.0**

### shardedIndexConsistency

```javascript
shardedIndexConsistency : {
   numShardedCollectionsWithInconsistentIndexes : Long("<num>")
},
```

*Available only on config server instances.*

A document that returns results of index consistency checks for sharded collections.

The returned metrics are meaningful only when run on the primary of the [config server replica set](https://www.mongodb.com/docs/manual/core/sharded-cluster-config-servers.md#std-label-sharding-config-server) for a sharded cluster.

**See also:**

- [`enableShardedIndexConsistencyCheck`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.enableShardedIndexConsistencyCheck) parameter

- [`shardedIndexConsistencyCheckIntervalMS`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.shardedIndexConsistencyCheckIntervalMS) parameter

*Available only on config server instances.*

Number of sharded collections whose indexes are inconsistent across the shards. A sharded collection has an inconsistent index if the collection does not have the exact same indexes (including the index options) on each shard that contains chunks for the collection.

To investigate if a sharded collection has inconsistent indexes, see [Find Inconsistent Indexes Across Shards.](https://www.mongodb.com/docs/manual/tutorial/manage-indexes.md#std-label-manage-indexes-find-inconsistent-indexes)

The returned metrics are meaningful only when run on the primary of the [config server replica set](https://www.mongodb.com/docs/manual/core/sharded-cluster-config-servers.md#std-label-sharding-config-server) for a sharded cluster.

**See also:**

- [`enableShardedIndexConsistencyCheck`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.enableShardedIndexConsistencyCheck) parameter

- [`shardedIndexConsistencyCheckIntervalMS`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.shardedIndexConsistencyCheckIntervalMS) parameter

### spillWiredTiger

```javascript
spillWiredTiger: {
  storageSize: <long>,
  uri: <string>,
  version: <string>,
  'block-manager': {
    'blocks read': <num>,
    'blocks written': <num>,
    'bytes read': <num>,
    'bytes written': <num>
  },
  cache: {
    'application thread time evicting (usecs)': <num>,
    'application threads eviction requested with cache fill ratio < 25%': <num>,
    'application threads eviction requested with cache fill ratio >= 75%': <num>,
    'application threads page write from cache to disk count': <num>,
    'application threads page write from cache to disk time (usecs)': <num>,
    'bytes allocated for updates': <num>,
    'bytes currently in the cache': <num>,
    'bytes read into cache': <num>,
    'bytes written from cache': <num>,
    'eviction currently operating in aggressive mode': <num>,
    'eviction empty score': <num>,
    'eviction state': <num>,
    'eviction walk target strategy clean pages': <num>,
    'eviction walk target strategy dirty pages': <num>,
    'eviction walk target strategy pages with updates': <num>,
    'forced eviction - pages evicted that were clean count': <num>,
    'forced eviction - pages evicted that were dirty count': <num>,
    'forced eviction - pages selected count': <num>,
    'forced eviction - pages selected unable to be evicted count': <num>,
    'hazard pointer blocked page eviction': <num>,
    'maximum bytes configured': <num>,
    'maximum page size seen at eviction': <num>,
    'number of times dirty trigger was reached': <num>,
    'number of times eviction trigger was reached': <num>,
    'number of times updates trigger was reached': <num>,
    'page evict attempts by application threads': <num>,
    'page evict failures by application threads': <num>,
    'pages queued for eviction': <num>,
    'pages queued for urgent eviction': <num>,
    'tracked dirty bytes in the cache': <num>
  }
}
```

A document that contains metrics on the WiredTiger **spill instance**. When MongoDB writes to disk to fulfill certain operations, it utilizes a separate WiredTiger instance, which contains its own in-memory cache. This separate cache isolates operations from the main WiredTiger cache.

The `spillWiredTiger` document contains a subset of the fields reported in the [wiredTiger](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#std-label-server-status-wiredTiger) document. The `spillWiredTiger` document only appears when using the WiredTiger storage engine. For details on the `spillWiredTiger` metrics, see the corresponding `wiredTiger` metric description.

### storageEngine

```javascript
storageEngine : {
   name : <string>,
   supportsCommittedReads : <boolean>,
   persistent : <boolean>
},
```

A document with data about the current storage engine.

The name of the current storage engine.

A boolean that indicates whether the storage engine supports [`"majority"`](https://www.mongodb.com/docs/manual/reference/read-concern-majority.md#mongodb-readconcern-readconcern.-majority-) [read concern.](https://www.mongodb.com/docs/manual/reference/read-concern.md#std-label-read-concern)

A boolean that indicates whether the [storage engine](https://www.mongodb.com/docs/manual/core/storage-engines.md#std-label-storage-engines) does or does not persist data to disk.

### tcmalloc

**Note:**

`tcmalloc` metrics that are only for internal use are omitted from this page.

```javascript
tcmalloc : {
   usingPerCPUCaches : <boolean>,  // Added in MongoDB 8.0
   maxPerCPUCacheSizeBytes : <integer>, // Added in MongoDB 8.0
   generic : {
      current_allocated_bytes : <integer>,
      heap_size : <integer>,
      peak_memory_usage : <integer>  // Added in MongoDB 8.0
   },
   tcmalloc : {
      central_cache_free : <integer>,
      cpu_free : <integer>,  // Added in MongoDB 8.0
      release_rate : <integer>,
      total_bytes_held : <integer>,  // Added in MongoDB 8.0
      cpuCache : {
         0 : {
            overflows : <integer>,  // Added in MongoDB 8.0
            underflows : <integer>  // Added in MongoDB 8.0
         },
      }
   },
   tcmalloc_derived : {
      total_free_bytes : <integer>  // Added in MongoDB 8.0
   }
}
```

**Note:**

Starting in version 8.0, MongoDB uses an updated version of TCMalloc that improves memory fragmentation and management. See [tcmalloc upgrade](https://www.mongodb.com/docs/manual/release-notes/8.0.md#std-label-8.0-tcmalloc-upgrade) for more information.

A document that contains information on memory allocation for the server. By default, `tcmalloc` metrics are included in the `serverStatus` output. To change the verbosity of the `tcmalloc` section, specify an integer between `0` and `3` (inclusive):

- If you set verbosity to `0`, `tcmalloc` metrics aren't included in the `serverStatus` output.

- If you set verbosity to `1`, the `serverStatus` output includes the default `tcmalloc` metrics.

- If you set verbosity to `2`, the `serverStatus` output includes default `tcmalloc` metrics and the [`tcmalloc.tcmalloc.cpuCache`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.tcmalloc.tcmalloc.cpuCache) section.

- If you set verbosity to `3`, the `serverStatus` output includes all `tcmalloc` metrics.

If you specify a value higher than `3`, MongoDB sets the `verbosity` to `3`.

For example, to call `serverStatus` with `verbosity` set to `2`, run the following command:

```javascript
db.runCommand( { serverStatus: 1, tcmalloc: 2 } )
```

**See also:**

[TCMalloc Stats](https://google.github.io/tcmalloc/stats.html)

A boolean that indicates whether TCMalloc is running with per-CPU caches. If `tcmalloc.usingPerCPUCaches` is `false`, ensure that:

- You [disabled glibc rseq.](https://www.mongodb.com/docs/manual/administration/tcmalloc-performance.md#std-label-tcmalloc-disable-glibc-rseq)

- You're using Linux [kernel version](https://www.mongodb.com/docs/manual/administration/tcmalloc-performance.md#std-label-tcmalloc-kernel-version) 4.18 or later.

**New in version 8.0**

Maximum size, in bytes, of each CPU cache.

**New in version 8.0**

Total amount of memory, in bytes, allocated by MongoDB and sampled by TCMalloc.

**New in version 8.0**

Total number of bytes that are currently allocated to memory and actively used by MongoDB.

Amount of memory, in bytes, allocated from the operating system. This value includes memory that's currently in use and memory that's been allocated but isn't in use.

Amount of memory, in bytes, held in the central free list. The central free list is a structure that manages free memory for reuse.

Amount of free memory, in bytes, available across all CPU caches.

**New in version 8.0**

Amount of memory, in bytes, currently held in caches.

**New in version 8.0**

Rate, in bytes per second, at which unused memory is released to the operating system. The [`tcmallocReleaseRate`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.tcmallocReleaseRate) parameter determines the value of `tcmalloc.tcmalloc.release_rate`.

A document that provides data on each CPU cache.

`cpuCache` metrics are excluded at the default verbosity level. To view `cpuCache` metrics, you must set the `tcmalloc` verbosity to at least `2`.

**New in version 8.0**

Number of overflows that the CPU cache experienced. Overflows occur when a user deallocates memory and the cache is full.

**New in version 8.0**

Number of underflows that the CPU cache experienced. Underflows occur when a user allocates memory and the cache is empty.

**New in version 8.0**

Amount of memory remaining before `tcmalloc` has to request for more memory from the operating system.

**New in version 8.0**

### transactions

### mongod

```javascript
transactions : {
   retriedCommandsCount : Long("<num>"),
   retriedStatementsCount : Long("<num>"),
   transactionsCollectionWriteCount : Long("<num>"),
   currentActive : Long("<num>"),
   currentInactive : Long("<num>"),
   currentOpen : Long("<num>"),
   totalAborted : Long("<num>"),
   totalCommitted : Long("<num>"),
   totalStarted : Long("<num>"),
   totalPrepared : Long("<num>"),
   totalPreparedThenCommitted : Long("<num>"),
   totalPreparedThenAborted :  Long("<num>"),
   currentPrepared :  Long("<num>"),
   lastCommittedTransaction : <document>
},
```

When run on a [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod), a document with data about the [retryable writes](https://www.mongodb.com/docs/manual/core/retryable-writes.md#std-label-retryable-writes) and [transactions.](https://www.mongodb.com/docs/manual/core/transactions.md#std-label-transactions)

When run on a [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos), a document with data about the [transactions](https://www.mongodb.com/docs/manual/core/transactions.md#std-label-transactions) run on the instance.

*Available on mongod only.*

The total number of retry attempts that have been received after the corresponding retryable write command has already been committed. That is, a retryable write is attempted even though the write has previously succeeded and has an associated record for the transaction and session in the [`config.transactions`](https://www.mongodb.com/docs/manual/reference/config-database.md#mongodb-data-config.transactions) collection, such as when the initial write response to the client is lost.

**Note:**

MongoDB does not re-execute the committed writes.

The total is across all sessions.

The total does not include any retryable writes that may happen internally as part of a chunk migration.

*Available on mongod only.*

The total number of write statements associated with the retried commands in [`transactions.retriedCommandsCount`.](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.transactions.retriedCommandsCount)

**Note:**

MongoDB does not re-execute the committed writes.

The total does not include any retryable writes that may happen internally as part of a chunk migration.

*Available on mongod only.*

The total number of writes to the [`config.transactions`](https://www.mongodb.com/docs/manual/reference/config-database.md#mongodb-data-config.transactions) collection, triggered when a new retryable write statement is committed.

For update and delete commands, since only single document operations are retryable, there is one write per statement.

For insert operations, there is one write per batch of documents inserted, except when a failure leads to each document being inserted separately.

The total includes writes to a server's [`config.transactions`](https://www.mongodb.com/docs/manual/reference/config-database.md#mongodb-data-config.transactions) collection that occur as part of a migration.

*Available on both mongod and mongos.*

The total number of open transactions currently executing a command.

*Available on both mongod and mongos.*

The total number of open transactions that are not currently executing a command.

*Available on both mongod and mongos.*

The total number of open transactions. A transaction is opened when the first command is run as a part of that transaction, and stays open until the transaction either commits or aborts.

For the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod), the total number of transactions aborted on this instance since its last startup.

For the [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos), the total number of transactions aborted through this instance since its last startup.

For the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod), the total number of transactions committed on the instance since its last startup.

For the [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos), the total number of transactions committed through this instance since its last startup.

For the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod), the total number of transactions started on this instance since its last startup.

For the [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos), the total number of transactions started on this instance since its last startup.

*Available on mongos only.*

Breakdown of the [`transactions.totalAborted`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.transactions.totalAborted) by cause. If a client issues an explicit `abortTransaction`, the cause is listed as `abort`.

For example:

```javascript
totalAborted : Long("5"),
abortCause : {
   abort : Long("1"),
   DuplicateKey : Long("1"),
   StaleConfig : Long("3"),
   SnapshotTooOld : Long("1")
},
```

*Available on mongos only.*

The total number of shards contacted for all transactions started through this [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) since its last startup.

The number of shards contacted during the transaction processes can include those shards that may not be included as part of the commit.

*Available on mongos only.*

Total number of shards involved in the commit for all transactions started through this [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) since its last startup.

*Available on mongos only.*

Total number of network requests targeted by the [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) as part of its transactions.

*Available on mongos only.*

Breakdown of the commits by types. For example:

```javascript
noShards : {
   initiated : Long("0"),
   successful : Long("0"),
   successfulDurationMicros : Long("0")
},
singleShard : {
   initiated : Long("5"),
   successful : Long("5"),
   successfulDurationMicros : Long("203118")
},
singleWriteShard : {
   initiated : Long("0"),
   successful : Long("0"),
   successfulDurationMicros : Long("0")
},
readOnly : {
   initiated : Long("0"),
   successful : Long("0"),
   successfulDurationMicros : Long("0")
},
twoPhaseCommit : {
   initiated : Long("1"),
   successful : Long("1"),
   successfulDurationMicros : Long("179616")
},
recoverWithToken : {
   initiated : Long("0"),
   successful : Long("0"),
   successfulDurationMicros : Long("0")
}
```

The types of commit are:

| Type | Description |
| --- | --- |
| `noShards` | Commits of transactions that did not contact any shards. |
| `singleShard` | Commits of transactions that affected a single shard. |
| `singleWriteShard` | Commits of transactions that contacted multiple shards but whose write operations only affected a single shard. |
| `readOnly` | Commits of transactions that only involved read operations. |
| `twoPhaseCommit` | Commits of transactions that included writes to multiple shards |
| `recoverWithToken` | Commits that recovered the outcome of transactions from another instance or after this instance was restarted. |

For each commit type, the command returns the following metrics:

| Metrics | Description |
| --- | --- |
| `initiated` | Total number of times that commits of this type were initiated. |
| `successful` | Total number of times that commits of this type succeeded. |
| `successfulDurationMicros` | Total time, in microseconds, taken by successful commits of this type. |

*Available on mongod only.*

The total number of transactions in prepared state on this server since the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) process's last startup.

*Available on mongod only.*

The total number of transactions that were prepared and committed on this server since the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) process's last startup.

*Available on mongod only.*

The total number of transactions that were prepared and aborted on this server since the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) process's last startup.

*Available on mongod only.*

The current number of transactions in prepared state on this server.

*Available on mongod only.*

The details of the last transaction committed when the [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) is primary.

When returned from a secondary, [`lastCommittedTransaction`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.transactions.lastCommittedTransaction) returns the details of the last transaction committed when that secondary was a primary.

```javascript
lastCommittedTransaction : {
   operationCount : Long("1"),
   oplogOperationBytes : Long("211"),
   writeConcern : {
      w : "majority",
      wtimeout : 0
   }
}
```

| Metrics | Description |
| --- | --- |
| `operationCount` | The number of write operations in the transaction. |
| `oplogOperationBytes` | The size of the corresponding oplog entry or entries for the transaction. |
| `writeConcern` | The write concern used for the transaction. |

MongoDB creates as many oplog entries as necessary to encapsulate all write operations in a transaction. See [Oplog Size Limit](https://www.mongodb.com/docs/manual/core/transactions-production-consideration.md#std-label-txn-oplog-size-limit) for details.

### transportSecurity

```javascript
transportSecurity : {
   1.0 : Long("<num>"),
   1.1 : Long("<num>"),
   1.2 : Long("<num>"),
   1.3 : Long("<num>"),
   unknown : Long("<num>")
},
```

The cumulative number of TLS \<version> connections that have been made to this [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) or [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) instance. The value is reset upon restart.

### watchdog

```javascript
watchdog : {
   checkGeneration : Long("<num>"),
   monitorGeneration : Long("<num>"),
   monitorPeriod : <num>
}
```

**Note:**

The `watchdog` section is only present if the [Storage Node Watchdog](https://www.mongodb.com/docs/manual/administration/monitoring.md#std-label-storage-node-watchdog) is enabled.

A document reporting the status of the [Storage Node Watchdog.](https://www.mongodb.com/docs/manual/administration/monitoring.md#std-label-storage-node-watchdog)

The number of times the directories have been checked since startup. Directories are checked multiple times every `monitoringPeriod`.

The number of times the status of all filesystems used by [`mongod`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#mongodb-binary-bin.mongod) has been examined. This is incremented once every `monitoringPeriod`.

The value set by [`watchdogPeriodSeconds`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.watchdogPeriodSeconds). This is the period between status checks.

### wiredTiger

`wiredTiger` information only appears if using the [WiredTiger](https://www.mongodb.com/docs/manual/core/wiredtiger.md#std-label-storage-wiredtiger) storage engine. Some of the statistics roll up for the server.

```javascript
{
   uri : 'statistics:',
   version: <string>,
   async : {
      current work queue length : <num>,
      maximum work queue length : <num>,
      number of allocation state races : <num>,
      number of flush calls : <num>,
      number of operation slots viewed for allocation : <num>,
      number of times operation allocation failed : <num>,
      number of times worker found no work : <num>,
      total allocations : <num>,
      total compact calls : <num>,
      total insert calls : <num>,
      total remove calls : <num>,
      total search calls : <num>,
      total update calls : <num>
   },
   block-manager : {
      blocks pre-loaded : <num>,
      blocks read : <num>,
      blocks written : <num>,
      bytes read : <num>,
      bytes written : <num>,
      bytes written for checkpoint : <num>,
      mapped blocks read : <num>,
      mapped bytes read : <num>
   },
   cache : {
      application threads page read from disk to cache count : <num>,
      application threads page read from disk to cache time (usecs) : <num>,
      application threads page write from cache to disk count : <num>,
      application threads page write from cache to disk time (usecs) : <num>,
      bytes belonging to page images in the cache : <num>,
      bytes belonging to the cache overflow table in the cache : <num>,
      bytes currently in the cache : <num>,
      bytes dirty in the cache cumulative : <num>,
      bytes not belonging to page images in the cache : <num>,
      bytes read into cache : <num>,
      bytes written from cache : <num>,
      cache overflow cursor application thread wait time (usecs) : <num>,
      cache overflow cursor internal thread wait time (usecs) : <num>,
      cache overflow score : <num>,
      cache overflow table entries : <num>,
      cache overflow table insert calls : <num>,
      cache overflow table max on-disk size : <num>,
      cache overflow table on-disk size : <num>,
      cache overflow table remove calls : <num>,
      checkpoint blocked page eviction : <num>,
      eviction calls to get a page : <num>,
      eviction calls to get a page found queue empty : <num>,
      eviction calls to get a page found queue empty after locking : <num>,
      eviction currently operating in aggressive mode : <num>,
      eviction empty score : <num>,
      eviction passes of a file : <num>,
      eviction server candidate queue empty when topping up : <num>,
      eviction server candidate queue not empty when topping up : <num>,
      eviction server evicting pages : <num>,
      eviction server slept, because we did not make progress with eviction : <num>,
      eviction server unable to reach eviction goal : <num>,
      eviction server waiting for a leaf page : <num>,
      eviction server waiting for an internal page sleep (usec) : <num>,
      eviction server waiting for an internal page yields : <num>,
      eviction state : <num>,
      eviction walk target pages histogram - 0-9 : <num>,
      eviction walk target pages histogram - 10-31 : <num>,
      eviction walk target pages histogram - 128 and higher : <num>,
      eviction walk target pages histogram - 32-63 : <num>,
      eviction walk target pages histogram - 64-128 : <num>,
      eviction walks abandoned : <num>,
      eviction walks gave up because they restarted their walk twice : <num>,
      eviction walks gave up because they saw too many pages and found no candidates : <num>,
      eviction walks gave up because they saw too many pages and found too few candidates : <num>,
      eviction walks reached end of tree : <num>,
      eviction walks started from root of tree : <num>,
      eviction walks started from saved location in tree : <num>,
      eviction worker thread active : <num>,
      eviction worker thread created : <num>,
      eviction worker thread evicting pages : <num>,
      eviction worker thread removed : <num>,
      eviction worker thread stable number : <num>,
      files with active eviction walks : <num>,
      files with new eviction walks started : <num>,
      force re-tuning of eviction workers once in a while : <num>,
      forced eviction - pages evicted that were clean count : <num>,
      forced eviction - pages evicted that were clean time (usecs) : <num>,
      forced eviction - pages evicted that were dirty count : <num>,
      forced eviction - pages evicted that were dirty time (usecs) : <num>,
      forced eviction - pages selected because of too many deleted items count : <num>,
      forced eviction - pages selected count : <num>,
      forced eviction - pages selected unable to be evicted count : <num>,
      forced eviction - pages selected unable to be evicted time : <num>,
      hazard pointer blocked page eviction : <num>,
      hazard pointer check calls : <num>,
      hazard pointer check entries walked : <num>,
      hazard pointer maximum array length : <num>,
      in-memory page passed criteria to be split : <num>,
      in-memory page splits : <num>,
      internal pages evicted : <num>,
      internal pages split during eviction : <num>,
      leaf pages split during eviction : <num>,
      maximum bytes configured : <num>,
      maximum page size at eviction : <num>,
      modified pages evicted : <num>,
      modified pages evicted by application threads : <num>,
      operations timed out waiting for space in cache : <num>,
      overflow pages read into cache : <num>,
      page split during eviction deepened the tree : <num>,
      page written requiring cache overflow records : <num>,
      pages currently held in the cache : <num>,
      pages evicted by application threads : <num>,
      pages queued for eviction : <num>,
      pages queued for eviction post lru sorting : <num>,
      pages queued for urgent eviction : <num>,
      pages queued for urgent eviction during walk : <num>,
      pages read into cache : <num>,
      pages read into cache after truncate : <num>,
      pages read into cache after truncate in prepare state : <num>,
      pages read into cache requiring cache overflow entries : <num>,
      pages read into cache requiring cache overflow for checkpoint : <num>,
      pages read into cache skipping older cache overflow entries : <num>,
      pages read into cache with skipped cache overflow entries needed later : <num>,
      pages read into cache with skipped cache overflow entries needed later by checkpoint : <num>,
      pages requested from the cache : <num>,
      pages seen by eviction walk : <num>,
      pages selected for eviction unable to be evicted : <num>,
      pages walked for eviction : <num>,
      pages written from cache : <num>,
      pages written requiring in-memory restoration : <num>,
      percentage overhead : <num>,
      tracked bytes belonging to internal pages in the cache : <num>,
      tracked bytes belonging to leaf pages in the cache : <num>,
      tracked dirty bytes in the cache : <num>,
      tracked dirty pages in the cache : <num>,
      unmodified pages evicted : <num>
   },
   capacity : {
      background fsync file handles considered : <num>,
      background fsync file handles synced : <num>,
      background fsync time (msecs) : <num>,
      bytes read : <num>,
      bytes written for checkpoint : <num>,
      bytes written for eviction : <num>,
      bytes written for log : <num>,
      bytes written total : <num>,
      threshold to call fsync : <num>,
      time waiting due to total capacity (usecs) : <num>,
      time waiting during checkpoint (usecs) : <num>,
      time waiting during eviction (usecs) : <num>,
      time waiting during logging (usecs) : <num>,
      time waiting during read (usecs) : <num>
   },
   connection : {
      auto adjusting condition resets : <num>,
      auto adjusting condition wait calls : <num>,
      detected system time went backwards : <num>,
      files currently open : <num>,
      memory allocations : <num>,
      memory frees : <num>,
      memory re-allocations : <num>,
      pthread mutex condition wait calls : <num>,
      pthread mutex shared lock read-lock calls : <num>,
      pthread mutex shared lock write-lock calls : <num>,
      total fsync I/Os : <num>,
      total read I/Os : <num>,
      total write I/Os : <num>
   },
   cursor : {
      cached cursor count : <num>,
      cursor bulk loaded cursor insert calls : <num>,
      cursor close calls that result in cache : <num>,
      cursor create calls : <num>,
      cursor insert calls : <num>,
      cursor insert key and value bytes : <num>,
      cursor modify calls : <num>,
      cursor modify key and value bytes affected : <num>,
      cursor modify value bytes modified : <num>,
      cursor next calls : <num>,
      cursor operation restarted : <num>,
      cursor prev calls : <num>,
      cursor remove calls : <num>,
      cursor remove key bytes removed : <num>,
      cursor reserve calls : <num>,
      cursor reset calls : <num>,
      cursor search calls : <num>,
      cursor search near calls : <num>,
      cursor sweep buckets : <num>,
      cursor sweep cursors closed : <num>,
      cursor sweep cursors examined : <num>,
      cursor sweeps : <num>,
      cursor truncate calls : <num>,
      cursor update calls : <num>,
      cursor update key and value bytes : <num>,
      cursor update value size change : <num>,
      cursors reused from cache : <num>,
      open cursor count : <num>
   },
   data-handle : {
      connection data handle size : <num>,
      connection data handles currently active : <num>,
      connection sweep candidate became referenced : <num>,
      connection sweep dhandles closed : <num>,
      connection sweep dhandles removed from hash list : <num>,
      connection sweep time-of-death sets : <num>,
      connection sweeps : <num>,
      session dhandles swept : <num>,
      session sweep attempts : <num>
   },
   lock : {
      checkpoint lock acquisitions : <num>,
      checkpoint lock application thread wait time (usecs) : <num>,
      checkpoint lock internal thread wait time (usecs) : <num>,
      dhandle lock application thread time waiting (usecs) : <num>,
      dhandle lock internal thread time waiting (usecs) : <num>,
      dhandle read lock acquisitions : <num>,
      dhandle write lock acquisitions : <num>,
      durable timestamp queue lock application thread time waiting (usecs) : <num>,
      durable timestamp queue lock internal thread time waiting (usecs) : <num>,
      durable timestamp queue read lock acquisitions : <num>,
      durable timestamp queue write lock acquisitions : <num>,
      metadata lock acquisitions : <num>,
      metadata lock application thread wait time (usecs) : <num>,
      metadata lock internal thread wait time (usecs) : <num>,
      read timestamp queue lock application thread time waiting (usecs) : <num>,
      read timestamp queue lock internal thread time waiting (usecs) : <num>,
      read timestamp queue read lock acquisitions : <num>,
      read timestamp queue write lock acquisitions : <num>,
      schema lock acquisitions : <num>,
      schema lock application thread wait time (usecs) : <num>,
      schema lock internal thread wait time (usecs) : <num>,
      table lock application thread time waiting for the table lock (usecs) : <num>,
      table lock internal thread time waiting for the table lock (usecs) : <num>,
      table read lock acquisitions : <num>,
      table write lock acquisitions : <num>,
      txn global lock application thread time waiting (usecs) : <num>,
      txn global lock internal thread time waiting (usecs) : <num>,
      txn global read lock acquisitions : <num>,
      txn global write lock acquisitions : <num>
   },
   log : {
      busy returns attempting to switch slots : <num>,
      force archive time sleeping (usecs) : <num>,
      log bytes of payload data : <num>,
      log bytes written : <num>,
      log files manually zero-filled : <num>,
      log flush operations : <num>,
      log force write operations : <num>,
      log force write operations skipped : <num>,
      log records compressed : <num>,
      log records not compressed : <num>,
      log records too small to compress : <num>,
      log release advances write LSN : <num>,
      log scan operations : <num>,
      log scan records requiring two reads : <num>,
      log server thread advances write LSN : <num>,
      log server thread write LSN walk skipped : <num>,
      log sync operations : <num>,
      log sync time duration (usecs) : <num>,
      log sync_dir operations : <num>,
      log sync_dir time duration (usecs) : <num>,
      log write operations : <num>,
      logging bytes consolidated : <num>,
      maximum log file size : <num>,
      number of pre-allocated log files to create : <num>,
      pre-allocated log files not ready and missed : <num>,
      pre-allocated log files prepared : <num>,
      pre-allocated log files used : <num>,
      records processed by log scan : <num>,
      slot close lost race : <num>,
      slot close unbuffered waits : <num>,
      slot closures : <num>,
      slot join atomic update races : <num>,
      slot join calls atomic updates raced : <num>,
      slot join calls did not yield : <num>,
      slot join calls found active slot closed : <num>,
      slot join calls slept : <num>,
      slot join calls yielded : <num>,
      slot join found active slot closed : <num>,
      slot joins yield time (usecs) : <num>,
      slot transitions unable to find free slot : <num>,
      slot unbuffered writes : <num>,
      total in-memory size of compressed records : <num>,
      total log buffer size : <num>,
      total size of compressed records : <num>,
      written slots coalesced : <num>,
      yields waiting for previous log file close : <num>
   },
   perf : {
      file system read latency histogram (bucket 1) - 10-49ms : <num>,
      file system read latency histogram (bucket 2) - 50-99ms : <num>,
      file system read latency histogram (bucket 3) - 100-249ms : <num>,
      file system read latency histogram (bucket 4) - 250-499ms : <num>,
      file system read latency histogram (bucket 5) - 500-999ms : <num>,
      file system read latency histogram (bucket 6) - 1000ms+ : <num>,
      file system write latency histogram (bucket 1) - 10-49ms : <num>,
      file system write latency histogram (bucket 2) - 50-99ms : <num>,
      file system write latency histogram (bucket 3) - 100-249ms : <num>,
      file system write latency histogram (bucket 4) - 250-499ms : <num>,
      file system write latency histogram (bucket 5) - 500-999ms : <num>,
      file system write latency histogram (bucket 6) - 1000ms+ : <num>,
      operation read latency histogram (bucket 1) - 100-249us : <num>,
      operation read latency histogram (bucket 2) - 250-499us : <num>,
      operation read latency histogram (bucket 3) - 500-999us : <num>,
      operation read latency histogram (bucket 4) - 1000-9999us : <num>,
      operation read latency histogram (bucket 5) - 10000us+ : <num>,
      operation write latency histogram (bucket 1) - 100-249us : <num>,
      operation write latency histogram (bucket 2) - 250-499us : <num>,
      operation write latency histogram (bucket 3) - 500-999us : <num>,
      operation write latency histogram (bucket 4) - 1000-9999us : <num>,
      operation write latency histogram (bucket 5) - 10000us+ : <num>
   },
   reconciliation : {
      fast-path pages deleted : <num>,
      page reconciliation calls : <num>,
      page reconciliation calls for eviction : <num>,
      pages deleted : <num>,
      split bytes currently awaiting free : <num>,
      split objects currently awaiting free : <num>
   },
   session : {
      open session count : <num>,
      session query timestamp calls : <num>,
      table alter failed calls : <num>,
      table alter successful calls : <num>,
      table alter unchanged and skipped : <num>,
      table compact failed calls : <num>,
      table compact successful calls : <num>,
      table create failed calls : <num>,
      table create successful calls : <num>,
      table drop failed calls : <num>,
      table drop successful calls : <num>,
      table import failed calls : <num>,
      table import successful calls : <num>,
      table rebalance failed calls : <num>,
      table rebalance successful calls : <num>,
      table rename failed calls : <num>,
      table rename successful calls : <num>,
      table salvage failed calls : <num>,
      table salvage successful calls : <num>,
      table truncate failed calls : <num>,
      table truncate successful calls : <num>,
      table verify failed calls : <num>,
      table verify successful calls : <num>
   },
   thread-state : {
      active filesystem fsync calls : <num>,
      active filesystem read calls : <num>,
      active filesystem write calls : <num>
   },
   thread-yield : {
      application thread time evicting (usecs) : <num>,
      application thread time waiting for cache (usecs) : <num>,
      connection close blocked waiting for transaction state stabilization : <num>,
      connection close yielded for lsm manager shutdown : <num>,
      data handle lock yielded : <num>,
      get reference for page index and slot time sleeping (usecs) : <num>,
      log server sync yielded for log write : <num>,
      page access yielded due to prepare state change : <num>,
      page acquire busy blocked : <num>,
      page acquire eviction blocked : <num>,
      page acquire locked blocked : <num>,
      page acquire read blocked : <num>,
      page acquire time sleeping (usecs) : <num>,
      page delete rollback time sleeping for state change (usecs) : <num>,
      page reconciliation yielded due to child modification : <num>
   },
   transaction : {
      Number of prepared updates : <num>,
      Number of prepared updates added to cache overflow : <num>,
      Number of prepared updates resolved : <num>,
      durable timestamp queue entries walked : <num>,
      durable timestamp queue insert to empty : <num>,
      durable timestamp queue inserts to head : <num>,
      durable timestamp queue inserts total : <num>,
      durable timestamp queue length : <num>,
      number of named snapshots created : <num>,
      number of named snapshots dropped : <num>,
      prepared transactions : <num>,
      prepared transactions committed : <num>,
      prepared transactions currently active : <num>,
      prepared transactions rolled back : <num>,
      query timestamp calls : <num>,
      read timestamp queue entries walked : <num>,
      read timestamp queue insert to empty : <num>,
      read timestamp queue inserts to head : <num>,
      read timestamp queue inserts total : <num>,
      read timestamp queue length : <num>,
      rollback to stable calls : <num>,
      rollback to stable updates aborted : <num>,
      rollback to stable updates removed from cache overflow : <num>,
      set timestamp calls : <num>,
      set timestamp durable calls : <num>,
      set timestamp durable updates : <num>,
      set timestamp oldest calls : <num>,
      set timestamp oldest updates : <num>,
      set timestamp stable calls : <num>,
      set timestamp stable updates : <num>,
      transaction begins : <num>,
      transaction checkpoint currently running : <num>,
      transaction checkpoint generation : <num>,
      transaction checkpoint max time (msecs) : <num>,
      transaction checkpoint min time (msecs) : <num>,
      transaction checkpoint most recent time (msecs) : <num>,
      transaction checkpoint scrub dirty target : <num>,
      transaction checkpoint scrub time (msecs) : <num>,
      transaction checkpoint total time (msecs) : <num>,
      transaction checkpoints : <num>,
      transaction checkpoints skipped because database was clean : <num>,
      transaction failures due to cache overflow : <num>,
      transaction fsync calls for checkpoint after allocating the transaction ID : <num>,
      transaction fsync duration for checkpoint after allocating the transaction ID (usecs) : <num>,
      transaction range of IDs currently pinned : <num>,
      transaction range of IDs currently pinned by a checkpoint : <num>,
      transaction range of IDs currently pinned by named snapshots : <num>,
      transaction range of timestamps currently pinned : <num>,
      transaction range of timestamps pinned by a checkpoint : <num>,
      transaction range of timestamps pinned by the oldest active read timestamp : <num>,
      transaction range of timestamps pinned by the oldest timestamp : <num>,
      transaction read timestamp of the oldest active reader : <num>,
      transaction sync calls : <num>,
      transactions committed : <num>,
      transactions rolled back : <num>,
      update conflicts : <num>
   },
   concurrentTransactions : {
      write : {
         out : <num>,
         available : <num>,
         totalTickets : <num>
      },
      read : {
         out : <num>,
         available : <num>,
         totalTickets : <num>
      },
      monitor : {
         timesDecreased: <num>,
         timesIncreased: <num>,
         totalAmountDecreased: <num>,
         totalAmountIncreased: <num>
      }
   },
   snapshot-window-settings : {
      total number of SnapshotTooOld errors : <num>,
      max target available snapshots window size in seconds : <num>,
      target available snapshots window size in seconds : <num>,
      current available snapshots window size in seconds : <num>,
      latest majority snapshot timestamp available : <string>,
      oldest majority snapshot timestamp available : <string>
   }
}
```

**Note:**

The following is not an exhaustive list.

A string. For internal use by MongoDB.

A string that returns the WiredTiger storage engine version.

**New in version 8.1**

A document that returns statistics related to the asynchronous operations API. This is unused by MongoDB.

A document that returns statistics on the block manager operations.

A document that returns statistics on the cache and page evictions from the cache.

The following describes some of the key [`wiredTiger.cache`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.wiredTiger.cache) statistics:

Maximum cache size.

Size in bytes of the data currently in cache. This value should not be greater than the `maximum bytes configured` value.

Main statistics for page eviction.

Size in bytes of the dirty data in the cache. This value should be less than the `bytes currently in the cache` value.

Number of pages read into the cache. [`wiredTiger.cache.pages read into cache`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.wiredTiger.cache.pages-read-into-cache) with the [`wiredTiger.cache.pages written from cache`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.wiredTiger.cache.pages-written-from-cache) can provide an overview of the I/O activity.

Number of pages written from the cache. [`wiredTiger.cache.pages written from cache`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.wiredTiger.cache.pages-written-from-cache) with the [`wiredTiger.cache.pages read into cache`](https://www.mongodb.com/docs/manual/reference/command/serverStatus.md#mongodb-serverstatus-serverstatus.wiredTiger.cache.pages-read-into-cache) can provide an overview of the I/O activity.

To adjust the size of the WiredTiger internal cache, see [`--wiredTigerCacheSizeGB`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#std-option-mongod.--wiredTigerCacheSizeGB) and [`storage.wiredTiger.engineConfig.cacheSizeGB`](https://www.mongodb.com/docs/manual/reference/configuration-options.md#mongodb-setting-storage.wiredTiger.engineConfig.cacheSizeGB). Avoid increasing the WiredTiger internal cache size above its default value. If your use case requires increased internal cache size, see [`--wiredTigerCacheSizePct`](https://www.mongodb.com/docs/manual/reference/program/mongod.md#std-option-mongod.--wiredTigerCacheSizePct) and [`storage.wiredTiger.engineConfig.cacheSizePct`.](https://www.mongodb.com/docs/manual/reference/configuration-options.md#mongodb-setting-storage.wiredTiger.engineConfig.cacheSizePct)

A document that returns statistics related to WiredTiger connections.

A document that returns statistics on WiredTiger cursor.

A document that returns statistics on the data handles and sweeps.

A document that returns statistics on WiredTiger's write ahead log (that is, the journal).

**See also:**

[Journaling and the WiredTiger Storage Engine](https://www.mongodb.com/docs/manual/core/journaling.md#std-label-journaling-wiredTiger)

A document that returns statistics on the reconciliation process.

A document that returns the open cursor count and open session count for the session.

A document that returns statistics on yields during page acquisitions.

A document that returns statistics on transaction checkpoints and operations.

Amount of time, in milliseconds, to create the most recent checkpoint. An increase in this value under stead write load may indicate saturation on the I/O subsystem.
