Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-2113

db.currentOp() optional predicate not documented

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • 01112017-cleanup
    • None
    • manual
    • None

    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)
      				}
      			}
      		}
      	]
      }
      >

      Attachments

        Activity

          People

            Unassigned Unassigned
            rassi J Rassi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              9 years, 26 weeks, 1 day ago