Database Manual / Reference / Database Commands

Diagnostic Commands

Note

For details on a specific command, including syntax and examples, click on the link to the command's reference page.有关特定命令的详细信息,包括语法和示例,请单击指向该命令参考页面的链接。

Name名称Description描述
buildInfoDisplays statistics about the MongoDB build.显示有关MongoDB构建的统计信息。
collStatsReports storage utilization statics for a specified collection.报告指定集合的存储利用率统计数据。
connPoolStatsReports statistics on the outgoing connections from this MongoDB instance to other MongoDB instances in the deployment.报告此MongoDB实例到部署中其他MongoDB实例的传出连接的统计数据。
connectionStatusReports the authentication state for the current connection.报告当前连接的身份验证状态。
dataSizeReturns the data size for a range of data. For internal use.返回数据范围的数据大小。供内部使用。
dbHashReturns hash value a database and its collections.返回数据库及其集合的哈希值。
dbStatsReports storage utilization statistics for the specified database.报告指定数据库的存储利用率统计信息。
explainReturns information on the execution of various operations.返回有关各种操作执行的信息。
getCmdLineOptsReturns a document with the run-time arguments to the MongoDB instance and their parsed options.向MongoDB实例返回一个包含运行时参数及其解析选项的文档。
getLogReturns recent log messages.返回最近的日志消息。
hostInfoReturns data that reflects the underlying host system.返回反映底层主机系统的数据。
listCommandsLists all database commands provided by the current mongod instance.列出当前mongod实例提供的所有数据库命令。
lockInfoInternal command that returns information on locks that are currently being held or pending. 返回当前持有或挂起的锁信息的内部命令。Only available for mongod instances.仅适用于mongod实例。
pingInternal command that tests intra-deployment connectivity.测试内部部署连接的内部命令。
profileInterface for the database profiler.数据库分析器的接口。
serverStatusReturns a collection metrics on instance-wide resource utilization and status.返回实例范围内资源利用率和状态的集合指标。
topReturns raw usage statistics for each database in the mongod instance.返回mongod实例中每个数据库的原始使用统计数据。
validateInternal command that scans for a collection's data and indexes for correctness.扫描集合的数据和索引是否正确的内部命令。
validateDBMetadataChecks that the stored metadata of a database/collection is valid within a particular API version.检查数据库/集合的存储元数据在特定的API版本中是否有效。
whatsmyuriInternal command that returns information on the current client.返回当前客户端信息的内部命令。