I\'m writing an app using mongo as its db. I want to print the clients connected to the db, for example, print their ip. How can I get that info?
I tried using
You can use db.currentOp(true) and iterate over the inprog array of the result set, using the client field.
db.currentOp(true)
inprog
client