mongosh --eval 'db.adminCommand({serverStatus: 1})'

Category: Databases & SQL

mongosh --eval 'db.adminCommand({serverStatus: 1})'

Show server status and metrics

Returns uptime, version, connections, memory, and operation counters for the whole server. The main dashboard for capacity and health checks. Requires a user with the hostInfo or serverStatus privilege.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.