Which TWO commands can be used to check for all active operations on the current node?
A.
db.currentOp({ op : " command " })
B.
db.adminCommand({ " all " : currentOp})
C.
db.currentOp(true)
D.
db.adminCommand({ currentOp : true })
E.
db.currentOp({ " all " : true })
The Answer Is:
C, D
This question includes an explanation.
Explanation:
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.
===========
C100DBA PDF/Engine
Printable Format
Value of Money
100% Pass Assurance
Verified Answers
Researched by Industry Experts
Based on Real Exams Scenarios
100% Real Questions
Get 70% Discount on All Products,
Use Coupon: "coponace"