- Reference >
- JavaScript Methods >
- db.currentOp()
db.currentOp()¶
-
db.
currentOp
()¶ Returns: A document that contains an array named inprog
.The
inprog
array reports the current operation in progress for the database instance. See Current Operation Reporting for full documentation of the output ofdb.currentOp()
.db.currentOp()
is only available for users with administrative privileges.Consider the following JavaScript operations for the
mongo
shell that you can use to filter the output of identify specific types of operations:Return all pending write operations:
Return the active write operation:
Return all active read operations:
Warning
Terminate running operations with extreme caution. Only use
db.killOp()
to terminate operations initiated by clients and do not terminate internal database operations.