[DOCS-2113] db.currentOp() optional predicate not documented Created: 18/Oct/13  Updated: 11/Jan/17  Resolved: 19/Aug/14

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Bug Priority: Major - P3
Reporter: J Rassi Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 9 years, 26 weeks, 1 day ago

 Description   

The optional argument accepted by db.currentOp() can be "true" (documented) or it can be a predicate expression (not documented). If a predicate expression is passed, the result is filtered to those operations match the predicate. Example usage:

> db.currentOp({secs_running:{$gt:1}})
{
	"inprog" : [
		{
			"opid" : 64,
			"active" : true,
			"secs_running" : 2,
			"op" : "query",
			"ns" : "test",
			"query" : {
				"$eval" : "sleep(10000)"
			},
			"client" : "127.0.0.1:56082",
			"desc" : "conn2",
			"threadId" : "0x110395000",
			"connectionId" : 2,
			"locks" : {
				"^" : "W"
			},
			"waitingForLock" : false,
			"numYields" : 0,
			"lockStats" : {
				"timeLockedMicros" : {
 
				},
				"timeAcquiringMicros" : {
					"R" : NumberLong(0),
					"W" : NumberLong(2)
				}
			}
		}
	]
}
>



 Comments   
Comment by Kay Kim (Inactive) [ 19/Aug/14 ]

done as part of DOCS-3754

Generated at Thu Feb 08 07:42:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.