Server Status Output¶
This document provides a quick overview and example of the
serverStatus
command. The helper db.serverStatus()
in the mongo
shell provides access to this output. For full
documentation of the content of this output, see
serverStatus.
Note
The fields included in this output vary slightly depending on the
version of MongoDB, underlying operating system platform, and the
kind of node, including mongos
, mongod
or
replica set member.
The Instance Information section displays
information regarding the specific mongod
and
mongos
and its state.
The locks section reports data that reflect the
state and use of both global (i.e. .
) and database specific locks:
The globalLock field reports on MongoDB’s global system lock. In most cases the locks document provides more fine grained data that reflects lock use:
The mem field reports on MongoDB’s current memory use:
The connections field reports on MongoDB’s current number of open connections:
Changed in version 2.4: The totalCreated
field.
The fields in the extra_info document provide platform specific information. The following example block is from a Linux-based system:
The indexCounters document reports on index use:
The backgroundFlushing document reports on the process MongoDB uses to write data to disk:
The cursors document reports on current cursor use and state:
The network document reports on network use and state:
The repl document reports on the state of replication and the replica set. This document only appears for replica sets.
The opcountersRepl document reports the number of replicated operations:
The opcounters document reports the number of operations this MongoDB instance has processed:
The asserts document reports the number of assertions or errors produced by the server:
The writeBacksQueued document reports the number of writebacks:
The Journaling (dur) document reports on data that
reflect this mongod
instance’s journaling-related operations
and performance during a journal group commit interval:
The recordStats document reports data on MongoDB’s ability to predict page faults and yield write operations when required data isn’t in memory:
The workingSet document provides an estimated
size of the MongoDB instance’s working set. This data may not exactly
reflect the size of the working set in all cases. Additionally, the
workingSet
document is only present in the
output of serverStatus
when explicitly enabled.
New in version 2.4.
The metrics document contains a number of
operational metrics that are useful for monitoring the state and
workload of a mongod
instance.
New in version 2.4.
The final ok
field holds the return status for the
serverStatus
command: