Abhishek
Abhishek

Reputation: 39

getting the number of clients connected

How do I get the number of clients that are currently connected to my server running MongoDB using PHP?

or is it even possible because when the query is executed and when it ends the connection closes and so the connection is open only for a few moments?

Upvotes: 1

Views: 128

Answers (1)

Smita Ahinave
Smita Ahinave

Reputation: 1888

try this ...may help you

db.serverStatus().connections

Upvotes: 1

Related Questions