db.currentOp() is the mongosh helper used to inspect operations currently executing on a MongoDB server. Passing true requests a broad view that includes all in-progress operations as well as additional idle/system entries, so it can be used when the administrator wants to see the complete current-operation picture. The database-command form, db.adminCommand({ currentOp: true }), invokes the corresponding administrative command and is also valid for obtaining in-progress operation information. Option A adds a filter restricting the result to operations whose op field is " command " ; it therefore does not represent all operation types. Option B is not valid currentOp command syntax, and option E uses an all field that is not the documented special form for this helper. In modern MongoDB administration, the $currentOp aggregation stage is generally preferred for richer filtering and aggregation, but the question is testing the traditional helper and command interfaces. Therefore, C and D are the two valid choices among those presented.
Study Guide reference/topic:Performance Monitoring and Tuning - current operations, currentOp, and administrative diagnostics.
===========
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit