对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。
Docs 菜单

buildInfo(数据库命令)

buildInfo

The buildInfo command returns a build summary for the current mongod.

此命令可用于以下环境中托管的部署:

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

注意

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

该命令具有以下语法:

db.runCommand(
{
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>
}
buildInfo

The document returned by the buildInfo command.

这些字段是稳定的,应提供一致的行为。

buildInfo.gitVersion

提交标识符,用于标识用于构建mongod的代码的状态。

buildInfo.versionArray

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

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.

对于发布版本,此字符串将采用<major>.<minor>.<patch>格式,但开发版本可能包含其他信息。

buildInfo.storageEngines

服务器可用的 mongod存储引擎 列表。

此字段仅列出引擎名称。要获取WiredTiger版本,请参阅 serverStatus 输出中的wiredTiger.version。

buildInfo.javascriptEngine

string报告JavaScript 实例中使用的mongod 引擎的 。默认为mozjs 。

buildInfo.bits

一个反映mongod二进制文件的目标处理器架构的数字。

buildInfo.debug

一个布尔值。 true (使用调试选项构建时)。

buildInfo.maxBsonObjectSize

报告最大 BSON 文档大小的数字。

buildInfo.openssl

一个嵌入式文档,描述构建mongod时使用的以及当前正在使用的 TLS/SSL 库的版本。

buildInfo.modules

构建mongod所使用的附加模块列表。 目前可能的值包括“enterprise”和“Rocksdb”。

这些字段仅供内部使用,您不应期望它们的行为或存在在任何级别上都保持一致。

buildInfo.allocator

mongod使用的内存分配器。 默认为tcmalloc 。

注意

从 8.0 版开始,MongoDB 使用 TCMalloc 的更新版本,改进了内存碎片和管理。如需了解更多信息,请参阅 tcmalloc 升级。

buildInfo.buildEnvironment

嵌入式文档,其中包含有关mongod构建环境的各种调试信息。

给本页内容打分