Definition定义
buildInfoThebuildInfocommand returns a build summary for the currentmongod.buildInfo命令返回当前mongod的构建摘要。
Compatibility兼容性
This command is available in deployments hosted in the following environments:此命令在以下环境中托管的部署中可用:
- MongoDB Atlas
: The fully managed service for MongoDB deployments in the cloud:云中MongoDB部署的完全托管服务
Note
This command is supported in all MongoDB Atlas clusters. 所有MongoDB Atlas集群都支持此命令。For information on Atlas support for all commands, see Unsupported Commands.有关Atlas支持所有命令的信息,请参阅不支持的命令。
- MongoDB Enterprise
: The subscription-based, self-managed version of MongoDB:MongoDB的基于订阅的自我管理版本 - MongoDB Community
: The source-available, free-to-use, and self-managed version of MongoDB:MongoDB的源代码可用、免费使用和自我管理版本
Syntax语法
The command has the following syntax:该命令具有以下语法:
db.runCommand(
{
buildInfo: 1
}
)Usage用法
In 在mongosh, call buildInfo in the following form:mongosh中,按以下形式调用buildInfo:
db.runCommand( { buildInfo: 1 } )
The output document of buildInfo has the following form:buildInfo的输出文档具有以下形式:
{
"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 thebuildInfocommand.buildInfo命令返回的文档。
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.mongod的代码状态的提交标识符。
buildInfo.versionArrayAn array that conveys version information about the一个数组,用于传达mongodinstance. Seeversionfor a more readable version of this string.mongod实例的版本信息。有关此字符串的更易读版本,请参阅version。
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.mongod实例的版本信息。如果你需要向人展示版本信息,这个字段比versionArray更可取。This string will take the format此字符串将在发布的情况下采用<major>.<minor>.<patch>in the case of a release, but development builds may contain additional information.<major>.<minor>.<patch>格式,但开发版本可能包含其他信息。
buildInfo.storageEnginesA list of storage engines available to themongodserver.mongod服务器可用的存储引擎列表。
buildInfo.javascriptEngineA string that reports the JavaScript engine used in the一个字符串,用于报告mongodinstance. By default, this ismozjs.mongod实例中使用的JavaScript引擎。默认情况下,这是mozjs。
buildInfo.bitsA number that reflects the target processor architecture of the一个反映mongodbinary.mongod二进制文件的目标处理器架构的数字。
buildInfo.debugA boolean.布尔值。当使用调试选项构建时为truewhen built with debugging options.true。
buildInfo.maxBsonObjectSizeA number that reports the Maximum BSON Document Size.报告最大BSON文档大小的数字。
buildInfo.opensslAn embedded document describing the version of the TLS/SSL library that一个嵌入式文档,描述了mongodwas built with and is currently using.mongod构建和当前使用的TLS/SSL库的版本。
buildInfo.modulesA list of add-on modules thatmongodwas built with. Possible values currently include "enterprise" and "rocksdb".mongod构建时使用的附加模块列表。目前可能的值包括“企业”和“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 thatmongoduses. By default this istcmalloc.mongod使用的内存分配器。默认情况下,这是tcmalloc。Note
Starting in version 8.0, MongoDB uses an updated version of TCMalloc that improves memory fragmentation and management. See tcmalloc upgrade for more information.从8.0版本开始,MongoDB使用TCMalloc的更新版本,改进了内存分片和管理。有关更多信息,请参阅tcmalloc升级。
buildInfo.buildEnvironmentAn embedded document containing various debugging information about the一个嵌入式文档,包含有关mongodbuild environment.mongod构建环境的各种调试信息。