Docs Menu

Docs HomeMongoDB Manual


On this page

  • Definition
  • Compatibility
  • Syntax
  • Usage
  • Output

The buildInfo command is an administrative command which returns a build summary for the current mongod.

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

  • MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud


This command is supported in all MongoDB Atlas clusters. For information on all commands, see Unsupported Commands.

The command has the following syntax:

buildInfo: 1

In mongosh, call buildInfo in the following form:

db.runCommand( { buildInfo: 1 } )

The output document of buildInfo has the following form:

"version" : "<string>",
"gitVersion" : "<string>",
"sysInfo" : "<string>",
"loaderFlags" : "<string>",
"compilerFlags" : "<string>",
"allocator" : "<string>",
"versionArray" : [ <num>, <num>, <...> ],
"openssl" : <document>,
"javascriptEngine" : "<string>",
"bits" : <num>,
"debug" : <boolean>,
"maxBsonObjectSize" : <num>,
"storageEngines" : [ "<string>", "<string>", "<...>" ],
"ok" : <num>

The document returned by the buildInfo command.

These fields are stable and should provide consistent behavior.


The commit identifier that identifies the state of the code used to build the mongod.


An array that conveys version information about the mongod instance. See version for a more readable version of this string.


A string that conveys version information about the mongod instance. If you need to present version information to a human, this field is preferable to versionArray.

This string will take the format <major>.<minor>.<patch> in the case of a release, but development builds may contain additional information.


A list of storage engines available to the mongod server.


A string that reports the JavaScript engine used in the mongod instance. By default, this is mozjs after version 3.2, and previously V8.


A number that reflects the target processor architecture of the mongod binary.


A boolean. true when built with debugging options.


A number that reports the Maximum BSON Document Size.


An embedded document describing the version of the TLS/SSL library that mongod was built with and is currently using.


A list of add-on modules that mongod was built with. Possible values currently include "enterprise" and "rocksdb".

These fields are for internal use only, and you should not expect their behavior or existence to remain consistent on any level.


Deprecated since version 3.2.

buildInfo.sysInfo no longer contains useful information.


The memory allocator that mongod uses. By default this is tcmalloc.


An embedded document containing various debugging information about the mongod build environment.

←  Diagnostic CommandscollStats →