Blog - Single Post

List all active connections to MongoDB instance

  • Monday, August 8, 2016
  • by hbopuri

db.currentOp(true).inprog.forEach( 
     function(myDoc) { 
         if(myDoc.client != undefined ){ 
               print( "client: " + myDoc.client ); }} );

You may also explore

db.serverStatus()