buildInfo

  • buildInfo
  • The buildInfo command is an administrative command whichreturns a build summary for the currentmongod. buildInfo has the followingprototype form:
  1. { buildInfo: 1 }

In the mongo shell, call buildInfo in thefollowing form:

  1. db.runCommand( { buildInfo: 1 } )

Example

The output document of buildInfo has the followingform:

  1. {
  2. "version" : "<string>",
  3. "gitVersion" : "<string>",
  4. "sysInfo" : "<string>",
  5. "loaderFlags" : "<string>",
  6. "compilerFlags" : "<string>",
  7. "allocator" : "<string>",
  8. "versionArray" : [ <num>, <num>, <...> ],
  9. "javascriptEngine" : "<string>",
  10. "bits" : <num>,
  11. "debug" : <boolean>,
  12. "maxBsonObjectSize" : <num>,
  13. "ok" : <num>
  14. }

Output

  • buildInfo
  • The document returned by the buildInfo command.

Supported

These fields are stable and should provide consistent behavior.

  • buildInfo.gitVersion
  • The commit identifier that identifies the state of the code usedto build the mongod.
  • buildInfo.versionArray
  • An array that conveys version information about themongod instance. See version for amore readable version of this string.
  • document buildInfo.version
  • A string that conveys version information about themongod instance. If you need to present version information toa human, this field is preferable to versionArray.

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

  • document buildInfo.storageEngines

New in version 3.2.

A list of storage engines available to themongod server.

  • buildInfo.javascriptEngine

Changed in version 3.2.

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

  • buildInfo.bits
  • A number that reflects the target processor architecture of themongod binary.
  • buildInfo.debug
  • A boolean. true when built with debugging options.
  • buildInfo.openssl
  • An embedded document describing the version of TLS/SSL library thatmongod was built with and is currently using.
  • buildInfo.modules
  • A list of add-on modules that mongod was built with. Possiblevalues currently include “enterprise” and “rocksdb”.

Unstable

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

  • buildInfo.sysInfo

Deprecated since version 3.2.

buildInfo.sysInfo no longer contains useful information.

  • buildInfo.allocator
  • The memory allocator that mongod uses. By defaultthis is tcmalloc.
  • buildInfo.buildEnvironment
  • An embedded document containing various debugging information about themongod build environment.