- Reference >
mongo
Shell Methods >- Database Methods >
- db.serverStatus()
db.serverStatus()¶
-
db.
serverStatus
()¶ Returns a document that provides an overview of the database process’s state.
This command provides a wrapper around the database command
serverStatus
.
Behavior¶
By default, db.serverStatus()
excludes in its output:
- some content in the repl document.
- mirroredReads document. (Available starting in version 4.4)
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.
The following example includes all repl information in the output:
Include mirroredReads
¶
By default, the mirroredReads
information (available
starting in version 4.4) is not included in the output. To return
mirroredReads
information, you must explicitly specify
the inclusion:
Include latchAnalysis
¶
By default, the latchAnalysis
information (available
starting in version 4.4) is not included in the output. To return
latchAnalysis
information, you must explicitly specify
the inclusion:
Output¶
See serverStatus Output for complete documentation of the output of this function.