how to check number of connections to mongodb code example
Example: mongodb check connection status
> var status = db.serverStatus()
> status.connections
{"current" : 21, "available" : 15979}
>
> var status = db.serverStatus()
> status.connections
{"current" : 21, "available" : 15979}
>