Find long-running operations
MongoDBMaintenanceCommand
db.currentOp({ "active": true, "secs_running": { $gt: 5 } })What it does
Lists active operations that have been running for more than 5 seconds.
When to use it
When identifying problem queries during slowness or lockups.
Caution
Read-only command; no risk.