Check the current number of connections to MongoDb

前端 未结 12 1095
南方客
南方客 2020-12-12 14:27

What is the command to get the number of clients connected to a particular MongoDB server?

12条回答
  •  一向
    一向 (楼主)
    2020-12-12 15:10

    db.runCommand( { "connPoolStats" : 1 } )

    {
        "numClientConnections" : 0,
        "numAScopedConnections" : 0,
        "totalInUse" : 0,
        "totalAvailable" : 0,
        "totalCreated" : 0,
        "hosts" : {
    
        },
        "replicaSets" : {
    
        },
        "ok" : 1
    }
    

提交回复
热议问题