du kan bruge denne kommando:
db.serverStatus()['connections']
{
"current" : 18,
"available" : 999982,
"totalCreated" : 2175,
"active" : 8,
"exhaustIsMaster" : 6,
"awaitingTopologyChanges" : 6
}
for at køre det via driveren, skal du bruge:var doc = db.RunCommand<BsonDocument>("{ serverStatus : 1 }");