翻译或纠错本页面

buildInfo

On this page

buildInfo

The buildInfo command is an administrative command which returns a build summary for the current mongod. buildInfo has the following prototype form:

{ buildInfo: 1 }

In the mongo shell, call buildInfo in the following form:

db.runCommand( { buildInfo: 1 } )

Example

The output document of buildInfo has the following form:

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

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 used to build the mongod.

buildInfo.versionArray

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

document buildInfo.version

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.

document buildInfo.storageEngines

3.2 新版功能.

A list of storage engines avilable to the mongod server.

buildInfo.javascriptEngine

在 3.2 版更改.

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

buildInfo.bits

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

buildInfo.debug

A boolean. true when built with debugging options.

buildInfo.maxBsonObjectSize

A number that reports the Maximum BSON Document Size.

buildInfo.openssl

An embedded document describing the version of OpenSSL that mongod was built with, as well as the version of OpenSSL that mongod is currently using.

buildInfo.modules

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

Unstable

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

buildInfo.sysInfo

3.2 版后已移除.

buildInfo.sysInfo no longer contains useful information.

buildInfo.allocator

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

buildInfo.buildEnvironment

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