buildInfo
Definition
Compatibility
This command is available in deployments hosted in the following environments:
MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud
Note
This command is supported in all MongoDB Atlas clusters. For information on Atlas support for all commands, see Unsupported Commands.
MongoDB Enterprise: The subscription-based, self-managed version of MongoDB
MongoDB Community: The source-available, free-to-use, and self-managed version of MongoDB
Syntax
The command has the following syntax:
db.runCommand( { buildInfo: 1 } )
Usage
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> }
Output
buildInfoThe document returned by the
buildInfocommand.
Supported
These fields are stable and should provide consistent behavior.
buildInfo.gitVersionThe commit identifier that identifies the state of the code used to build the
mongod.
buildInfo.versionArrayAn array that conveys version information about the
mongodinstance. Seeversionfor a more readable version of this string.
buildInfo.versionA string that conveys version information about the
mongodinstance. If you need to present version information to a human, this field is preferable toversionArray.This string will take the format
<major>.<minor>.<patch>in the case of a release, but development builds may contain additional information.
buildInfo.storageEnginesA list of storage engines available to the
mongodserver.
buildInfo.javascriptEngineA string that reports the JavaScript engine used in the
mongodinstance. By default, this ismozjs.
buildInfo.bitsA number that reflects the target processor architecture of the
mongodbinary.
buildInfo.maxBsonObjectSizeA number that reports the Maximum BSON Document Size.
buildInfo.opensslAn embedded document describing the version of the TLS/SSL library that
mongodwas built with and is currently using.
buildInfo.modulesA list of add-on modules that
mongodwas 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.allocatorThe memory allocator that
mongoduses. By default this istcmalloc.
buildInfo.buildEnvironmentAn embedded document containing various debugging information about the
mongodbuild environment.