首页 > 代码库 > MongoDb --TOP 命令的一些监控信息

MongoDb --TOP 命令的一些监控信息

event types

  • total

  • readLock

  • writeLock

  • queries

  • getmore

  • insert

  • update

  • remove

  • commands

你可以使用下面命令:

db.adminCommand("top")

use admin
db.runCommand( { top: 1 } )

 output

{
  "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
                  }
          }}


MongoDb --TOP 命令的一些监控信息