see if mongodb is running code example Example: mongodb get status db.runCommand( { serverStatus: 1 } )