A MongoDB diagnostic command reports server state, resource usage, workload activity, or other operational information. These commands provide direct visibility into performance and operational status, helping identify bottlenecks and analyze query execution. Atlas monitoring tools often use them under the hood. section 21.2.3 section 21.5
Use the command that matches the operational question:
- Run db.serverStatus() for instance information, memory use, connections, network statistics, operation counters, WiredTiger tickets, and resource queues. section 21.2.3
- Use replSetGetStatus alongside these commands when examining replica-set operational information. section 21.5
Read server pressure carefully
Inspect current ticket use with db.serverStatus().wiredTiger.concurrentTransactions in mongosh. Read and write tickets limit concurrent WiredTiger operations. In MongoDB 7.0 and later, dynamically adjusted ticket counts mean prolonged availability of 0 does not by itself indicate overload; in MongoDB 6.0 and earlier, prolonged 0 availability likely indicates overload. Also inspect globalLock.currentQueue: consistently high read or write queues, especially above 100, suggest delayed operations caused by resource contention. section 21.2.3
