OPTIONS
翻译或纠错本页面

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.

在 2.4 版更改: In 2.4 you can dynamically suppress portions of the db.serverStatus() output, or include suppressed sections in a document passed to the db.serverStatus() method, as in the following example:

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

db.serverStatus() includes all fields by default, except workingSet, by default.

注解

You may only dynamically include top-level fields from the serverStatus document that are not included by default. You can exclude any field that db.serverStatus() includes by default.

参见

serverStatus for complete documentation of the output of this function.

ON THIS PAGE