check the status of mongodb server code example Example: mongodb get status db.runCommand( { serverStatus: 1 } )