On this page本页内容
top
top
is an administrative command that returns usage statistics for each collection. 是一个管理命令,用于返回每个集合的使用统计信息。top
provides amount of time, in microseconds, used and a count of operations for the following event types:提供以下事件类型的使用时间(以微秒为单位)和操作计数:
Issue the 对top
command against the admin database in the form:admin
数据库发出top
命令,格式如下:
{ top: 1 }
At 在mongosh
prompt, use top
with the following invocation:mongosh
提示符下,使用top
进行以下调用:
db.adminCommand("top")
Alternately you can use 或者,您可以使用top
as follows:top
,如下所示:
db.adminCommand( { top: 1 } )
The output of the top command would resemble the following output:top命令的输出类似于以下输出:
{ "totals" : { "records.users" : { "total" : { "time" : 305277, "count" : 2825 }, "readLock" : { "time" : 305264, "count" : 2824 }, "writeLock" : { "time" : 13, "count" : 1 }, "queries" : { "time" : 305264, "count" : 2824 }, "getmore" : { "time" : 0, "count" : 0 }, "insert" : { "time" : 0, "count" : 0 }, "update" : { "time" : 0, "count" : 0 }, "remove" : { "time" : 0, "count" : 0 }, "commands" : { "time" : 0, "count" : 0 } } }