Navigation
This version of the documentation is archived and no longer supported.

serverStatus

On this page

Definition

serverStatus

The 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.

db.runCommand( { serverStatus: 1 } )

The value (i.e. 1 above) does not affect the operation of the command. The mongo shell provides the db.serverStatus() wrapper for the command.

See also

Much of the output of serverStatus is also displayed dynamically by mongostat. See the mongostat command for more information.

Behavior

By default, serverStatus excludes in its output rangeDeleter information and some content in the repl 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 top-level field and set to 0 in the command.

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

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

The following example includes rangeDeleter and all repl information in the output:

db.runCommand( { serverStatus: 1, rangeDeleter: 1, repl: 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, mongod or replica set member.

For the serverStatus output specific to the version of your MongoDB, refer to the appropriate version of the MongoDB Manual.

Changed in version 3.0: serverStatus no longer outputs the workingSet, indexCounters, and recordStats sections.

Instance Information

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

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

advisoryHostFQDNs

New in version 3.2.

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

version

The MongoDB version of the current MongoDB process.

process

The current MongoDB process. Possible values are: mongos or mongod.

pid

The process id number.

uptime

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

uptimeMillis

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

uptimeEstimate

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

localTime

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

asserts

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

A document that reports on the number of assertions raised since the MongoDB process started. While assert errors are typically uncommon, if there are non-zero values for the asserts, you should check the log file for more information. In many cases, these errors are trivial, but are worth investigating.

asserts.regular

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

asserts.warning

The number of warnings raised since the MongoDB process started. Check the log file for more information about these warnings.

asserts.msg

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

asserts.user

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. Check the MongoDB log for more information.

asserts.rollovers

The number of times that the rollover counters have rolled over since the last time the MongoDB process started. The counters will rollover to zero after 230 assertions. Use this value to provide context to the other values in the asserts data structure.

backgroundFlushing

"backgroundFlushing" : {
   "flushes" : <num>,
   "total_ms" : <num>,
   "average_ms" : <num>,
   "last_ms" : <num>,
   "last_finished" : ISODate("...")
},

Note

backgroundFlushing information only appears for instances that use the MMAPv1 storage engine.

backgroundFlushing

A document that reports on the mongod process’s periodic writes to disk. Consider these values if you have concerns about write performance and journaling.

backgroundFlushing.flushes

The number of times the database has flushed all writes to disk. This value will grow as database runs for longer periods of time.

backgroundFlushing.total_ms

The total number of milliseconds (ms) that the mongod processes have spent writing (i.e. flushing) data to disk. Because total_ms is an absolute value, consider the flushes and average_ms values to provide context.

backgroundFlushing.average_ms

The average time in milliseconds for each flush to disk, calculated by dividing total_ms by flushes.

The average_ms is more likely to to represent a “normal” time as the value of the flushes increases. However, abnormal data can skew this value. Use the backgroundFlushing.last_ms to check that a high average is not skewed by transient historical issue or a random write distribution.

backgroundFlushing.last_ms

The amount of time, in milliseconds, that the last flush operation took to complete. Use this value to verify that the current performance of the server is in line with the historical data provided by backgroundFlushing.average_ms and backgroundFlushing.total_ms.

backgroundFlushing.last_finished

The timestamp of the last completed flush operation in the ISODate format. If this value is more than a few minutes past your server’s current time and accounting for differences in time zone, restarting the database may result in some data loss.

Also consider ongoing operations that might skew this value by routinely blocking write operations.

connections

"connections" : {
   "current" : <num>,
   "available" : <num>,
   "totalCreated" : NumberLong(<num>)
},
connections

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

connections.current

The number of incoming connections from clients to the database server . This number includes the current shell session. Consider the value of connections.available to add more context to this datum.

The value will include all incoming connections including any shell connections or connections from other servers, such as replica set members or mongos instances.

connections.available

The number of unused incoming connections available. Consider this value in combination with the value of connections.current to understand the connection load on the database, and the UNIX ulimit Settings document for more information about system thresholds on available connections.

connections.totalCreated

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

dur (Journaling)

"dur" : {
   "commits" : <num>,
   "journaledMB" : <num>,
   "writeToDataFilesMB" : <num>,
   "compression" : <num>,
   "commitsInWriteLock" : <num>,
   "earlyCommits" : <num>,
   "timeMs" : {
      "dt" : <num>,
      "prepLogBuffer" : <num>,
      "writeToJournal" : <num>,
      "writeToDataFiles" : <num>,
      "remapPrivateView" : <num>,
      "commits" : <num>,
      "commitsInWriteLock" : <num>
   }
},

Note

dur (journaling) information only appears for mongod instances that use the MMAPv1 storage engine and have journaling enabled.

dur

A document that reports the mongod instance’s journaling-related operations and performance. MongoDB reports on this data based on 3 second intervals, collected between 3 and 6 seconds in the past.

dur.commits

The number of transactions written to the journal during the last journal group commit interval.

dur.journaledMB

The amount of data in megabytes (MB) written to journal during the last journal group commit interval.

dur.writeToDataFilesMB

The amount of data in megabytes (MB) written from journal to the data files during the last journal group commit interval.

dur.compression

The compression ratio of the data written to the journal:

( journaled_size_of_data / uncompressed_size_of_data )
dur.commitsInWriteLock

The count of the commits that occurred while a write lock was held. Commits in a write lock indicate a MongoDB node under a heavy write load and call for further diagnosis.

dur.earlyCommits

The number of times MongoDB requested a commit before the scheduled journal group commit interval. Use this value to ensure that your journal group commit interval is not too long for your deployment.

dur.timeMS

A document that reports on the performance of the mongod instance during the various phases of journaling in the last journal group commit interval.

dur.timeMS.dt

The amount of time, in milliseconds, over which MongoDB collected the dur.timeMS data. Use this field to provide context to the other dur.timeMS field values.

dur.timeMS.prepLogBuffer

The amount of time, in milliseconds, spent preparing to write to the journal. Smaller values indicate better journal performance.

dur.timeMS.writeToJournal

The amount of time, in milliseconds, spent actually writing to the journal. File system speeds and device interfaces can affect performance.

dur.timeMS.writeToDataFiles

The amount of time, in milliseconds, spent writing to data files after journaling. File system speeds and device interfaces can affect performance.

dur.timeMS.remapPrivateView

The amount of time, in milliseconds, spent remapping copy-on-write memory mapped views. Smaller values indicate better journal performance.

dur.timeMS.commits

The amount of time, in milliseconds, spent for commits.

dur.timeMS.commitsInWriteLock

The amount of time, in milliseconds, spent for commits that occurred while a write lock was held.

extra_info

"extra_info" : {
   "note" : "fields vary by platform.",
   "heap_usage_bytes" : <num>,
   "page_faults" : <num>
},
extra_info

A document that provides additional information regarding the underlying system.

extra_info.note

A string with the text "fields vary by platform."

extra_info.heap_usage_bytes

The total size in bytes of heap space used by the database process. Available on Unix/Linux systems only.

extra_info.page_faults

The total number of page faults. The 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 draws a distinction between “hard” page faults involving disk I/O, and “soft” page faults that only require moving pages in memory. MongoDB counts both hard and soft page faults in this statistic.

globalLock

"globalLock" : {
   "totalTime" : <num>,
   "currentQueue" : {
      "total" : <num>,
      "readers" : <num>,
      "writers" : <num>
   },
   "activeClients" : {
      "total" : <num>,
      "readers" : <num>,
      "writers" : <num>
   }
},
globalLock

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

Generally, the locks document provides more detailed data on lock uses.

globalLock.totalTime

The time, in microseconds, since the database last started and created the globalLock. This is roughly equivalent to total server uptime.

globalLock.currentQueue

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

globalLock.currentQueue.total

The total number of operations queued waiting for the lock (i.e., the sum of globalLock.currentQueue.readers and globalLock.currentQueue.writers).

A consistently small queue, particularly of shorter operations, should cause no concern. The globalLock.activeClients readers and writers information provides contenxt for this data.

globalLock.currentQueue.readers

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.

globalLock.currentQueue.writers

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.

globalLock.activeClients

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 data.

globalLock.activeClients.total

The total number of active client connections to the database (i.e., the sum of globalLock.activeClients.readers and globalLock.activeClients.writers).

globalLock.activeClients.readers

The number of the active client connections performing read operations.

globalLock.activeClients.writers

The number of active client connections performing write operations.

locks

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

Changed in version 3.0.

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

The possible lock <types> are:

Lock Type Description
Global Represents global lock.
MMAPV1Journal Represents MMAPv1 storage engine specific lock to synchronize journal writes; for non-MMAPv1 storage engines, the mode for MMAPV1Journal is empty.
Database Represents database lock.
Collection Represents collection lock.
Metadata Represents metadata lock.
oplog Represents lock on the 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 NumberLong() type.

locks.<type>.acquireCount

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

locks.<type>.acquireWaitCount

Number of times the locks.acquireCount lock acquisitions encountered waits because the locks were held in a conflicting mode.

locks.<type>.timeAcquiringMicros

Cumulative wait time in microseconds for the lock acquisitions.

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

locks.<type>.deadlockCount

Number of times the lock acquisitions encountered deadlocks.

network

"network" : {
   "bytesIn" : <num>,
   "bytesOut" : <num>,
   "numRequests" : <num>
},
network

A document that reports data on MongoDB’s network use.

network.bytesIn

The number of bytes that reflects the amount of network traffic received by this database. Use this value to ensure that network traffic sent to the mongod process is consistent with expectations and overall inter-application traffic.

network.bytesOut

The number of bytes that reflects the amount of network traffic sent from this database. Use this value to ensure that network traffic sent by the mongod process is consistent with expectations and overall inter-application traffic.

network.numRequests

The total number of distinct requests that the server has received. Use this value to provide context for the network.bytesIn and network.bytesOut values to ensure that MongoDB’s network utilization is consistent with expectations and application use.

opcounters

"opcounters" : {
   "insert" : <num>,
   "query" : <num>,
   "update" : <num>,
   "delete" : <num>,
   "getmore" : <num>,
   "command" : <num>
},
opcounters

A document that reports on database operations by type since the 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 treats operations that affect multiple documents, such as bulk insert or multi-update operations, as a single operation. See metrics.document for more granular document-level operation tracking.

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

opcounters.insert

The total number of insert operations received since the mongod instance last started.

opcounters.query

The total number of queries received since the mongod instance last started.

opcounters.update

The total number of update operations received since the mongod instance last started.

opcounters.delete

The total number of delete operations since the mongod instance last started.

opcounters.getmore

The total number of “getmore” operations since the mongod instance last started. This counter can be high even if the query count is low. Secondary nodes send getMore operations as part of the replication process.

opcounters.command

The total number of commands issued to the database since the mongod instance last started.

opcounters.command counts all commands except the write commands: insert, update, and delete.

opcountersRepl

"opcountersRepl" : {
   "insert" : <num>,
   "query" : <num>,
   "update" : <num>,
   "delete" : <num>,
   "getmore" : <num>,
   "command" : <num>
},
opcountersRepl

A document that reports on database replication operations by type since the mongod instance last started.

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

These values will differ from the opcounters values because of how MongoDB serializes operations during replication. See Replication for more information on replication.

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

opcountersRepl.insert

The total number of replicated insert operations since the mongod instance last started.

opcountersRepl.query

The total number of replicated queries since the mongod instance last started.

opcountersRepl.update

The total number of replicated update operations since the mongod instance last started.

opcountersRepl.delete

The total number of replicated delete operations since the mongod instance last started.

opcountersRepl.getmore

The total number of “getmore” operations since the mongod instance last started. This counter can be high even if the query count is low. Secondary nodes send getMore operations as part of the replication process.

opcountersRepl.command

The total number of replicated commands issued to the database since the mongod instance last started.

rangeDeleter

"rangeDeleter" : {
   "lastDeleteStats" : [
      {
        "deletedDocs" : NumberLong(<num>),
        "queueStart" : <date>,
        "queueEnd" : <date>,
        "deleteStart" : <date>,
        "deleteEnd" : <date>,
        "waitForReplStart" : <date>,
        "waitForReplEnd" : <date>
      }
   ]
}

By default, serverStatus does not include rangeDeleter data in the output. To include the rangeDeleter data, use one of the following commands:

db.serverStatus( { rangeDeleter: 1 } )
db.runCommand( { serverStatus: 1, rangeDeleter: 1 } )
rangeDeleter

New in version 3.0.

A document that reports on the work performed by the cleanupOrphaned command and the cleanup phase of the moveChunk command.

rangeDeleter.lastDeleteStats

An array of documents that each report on the last operations of migration cleanup operations. At most rangeDeleter.lastDeleteStats will report data for the last 10 operations.

rangeDeleter.lastDeleteStats[n].deletedDocs

The number of documents deleted by migration cleanup operations.

rangeDeleter.lastDeleteStats[n].queueStart

A timestamp that reflects when operations began entering the queue for the migration cleanup operation. Specifically, operations wait in the queue while the mongod waits for open cursors to close on the namespace.

rangeDeleter.lastDeleteStats[n].queueEnd

A timestamp that reflects when the migration cleanup operation begins.

rangeDeleter.lastDeleteStats[n].deleteStart

A timestamp for the beginning of the delete process that is part of the migration cleanup operation.

rangeDeleter.lastDeleteStats[n].deleteEnd

A timestamp for the end of the delete process that is part of the migration cleanup operation.

rangeDeleter.lastDeleteStats[n].waitForReplStart

A timestamp that reflects when the migration cleanup operation began waiting for replication to process the delete operation.

rangeDeleter.lastDeleteStats[n].waitForReplEnd

A timestamp that reflects when the migration cleanup operation finished waiting for replication to process the delete operation.

repl

"repl" : {
   "hosts" : [
         <string>,
         <string>,
         <string>
   ],
   "setName" : <string>,
   "setVersion" : <num>,
   "ismaster" : <boolean>,
   "secondary" : <boolean>,
   "primary" : <hostname>,
   "me" : <hostname>,
   "electionId" : ObjectId(""),
   "rbid" : <num>,
   "replicationProgress" : [
         {
            "rid" : <ObjectId>,
            "optime" : { ts: <timestamp>, term: <num> },
            "host" : <hostname>,
            "memberId" : <num>
         },
        ...
   ]
}
repl

A document that reports on the replica set configuration. repl only appear when the current host is a replica set. See Replication for more information on replication.

repl.hosts

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

repl.setName

A string with the name of the current replica set. This value reflects the --replSet command line argument, or replSetName value in the configuration file.

repl.ismaster

A boolean that indicates whether the current node is the primary of the replica set.

repl.secondary

A boolean that indicates whether the current node is a secondary member of the replica set.

repl.primary

New in version 3.0.

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

repl.me

New in version 3.0: The hostname and port information ("host:port") for the current member of the replica set.

repl.rbid

New in version 3.0.

Rollback identifier. Used to determine if a rollback has happened for this mongod instance.

repl.replicationProgress

Changed in version 3.2: Previously named serverStatus.repl.slaves.

New in version 3.0.

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, as in the following:

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

The content of the 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.

repl.replicationProgress[n].rid

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

repl.replicationProgress[n].optime

Information regarding the last operation from the oplog that the member applied, as reported from this member.

repl.replicationProgress[n].host

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

repl.replicationProgress[n].memberID

The integer identifier for this member of the replica set.

security

"security" : {
   "SSLServerSubjectName": <string>,
   "SSLServerHasCertificateAuthority": <boolean>,
   "SSLServerCertificateExpirationDate": <date>
},
security

New in version 3.0.

A document that reports on security configuration and details. Only appears for mongod instances compiled with support for TLS/SSL.

security.SSLServerSubjectName

The subject name associated with the TLS/SSL certificate specified by net.ssl.PEMKeyFile.

security.SSLServerHasCertificateAuthority

A boolean that is true when the TLS/SSL certificate specified by net.ssl.PEMKeyFile is associated with a certificate authority. false when the TLS/SSL certificate is self-signed.

security.SSLServerCertificateExpirationDate

A date object that represents the date when the TLS/SSL certificate specified by net.ssl.PEMKeyFile expires.

sharding

New in version 3.2: When run on mongos, the command returns sharding information.

{
   "configsvrConnectionString" : "csRS/cfg1.example.net:27019,cfg2.example.net:27019,cfg2.example.net:27019",
   "lastSeenConfigServerOpTime" : {
      "ts" : Timestamp(1517462189, 1),
      "t" : NumberLong(1)
   }
}
sharding

A document with data regarding the sharded cluster.

sharding.configsvrConnectionString

The connection string for the config servers.

sharding.lastSeenConfigServerOpTime

The latest optime of the CSRS primary that the mongos has seen. The optime document includes:

  • ts, the Timestamp of the operation.

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

    If using protocolVersion: 0, t is equal to -1.

The lastSeenConfigServerOpTime is present only if the sharded cluster uses CSRS.

storageEngine

New in version 3.0.

"storageEngine" : {
   "name" : <string>,
   "supportsCommittedReads" : <boolean>,
   "persistent" : <boolean>
},
storageEngine

A document with data about the current storage engine.

storageEngine.name

The name of the current storage engine.

storageEngine.supportsCommittedReads

New in version 3.2.

A boolean that indicates whether the storage engine supports "majority" read concern.

storageEngine.persistent

New in version 3.2.6.

A boolean that indicates whether the storage engine does or does not persist data to disk.

wiredTiger

wiredTiger information only appears if using the WiredTiger storage engine. Some of the statistics, such as wiredTiger.LSM, roll up for the server.

"wiredTiger" : {
   "uri" : "statistics:",
   "LSM" : {
         "sleep for LSM checkpoint throttle" : <num>,
         "sleep for LSM merge throttle" : <num>,
         "rows merged in an LSM tree" : <num>,
         "application work units currently queued" : <num>,
         "merge work units currently queued" : <num>,
         "tree queue hit maximum" : <num>,
         "switch work units currently queued" : <num>,
         "tree maintenance operations scheduled" : <num>,
         "tree maintenance operations discarded" : <num>,
         "tree maintenance operations executed" : <num>
   },
   "async" : {
         "number of allocation state races" : <num>,
         "number of operation slots viewed for allocation" : <num>,
         "current work queue length" : <num>,
         "number of flush calls" : <num>,
         "number of times operation allocation failed" : <num>,
         "maximum work queue length" : <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" : {
         "mapped bytes read" : <num>,
         "bytes read" : <num>,
         "bytes written" : <num>,
         "mapped blocks read" : <num>,
         "blocks pre-loaded" : <num>,
         "blocks read" : <num>,
         "blocks written" : <num>
   },
   "cache" : {
         "tracked dirty bytes in the cache" : <num>,
         "tracked bytes belonging to internal pages in the cache" : <num>,
         "bytes currently in the cache" : <num>,
         "tracked bytes belonging to leaf pages in the cache" : <num>,
         "maximum bytes configured" : <num>,
         "tracked bytes belonging to overflow pages in the cache" : <num>,
         "bytes read into cache" : <num>,
         "bytes written from cache" : <num>,
         "pages evicted by application threads" : <num>,
         "checkpoint blocked page eviction" : <num>,
         "unmodified pages evicted" : <num>,
         "page split during eviction deepened the tree" : <num>,
         "modified pages evicted" : <num>,
         "pages selected for eviction unable to be evicted" : <num>,
         "pages evicted because they exceeded the in-memory maximum" : <num>,
         "pages evicted because they had chains of deleted items" : <num>,
         "failed eviction of pages that exceeded the in-memory maximum" : <num>,
         "hazard pointer blocked page eviction" : <num>,
         "internal pages evicted" : <num>,
         "maximum page size at eviction" : <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 populating queue, but not evicting pages" : <num>,
         "eviction server unable to reach eviction goal" : <num>,
         "internal pages split during eviction" : <num>,
         "leaf pages split during eviction" : <num>,
         "pages walked for eviction" : <num>,
         "eviction worker thread evicting pages" : <num>,
         "in-memory page splits" : <num>,
         "in-memory page passed criteria to be split" : <num>,
         "lookaside table insert calls" : <num>,
         "lookaside table remove calls" : <num>,
         "percentage overhead" : <num>,
         "tracked dirty pages in the cache" : <num>,
         "pages currently held in the cache" : <num>,
         "pages read into cache" : <num>,
         "pages read into cache requiring lookaside entries" : <num>,
         "pages written from cache" : <num>,
         "page written requiring lookaside records" : <num>,
         "pages written requiring in-memory restoration" : <num>
   },
   "connection" : {
         "pthread mutex condition wait calls" : <num>,
         "files currently open" : <num>,
         "memory allocations" : <num>,
         "memory frees" : <num>,
         "memory re-allocations" : <num>,
         "total read I/Os" : <num>,
         "pthread mutex shared lock read-lock calls" : <num>,
         "pthread mutex shared lock write-lock calls" : <num>,
         "total write I/Os" : <num>
   },
   "cursor" : {
         "cursor create calls" : <num>,
         "cursor insert calls" : <num>,
         "cursor next calls" : <num>,
         "cursor prev calls" : <num>,
         "cursor remove calls" : <num>,
         "cursor reset calls" : <num>,
         "cursor restarted searches" : <num>,
         "cursor search calls" : <num>,
         "cursor search near calls" : <num>,
         "truncate calls" : <num>,
         "cursor update calls" : <num>
   },
   "data-handle" : {
         "connection data handles currently active" : <num>,
         "session dhandles swept" : <num>,
         "session sweep attempts" : <num>,
         "connection sweep dhandles closed" : <num>,
         "connection sweep candidate became referenced" : <num>,
         "connection sweep dhandles removed from hash list" : <num>,
         "connection sweep time-of-death sets" : <num>,
         "connection sweeps" : <num>
   },
   "log" : {
         "total log buffer size" : <num>,
         "log bytes of payload data" : <num>,
         "log bytes written" : <num>,
         "yields waiting for previous log file close" : <num>,
         "total size of compressed records" : <num>,
         "total in-memory size of compressed records" : <num>,
         "log records too small to compress" : <num>,
         "log records not compressed" : <num>,
         "log records compressed" : <num>,
         "log flush operations" : <num>,
         "maximum log file size" : <num>,
         "pre-allocated log files prepared" : <num>,
         "number of pre-allocated log files to create" : <num>,
         "pre-allocated log files not ready and missed" : <num>,
         "pre-allocated log files used" : <num>,
         "log release advances write LSN" : <num>,
         "records processed by log scan" : <num>,
         "log scan records requiring two reads" : <num>,
         "log scan operations" : <num>,
         "consolidated slot closures" : <num>,
         "written slots coalesced" : <num>,
         "logging bytes consolidated" : <num>,
         "consolidated slot joins" : <num>,
         "consolidated slot join races" : <num>,
         "busy returns attempting to switch slots" : <num>,
         "consolidated slot join transitions" : <num>,
         "consolidated slot unbuffered writes" : <num>,
         "log sync operations" : <num>,
         "log sync_dir operations" : <num>,
         "log server thread advances write LSN" : <num>,
         "log write operations" : <num>,
         "log files manually zero-filled" : <num>
   },
   "reconciliation" : {
         "pages deleted" : <num>,
         "fast-path pages deleted" : <num>,
         "page reconciliation calls" : <num>,
         "page reconciliation calls for eviction" : <num>,
         "split bytes currently awaiting free" : <num>,
         "split objects currently awaiting free" : <num>
   },
   "session" : {
         "open cursor count" : <num>,
         "open session count" : <num>
   },
   "thread-yield" : {
         "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>
   },
   "transaction" : {
         "transaction begins" : <num>,
         "transaction checkpoints" : <num>,
         "transaction checkpoint generation" : <num>,
         "transaction checkpoint currently running" : <num>,
         "transaction checkpoint max time (msecs)" : <num>,
         "transaction checkpoint min time (msecs)" : <num>,
         "transaction checkpoint most recent time (msecs)" : <num>,
         "transaction checkpoint total time (msecs)" : <num>,
         "transactions committed" : <num>,
         "transaction failures due to cache overflow" : <num>,
         "transaction range of IDs currently pinned by a checkpoint" : <num>,
         "transaction range of IDs currently pinned" : <num>,
         "transaction range of IDs currently pinned by named snapshots" : <num>,
         "transactions rolled back" : <num>,
         "number of named snapshots created" : <num>,
         "number of named snapshots dropped" : <num>,
         "transaction sync calls" : <num>
   },
   "concurrentTransactions" : {
         "write" : {
            "out" : <num>,
            "available" : <num>,
            "totalTickets" : <num>
         },
         "read" : {
            "out" : <num>,
            "available" : <num>,
            "totalTickets" : <num>
         }
   }
},
wiredTiger.uri

New in version 3.0.

A string. For internal use by MongoDB.

wiredTiger.LSM

New in version 3.0.

A document that returns statistics on the LSM (Log-Structured Merge) tree. The values reflects the statistics for all LSM trees used in this server.

wiredTiger.async

New in version 3.0.

A document that returns statistics related to the asynchronous operations API. This is unused by MongoDB.

wiredTiger.block-manager

New in version 3.0.

A document that returns statistics on the block manager operations.

wiredTiger.cache

New in version 3.0: A document that returns statistics on the cache and page evictions from the cache.

The following describes some of the key wiredTiger.cache statistics:

wiredTiger.cache.maximum bytes configured

Maximum cache size.

wiredTiger.cache.bytes currently in the cache

Size in byte of the data currently in cache. This value should not be greater than the maximum bytes configured value.

wiredTiger.cache.unmodified pages evicted

Main statistics for page eviction.

wiredTiger.cache.tracked dirty bytes in the cache

Size in bytes of the dirty data in the cache. This value should be less than the bytes currently in the cache value.

wiredTiger.cache.pages read into cache

Number of pages read into the cache. wiredTiger.cache.pages read into cache with the wiredTiger.cache.pages written from cache can provide an overview of the I/O activity.

wiredTiger.cache.pages written from cache

Number of pages written from the cache. wiredTiger.cache.pages written from cache with the 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 storage.wiredTiger.engineConfig.cacheSizeGB and --wiredTigerCacheSizeGB. Avoid increasing the WiredTiger internal cache size above its default value.

wiredTiger.connection

New in version 3.0.

A document that returns statistics related to WiredTiger connections.

wiredTiger.cursor

New in version 3.0.

A document that returns statistics on WiredTiger cursor.

wiredTiger.data-handle

New in version 3.0.

A document that returns statistics on the data handles and sweeps.

wiredTiger.log

New in version 3.0.

A document that returns statistics on WiredTiger’s write ahead log.

wiredTiger.reconciliation

New in version 3.0.

A document that returns statistics on the reconciliation process.

wiredTiger.session

New in version 3.0.

A document that returns the open cursor count and open session count for the session.

wiredTiger.thread-yield

New in version 3.0.

A document that returns statistics on yields during page acquisitions.

wiredTiger.transaction

New in version 3.0.

A document that returns statistics on transaction checkpoints and operations.

wiredTiger.transaction.transaction checkpoint most recent time

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.

wiredTiger.concurrentTransactions

New in version 3.0.

A document that returns information on the number of concurrent of read and write transactions allowed into the WiredTiger storage engine. These settings are MongoDB-specific.

To change the settings for concurrent reads and write transactions, see wiredTigerConcurrentReadTransactions and wiredTigerConcurrentWriteTransactions.

writeBacksQueued

"writeBacksQueued" : <boolean>,
writeBacksQueued

A boolean that indicates whether there are operations from a mongos instance queued for retrying. Typically, this value is false. See also writeBacks.

mem

"mem" : {
   "bits" : <int>,
   "resident" : <int>,
   "virtual" : <int>,
   "supported" : <boolean>,
   "mapped" : <int>,
   "mappedWithJournal" : <int>
},
mem

A document that reports on the system architecture of the mongod and current memory use.

mem.bits

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

mem.resident

The value of mem.resident is roughly equivalent to the amount of RAM, in megabytes (MB), 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

mem.virtual displays the quantity, in megabytes (MB), of virtual memory used by the mongod process.

With journaling enabled and if using MMAPv1 storage engine, the value of mem.virtual is at least twice the value of mem.mapped. If mem.virtual value is significantly larger than mem.mapped (e.g. 3 or more times), this may indicate a memory leak.

mem.supported

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 values may not be accessible to the database server.

mem.mapped

Only for the MMAPv1 storage engine.

The amount of mapped memory, in megabytes (MB), by the database. Because MongoDB uses memory-mapped files, this value is likely to be to be roughly equivalent to the total size of your database or databases.

mem.mappedWithJournal

Only for the MMAPv1 storage engine.

The amount of mapped memory, in megabytes (MB), including the memory used for journaling. This value will always be twice the value of mem.mapped. This field is only included if journaling is enabled.

mem.note

The field mem.note appears if mem.supported is false.

The mem.note field contains the text: "not all mem info support on this platform".

metrics

"metrics" : {
   "commands": {
         "<command>": {
            "failed": <num>,
            "total": <num>
         }
   },
   "cursor" : {
         "timedOut" : NumberLong(<num>),
         "open" : {
            "noTimeout" : NumberLong(<num>),
            "pinned" : NumberLong(<num>),
            "multiTarget" : NumberLong(<num>),
            "singleTarget" : NumberLong(<num>),
            "total" : NumberLong(<num>),
         }
   },
   "document" : {
         "deleted" : NumberLong(<num>),
         "inserted" : NumberLong(<num>),
         "returned" : NumberLong(<num>),
         "updated" : NumberLong(<num>)
   },
   "getLastError" : {
         "wtime" : {
            "num" : <num>,
            "totalMillis" : <num>
         },
         "wtimeouts" : NumberLong(<num>)
   },
   "operation" : {
         "fastmod" : NumberLong(<num>),
         "idhack" : NumberLong(<num>),
         "scanAndOrder" : NumberLong(<num>),
         "writeConflicts" : NumberLong(<num>)
   },
   "queryExecutor": {
         "scanned" : NumberLong(<num>),
         "scannedObjects" : NumberLong(<num>)
   },
   "record" : {
         "moves" : NumberLong(<num>)
   },
   "repl" : {
      "executor" : {
                  "counters" : {
                     "eventCreated" : <num>,
                     "eventWait" :  <num>,
                     "cancels" : <num>,
                     "waits" : <num>,
                     "scheduledNetCmd" : <num>,
                     "scheduledDBWork" : <num>,
                     "scheduledXclWork" : <num>,
                     "scheduledWorkAt" :  <num>,
                     "scheduledWork" :  <num>,
                     "schedulingFailures" :  <num>
                  },
                  "queues" : {
                     "networkInProgress" : <num>,
                     "dbWorkInProgress" : <num>,
                     "exclusiveInProgress" : <num>,
                     "sleepers" : <num>,
                     "ready" : <num>,
                     "free" : <num>
                  },
                  "unsignaledEvents" : <num>,
                  "eventWaiters" : <num>,
                  "shuttingDown" : <boolean>
                  "networkInterface" : "NetworkInterfaceASIO inShutdown: 0"
         },
         "apply" : {
            "batches" : {
               "num" : <num>,
               "totalMillis" : <num>
            },
            "ops" : NumberLong(<num>)
         },
         "buffer" : {
            "count" : NumberLong(<num>),
            "maxSizeBytes" : <num>,
            "sizeBytes" : NumberLong(<num>)
         },
         "network" : {
            "bytes" : NumberLong(<num>),
            "getmores" : {
               "num" : <num>,
               "totalMillis" : <num>
            },
            "ops" : NumberLong(<num>),
            "readersCreated" : NumberLong(<num>)
         },
         "oplog" : {
            "insert" : {
               "num" : <num>,
               "totalMillis" : <num>
            },
            "insertBytes" : NumberLong(<num>)
         },
         "preload" : {
            "docs" : {
               "num" : <num>,
               "totalMillis" : <num>
            },
            "indexes" : {
               "num" : <num>,
               "totalMillis" : <num>
            }
         }
   },
   "storage" : {
         "freelist" : {
            "search" : {
               "bucketExhausted" : <num>,
               "requests" : <num>,
               "scanned" : <num>
            }
         }
   },
   "ttl" : {
         "deletedDocuments" : NumberLong(<num>),
         "passes" : NumberLong(<num>)
   }
},
metrics

A document that returns various statistics that reflect the current use and state of a running mongod instance.

metrics.commands

New in version 3.0.

A document that reports on the use of database commands. The fields in metrics.commands are the names of database commands and each value is a document that reports the total number of commands executed as well as the number of failed executions.

metrics.commands.<command>.failed

The number of times <command> failed on this mongod.

metrics.commands.<command>.total

The number of times <command> executed on this mongod.

metrics.document

A document that reflects document access and modification patterns. Compare these values to the data in the opcounters document, which track total number of operations.

metrics.document.deleted

The total number of documents deleted.

metrics.document.inserted

The total number of documents inserted.

metrics.document.returned

The total number of documents returned by queries.

metrics.document.updated

The total number of documents updated.

metrics.executor

New in version 3.2.

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

metrics.getLastError

A document that reports on getLastError use.

metrics.getLastError.wtime

A document that reports getLastError operation counts with a w argument greater than 1.

metrics.getLastError.wtime.num

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

metrics.getLastError.wtime.totalMillis

The total amount of time in milliseconds that the mongod has spent performing getLastError operations with write concern (i.e. w) that wait for one or more members of a replica set to acknowledge the write operation (i.e. a w value greater than 1.)

metrics.getLastError.wtimeouts

The number of times that write concern operations have timed out as a result of the wtimeout threshold to getLastError.

metrics.operation

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

metrics.operation.fastmod

If using MMAPv1 storage engine, the number of update operations that neither cause documents to grow nor require updates to the index. For example, this counter would record an update operation that use the $inc operator to increment the value of a field that is not indexed.

metrics.operation.idhack

The number of queries that contain the _id field. For these queries, MongoDB will use default index on the _id field and skip all query plan analysis.

metrics.operation.scanAndOrder

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

metrics.operation.writeConflicts

The total number of queries that encounted write conflicts.

metrics.queryExecutor

A document that reports data from the query execution system.

metrics.queryExecutor.scanned

The total number of index items scanned during queries and query-plan evaluation. This counter is the same as totalKeysExamined in the output of explain().

metrics.queryExecutor.scannedObjects

The total number of documents scanned during queries and query-plan evaluation. This counter is the same as totalDocsExamined in the output of explain().

metrics.record

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

metrics.record.moves

For MMAPv1 Storage Engine, metrics.record.moves reports the total number of times documents move within the on-disk representation of the MongoDB data set. Documents move as a result of operations that increase the size of the document beyond their allocated record size.

metrics.repl

A document that reports metrics related to the replication process. metrics.repl document appears on all mongod instances, even those that aren’t members of replica sets.

metrics.repl.apply

A document that reports on the application of operations from the replication oplog.

metrics.repl.apply.batches

metrics.repl.apply.batches reports on the oplog application process on secondaries members of replica sets. See Multithreaded Replication for more information on the oplog application processes

metrics.repl.apply.batches.num

The total number of batches applied across all databases.

metrics.repl.apply.batches.totalMillis

The total amount of time in milliseconds the mongod has spent applying operations from the oplog.

metrics.repl.apply.ops

The total number of oplog operations applied.

metrics.repl.buffer

MongoDB buffers oplog operations from the replication sync source buffer before applying oplog entries in a batch. metrics.repl.buffer provides a way to track the oplog buffer. See Multithreaded Replication for more information on the oplog application process.

metrics.repl.buffer.count

The current number of operations in the oplog buffer.

metrics.repl.buffer.maxSizeBytes

The maximum size of the buffer. This value is a constant setting in the mongod, and is not configurable.

metrics.repl.buffer.sizeBytes

The current size of the contents of the oplog buffer.

metrics.repl.network

metrics.repl.network reports network use by the replication process.

metrics.repl.network.bytes

metrics.repl.network.bytes reports the total amount of data read from the replication sync source.

metrics.repl.network.getmores

metrics.repl.network.getmores reports on the getmore operations, which are requests for additional results from the oplog cursor as part of the oplog replication process.

metrics.repl.network.getmores.num

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

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.

metrics.repl.network.ops

metrics.repl.network.ops reports the total number of operations read from the replication source.

metrics.repl.network.readersCreated

metrics.repl.network.readersCreated reports the total number of oplog query processes created. MongoDB will create a new oplog query any time an error occurs in the connection, including a timeout, or a network operation. Furthermore, metrics.repl.network.readersCreated will increment every time MongoDB selects a new source for replication.

metrics.repl.preload

metrics.repl.preload reports on the “pre-fetch” stage, where MongoDB loads documents and indexes into RAM to improve replication throughput.

See Multithreaded Replication for more information about the pre-fetch stage of the replication process.

metrics.repl.preload.docs

A document that reports on the documents loaded into memory during the pre-fetch stage.

metrics.repl.preload.docs.num

The total number of documents loaded during the pre-fetch stage of replication.

metrics.repl.preload.docs.totalMillis

The total amount of time spent loading documents as part of the pre-fetch stage of replication.

metrics.repl.preload.indexes

A document that reports on the index items loaded into memory during the pre-fetch stage of replication.

See Multithreaded Replication for more information about the pre-fetch stage of replication.

metrics.repl.preload.indexes.num

The total number of index entries loaded by members before updating documents as part of the pre-fetch stage of replication.

metrics.repl.preload.indexes.totalMillis

The total amount of time, in milliseconds, spent loading index entries as part of the pre-fetch stage of replication.

metrics.storage.freelist.search.bucketExhausted

The number of times that mongod has checked the free list without finding a suitably large record allocation.

metrics.storage.freelist.search.requests

The number of times mongod has searched for available record allocations.

metrics.storage.freelist.search.scanned

The number of available record allocations mongod has searched.

metrics.ttl

A document that reports on the operation of the resource use of the ttl index process.

metrics.ttl.deletedDocuments

The total number of documents deleted from collections with a ttl index.

metrics.ttl.passes

The number of times the background process removes documents from collections with a ttl index.

metrics.cursor

New in version 2.6.

A document that contains data regarding cursor state and use.

metrics.cursor.timedOut

New in version 2.6.

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.

metrics.cursor.open

New in version 2.6.

A document that contains data regarding open cursors.

metrics.cursor.open.noTimeout

New in version 2.6.

The number of open cursors with the option DBQuery.Option.noTimeout set to prevent timeout after a period of inactivity.

metrics.cursor.open.pinned

New in version 2.6.

The number of “pinned” open cursors.

metrics.cursor.open.total

New in version 2.6.

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, stale tailable cursors, or a large number of operations this value may rise.

metrics.cursor.open.singleTarget

New in version 3.0.

The total number of cursors that only target a single shard. Only mongos instances report metrics.cursor.open.singleTarget values.

metrics.cursor.open.multiTarget

New in version 3.0.

The total number of cursors that only target more than one shard. Only mongos instances report metrics.cursor.open.multiTarget values.

watchdog

New in version 3.2.16.

"watchdog" : {
   "checkGeneration" : NumberLong(<num>),
   "monitorGeneration" : NumberLong(<num>),
   "monitorPeriod" : <num>
}

Note

The watchdog section is only present if the Storage Node Watchdog is enabled.

watchdog

A document reporting the status of the Storage Node Watchdog.

watchdog.checkGeneration

The number of times the directories have been checked since startup. Directories are checked multiple times every monitoringPeriod.

watchdog.monitorGeneration

The number of times the status of all filesystems used by mongod has been checked. This is incremented once every monitoringPeriod.

watchdog.monitorPeriod

The value set by watchdogPeriodSeconds. This represents the period in between status checks.