diff --git a/source/includes/currentOp-output-example.rst b/source/includes/currentOp-output-example.rst new file mode 100644 index 00000000000..e9d986caf28 --- /dev/null +++ b/source/includes/currentOp-output-example.rst @@ -0,0 +1,78 @@ +.. code-block:: javascript + + { + "inprog": [ + { + "desc" : , + "threadId" : , + "connectionId" : , + "client" : , + "appName" : , + "opid" : , + "active" : , + "secs_running" : , + "microsecs_running" : , + "op" : , + "ns" : , + "query" : , + "insert" : , + "planSummary": , + "client" : , + "appName" : , + "msg": , + "progress" : { + "done" : , + "total" : + }, + "killPending" : , + "numYields" : , + "locks" : { + "Global" : , + "MMAPV1Journal" : , + "Database" : , + "Collection" : , + "Metadata" : , + "oplog" : + }, + "waitingForLock" : , + "lockStats" : { + "Global": { + "acquireCount": { + "r": , + "w": , + "R": , + "W": + }, + "acquireWaitCount": { + "r": , + "w": , + "R": , + "W": + }, + "timeAcquiringMicros" : { + "r" : NumberLong(0), + "w" : NumberLong(0), + "R" : NumberLong(0), + "W" : NumberLong(0) + }, + "deadlockCount" : { + "r" : NumberLong(0), + "w" : NumberLong(0), + "R" : NumberLong(0), + "W" : NumberLong(0) + } + }, + "MMAPV1Journal": { + ... + }, + "Database" : { + ... + }, + ... + } + }, + ... + ], + "fsyncLock": , + "info": + } diff --git a/source/includes/fact-diagnostic-info.rst b/source/includes/fact-diagnostic-info.rst index 97ec799b4cb..d135211f883 100644 --- a/source/includes/fact-diagnostic-info.rst +++ b/source/includes/fact-diagnostic-info.rst @@ -1,7 +1,8 @@ -:method:`db.currentOp()` and the +|operation| and the :doc:`database profiler` report the same basic diagnostic information for all CRUD operations, including the -following. +following: + - :dbcommand:`aggregate` - :dbcommand:`count` diff --git a/source/includes/ref-toc-command-administration.yaml b/source/includes/ref-toc-command-administration.yaml index 1c6662426bb..30008434392 100644 --- a/source/includes/ref-toc-command-administration.yaml +++ b/source/includes/ref-toc-command-administration.yaml @@ -114,6 +114,10 @@ name: ":dbcommand:`killOp`" file: /reference/command/killOp description: "Terminates an operation as specified by the operation ID." --- +name: ":dbcommand:`currentOp`" +file: /reference/command/currentOp +description: "Returns a document that contains information on in-progress operations for the database instance." +--- name: ":dbcommand:`setFeatureCompatibilityVersion`" file: /reference/command/setFeatureCompatibilityVersion description: "Enables or disables MongoDB 3.4 features that persist data that are backwards-incompatible with MongoDB 3.2." diff --git a/source/reference/command/currentOp.txt b/source/reference/command/currentOp.txt new file mode 100644 index 00000000000..2c215b3d5d0 --- /dev/null +++ b/source/reference/command/currentOp.txt @@ -0,0 +1,461 @@ +========= +currentOp +========= + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 1 + :class: singlecol + +Definition +---------- + +.. dbcommand:: currentOp + + .. |command| replace:: currentOp + + .. |operation| replace:: :dbcommand:`currentOp` + + Returns a :term:`document` that contains information on in-progress + operations for the :program:`mongod` instance. + + :dbcommand:`currentOp` has the following form: + + .. code-block:: javascript + + { currentOp: 1 } + + The :program:`mongo` shell provides the :method:`db.currentOp()` + wrapper for the :dbcommand:`currentOp` command. + +Behavior +-------- + +:dbcommand:`currentOp` must run against the ``admin`` database, and +it can accept several optional fields. + +.. list-table:: + :header-rows: 1 + :widths: 15 85 + + * - Field + - Description + + * - ``"$ownOps"`` + + - Boolean. If set to ``true``, returns information on the current user's + operations only. + + On :program:`mongod` instances, users are always authorized to run + :dbcommand:`currentOp` with ``"$ownOps": true`` to view their own + operations. See :ref:`access control `. + + .. versionadded:: 3.2.9 + + * - ``"$all"`` + + - Boolean. If set to ``true``, returns information on all operations, + including operations on idle connections and system operations. + + ``"$all": true`` overrides any output field filters. + + * - + + - Specify filter conditions on the :ref:`currentOp-output-fields`. + See :ref:`currentOp-examples`. + +:dbcommand:`currentOp` and the +:doc:`database profiler` report the same +basic diagnostic information for all CRUD operations, including the +following: + +.. include:: /includes/fact-diagnostic-info.rst + +.. _currentOp-access-control: + +Access Control +-------------- + +On systems running with :setting:`~security.authorization`, the user +must have access that includes the :authaction:`inprog` privilege +action. + +.. versionchanged:: 3.2.9 + + On :program:`mongod` instances, users can use ``$ownOps`` + to view their own operations without the + :authaction:`inprog` privilege action. + + .. code-block:: javascript + + db.adminCommand( { currentOp: 1, "$ownOps": 1 } ) + +.. seealso:: :ref:`create-role-to-manage-ops` + +.. _currentOp-examples: + +Examples +-------- + +The following examples use the :dbcommand:`currentOp` command with +various query documents to filter the output. + +Display All Current Operations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code-block:: javascript + + db.adminCommand( + { + currentOp: true, + "$all": true + } + ) + +Write Operations Waiting for a Lock +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The following example returns information on all write operations that +are waiting for a lock: + +.. code-block:: javascript + + db.adminCommand( + { + currentOp: true, + "waitingForLock" : true, + $or: [ + { "op" : { "$in" : [ "insert", "update", "remove" ] } }, + { "query.findandmodify": { $exists: true } } + ] + } + ) + +Active Operations with no Yields +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The following example returns information on all active running +operations that have never yielded: + +.. code-block:: javascript + + db.adminCommand( + { + currentOp: true, + "active" : true, + "numYields" : 0, + "waitingForLock" : false + } + ) + +Active Operations on a Specific Database +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The following example returns information on all active operations for +database ``db1`` that have been running longer than 3 seconds: + +.. code-block:: javascript + + db.adminCommand( + { + currentOp: true, + "active" : true, + "secs_running" : { "$gt" : 3 }, + "ns" : /^db1\./ + } + ) + +.. _currentOp-index-creation: + +Active Indexing Operations +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The following example returns information on index creation operations: + +.. code-block:: javascript + + db.adminCommand( + { + currentOp: true, + $or: [ + { op: "query", "query.createIndexes": { $exists: true } }, + { op: "insert", ns: /\.system\.indexes\b/ } + ] + } + ) + +Output Example +-------------- + +The following is a prototype of :dbcommand:`currentOp` output. + +.. include:: /includes/currentOp-output-example.rst + +.. _currentOp-output-fields: + +Output Fields +------------- + +.. data:: currentOp.desc + + A description of the client. This string includes the + :data:`~currentOp.connectionId`. + +.. data:: currentOp.threadId + + An identifier for the thread that handles the operation and its + connection. + +.. data:: currentOp.connectionId + + An identifier for the connection where the operation originated. + +.. data:: currentOp.client + + A string with information about where the operation originated. + +.. data:: currentOp.appName + + A string with information about the type of client which made the + request. + +.. data:: currentOp.opid + + The identifier for the operation. You can pass this value to + :method:`db.killOp()` in the :program:`mongo` shell to terminate the + operation. + + .. include:: /includes/extracts/warning-terminating-ops-method.rst + +.. data:: currentOp.active + + A boolean value specifying whether the operation has started. Value + is ``true`` if the operation has started or ``false`` if the + operation is idle, such as an idle connection or an internal thread + that is currently idle. An operation can be active even if the + operation has yielded to another operation. + + .. versionchanged:: 3.0 + + For some inactive background threads, such as an inactive + ``signalProcessingThread``, MongoDB suppresses various empty + fields. + +.. data:: currentOp.secs_running + + The duration of the operation in seconds. MongoDB calculates this + value by subtracting the current time from the start time of the + operation. + + Only appears if the operation is running; i.e. if + :data:`~currentOp.active` is ``true``. + +.. data:: currentOp.microsecs_running + + .. versionadded:: 2.6 + + The duration of the operation in microseconds. MongoDB calculates this + value by subtracting the current time from the start time of the + operation. + + Only appears if the operation is running; i.e. if + :data:`~currentOp.active` is ``true``. + +.. data:: currentOp.op + + A string that identifies the type of operation. The possible values + are: + + - ``"none"`` + - ``"update"`` + - ``"insert"`` + - ``"query"`` + - ``"getmore"`` + - ``"remove"`` + - ``"killcursors"`` + + ``"query"`` operations include read operations as well as most + commands such as the :dbcommand:`createIndexes` command and the + :dbcommand:`findandmodify` command. + + .. versionchanged:: 3.0 + + Write operations that use the :dbcommand:`insert`, + :dbcommand:`update`, and :dbcommand:`delete` commands + respectively display ``"insert"``, ``"update"``, and ``"delete"`` + for :data:`~currentOp.op`. Previous versions include these write + commands under ``"query"`` operations. + +.. data:: currentOp.ns + + The :term:`namespace` the operation targets. A namespace consists of + the :term:`database` name and the :term:`collection` name + concatenated with a dot (``.``); that is, + ``"."``. + +.. data:: currentOp.insert + + Contains the document to be inserted for operations with + :data:`~currentOp.op` value of ``"insert"``. Only appears for + operations with :data:`~currentOp.op` value ``"insert"``. + + Insert operations such as :method:`db.collection.insert()` that use + the :dbcommand:`insert` command will have :data:`~currentOp.op` value + of ``"query"``. + +.. data:: currentOp.query + + A document containing information on operations whose + :data:`~currentOp.op` value is *not* ``"insert"``. For instance, for + a :method:`db.collection.find()` operation, the + :data:`~currentOp.query` contains the query predicate. + + :data:`~currentOp.query` does not appear for :data:`~currentOp.op` + of ``"insert"``. :data:`~currentOp.query` can also be an empty + document. + + For :data:`"update" ` or :data:`"remove" + ` operations or for read operations categorized under + :data:`"query" `, the :data:`~currentOp.query` + document contains the query predicate for the operations. + + .. include:: /includes/extracts/currentOp-getmore-operation-query-field.rst + + For other commands categorized under :data:`"query" `, + :data:`~currentOp.query` contains the issued command + document. Refer to the specific command reference page for the details + on the command document. + + .. versionchanged:: 3.0 + + Previous versions categorized operations that used write + commands under :data:`~currentOp.op` of ``"query"`` and returned + the write command information (e.g. query predicate, update + statement, and update options) in :data:`~currentOp.query` + document. + +.. data:: currentOp.planSummary + + A string that contains the query plan to help debug slow queries. + +.. data:: currentOp.client + + The IP address (or hostname) and the ephemeral port of the client + connection where the operation originates. If your ``inprog`` + array has operations from many different clients, use this string + to relate operations to clients. + +.. data:: currentOp.appName + + .. include:: /includes/fact-client-appname.rst + +.. data:: currentOp.locks + + .. versionchanged:: 3.0 + + The :data:`~currentOp.locks` document reports the type and mode of + locks the operation currently holds. The possible lock types are as + follows: + + .. include:: /includes/fact-lock-types.rst + + The possible modes are as follows: + + .. include:: /includes/fact-lock-modes.rst + +.. data:: currentOp.waitingForLock + + Returns a boolean value. :data:`~currentOp.waitingForLock` is ``true`` if the + operation is waiting for a lock and ``false`` if the operation has + the required lock. + +.. data:: currentOp.msg + + The :data:`~currentOp.msg` provides a message that describes the status and + progress of the operation. In the case of indexing or mapReduce + operations, the field reports the completion percentage. + +.. data:: currentOp.progress + + Reports on the progress of mapReduce or indexing operations. The + :data:`~currentOp.progress` fields corresponds to the completion percentage in + the :data:`~currentOp.msg` field. The :data:`~currentOp.progress` specifies the following + information: + + .. data:: currentOp.progress.done + + Reports the number completed. + + .. data:: currentOp.progress.total + + Reports the total number. + +.. data:: currentOp.killPending + + Returns ``true`` if the operation is currently flagged for + termination. When the operation encounters its next safe termination point, the + operation will terminate. + +.. data:: currentOp.numYields + + :data:`~currentOp.numYields` is a counter that reports the number of times the + operation has yielded to allow other operations to complete. + + Typically, operations yield when they need access to data that + MongoDB has not yet fully read into memory. This allows + other operations that have data in memory to complete quickly + while MongoDB reads in data for the yielding operation. + +.. data:: currentOp.fsyncLock + + Specifies if database is currently locked for :method:`fsync + write/snapshot `. + + Only appears if locked; i.e. if :data:`~currentOp.fsyncLock` is + ``true``. + +.. data:: currentOp.info + + Information regarding how to unlock database from + :method:`db.fsyncLock()`. Only appears if + :data:`~currentOp.fsyncLock` is ``true``. + +.. data:: currentOp.lockStats + + For each lock type and mode (see :data:`currentOp.locks` for + descriptions of lock types and modes), returns the following + information: + + .. COMMENT + these definitions are for per operations and not for server, + as such, they differ from those in serverStatus.txt + + .. data:: currentOp.lockStats.acquireCount + + Number of times the operation acquired the lock in the specified + mode. + + .. data:: currentOp.lockStats.acquireWaitCount + + Number of times the operation had to wait for the + :data:`~currentOp.lockStats.acquireCount` lock acquisitions + because the locks were held in a conflicting mode. + :data:`~currentOp.lockStats.acquireWaitCount` is less than or + equal to :data:`~currentOp.lockStats.acquireCount`. + + .. data:: currentOp.lockStats.timeAcquiringMicros + + Cumulative time in microseconds that the operation had to wait to + acquire the locks. + + :data:`~currentOp.lockStats.timeAcquiringMicros` divided by + :data:`~currentOp.lockStats.acquireWaitCount` gives an + approximate average wait time for the particular lock mode. + + .. data:: currentOp.lockStats.deadlockCount + + Number of times the operation encountered deadlocks while waiting + for lock acquisitions. diff --git a/source/reference/method/db.currentOp.txt b/source/reference/method/db.currentOp.txt index 3fde260d878..6116353121d 100644 --- a/source/reference/method/db.currentOp.txt +++ b/source/reference/method/db.currentOp.txt @@ -15,16 +15,21 @@ Definition .. method:: db.currentOp() + .. |command| replace:: db.currentOp() + + .. |operation| replace:: :method:`db.currentOp()` + Returns a :term:`document` that contains information on in-progress - operations for the database instance. + operations for the database instance. The :method:`db.currentOp()` + method wraps the database command :dbcommand:`currentOp`. - :method:`db.currentOp()` method has the following form: + :method:`db.currentOp()` has the following form: .. code-block:: javascript db.currentOp() - The :method:`db.currentOp()` method can take the following *optional* + :method:`db.currentOp()` can take the following *optional* argument: .. include:: /includes/apiargs/method-db.currentOp-param.rst @@ -65,16 +70,16 @@ filter. The filter document can contain: including operations on idle connections and system operations. If the document includes ``"$all": true`` along with - :ref:`currentOp-output-fields` conditions, only the + :ref:`db.currentOp-output-fields` conditions, only the ``"$all":true`` applies. - * - :ref:`currentOp-output-fields` + * - - - Specify filter conditions on the :ref:`currentOp-output-fields`. + - Specify filter conditions on the :ref:`db.currentOp-output-fields`. See :ref:`currentOp-examples`. If the document includes ``"$all": true`` along with - :ref:`currentOp-output-fields` conditions, only the ``"$all": + :ref:`db.currentOp-output-fields` conditions, only the ``"$all": true`` applies. Passing in ``true`` to :method:`db.currentOp()` is equivalent to @@ -118,336 +123,12 @@ Output Example The following is a prototype of :method:`db.currentOp()` output. -.. code-block:: javascript +.. include:: /includes/currentOp-output-example.rst - { - "inprog": [ - { - "desc" : , - "threadId" : , - "connectionId" : , - "opid" : , - "active" : , - "secs_running" : , - "microsecs_running" : , - "op" : , - "ns" : , - "query" : , - "insert" : , - "planSummary": , - "client" : , - "appName" : , - "msg": , - "progress" : { - "done" : , - "total" : - }, - "killPending" : , - "numYields" : , - "locks" : { - "Global" : , - "MMAPV1Journal" : , - "Database" : , - "Collection" : , - "Metadata" : , - "oplog" : - }, - "waitingForLock" : , - "lockStats" : { - "Global": { - "acquireCount": { - "r": , - "w": , - "R": , - "W": - }, - "acquireWaitCount": { - "r": , - "w": , - "R": , - "W": - }, - "timeAcquiringMicros" : { - "r" : NumberLong(0), - "w" : NumberLong(0), - "R" : NumberLong(0), - "W" : NumberLong(0) - }, - "deadlockCount" : { - "r" : NumberLong(0), - "w" : NumberLong(0), - "R" : NumberLong(0), - "W" : NumberLong(0) - } - }, - "MMAPV1Journal": { - ... - }, - "Database" : { - ... - }, - ... - } - }, - ... - ], - "fsyncLock": , - "info": - } - -.. _currentOp-output-fields: +.. _db.currentOp-output-fields: Output Fields ------------- -.. data:: currentOp.desc - - A description of the client. This string includes the - :data:`~currentOp.connectionId`. - -.. data:: currentOp.threadId - - An identifier for the thread that handles the operation and its - connection. - -.. data:: currentOp.connectionId - - An identifier for the connection where the operation originated. - -.. data:: currentOp.opid - - The identifier for the operation. You can pass this value to - :method:`db.killOp()` in the :program:`mongo` shell to terminate the - operation. - - .. include:: /includes/extracts/warning-terminating-ops-method.rst - -.. data:: currentOp.active - - A boolean value specifying whether the operation has started. Value - is ``true`` if the operation has started or ``false`` if the - operation is idle, such as an idle connection or an internal thread - that is currently idle. An operation can be active even if the - operation has yielded to another operation. - - .. versionchanged:: 3.0 - - For some inactive background threads, such as an inactive - ``signalProcessingThread``, MongoDB suppresses various empty - fields. - -.. data:: currentOp.secs_running - - The duration of the operation in seconds. MongoDB calculates this - value by subtracting the current time from the start time of the - operation. - - Only appears if the operation is running; i.e. if - :data:`~currentOp.active` is ``true``. - -.. data:: currentOp.microsecs_running - - .. versionadded:: 2.6 - - The duration of the operation in microseconds. MongoDB calculates this - value by subtracting the current time from the start time of the - operation. - - Only appears if the operation is running; i.e. if - :data:`~currentOp.active` is ``true``. - -.. data:: currentOp.op - - A string that identifies the type of operation. The possible values - are: - - - ``"none"`` - - ``"update"`` - - ``"insert"`` - - ``"query"`` - - ``"getmore"`` - - ``"remove"`` - - ``"killcursors"`` - - ``"query"`` operations include read operations as well as most - commands such as the :dbcommand:`createIndexes` command and the - :dbcommand:`findandmodify` command. - - .. versionchanged:: 3.0 - - Write operations that use the :dbcommand:`insert`, - :dbcommand:`update`, and :dbcommand:`delete` commands - respectively display ``"insert"``, ``"update"``, and ``"delete"`` - for :data:`~currentOp.op`. Previous versions include these write - commands under ``"query"`` operations. - -.. data:: currentOp.ns - - The :term:`namespace` the operation targets. A namespace consists of - the :term:`database` name and the :term:`collection` name - concatenated with a dot (``.``); that is, - ``"."``. - -.. data:: currentOp.insert - - Contains the document to be inserted for operations with - :data:`~currentOp.op` value of ``"insert"``. Only appears for - operations with :data:`~currentOp.op` value ``"insert"``. - - Insert operations such as :method:`db.collection.insert()` that use - the :dbcommand:`insert` command will have :data:`~currentOp.op` value - of ``"query"``. - -.. data:: currentOp.query - - A document containing information on operations whose - :data:`~currentOp.op` value is *not* ``"insert"``. For instance, for - a :method:`db.collection.find()` operation, the - :data:`~currentOp.query` contains the query predicate. - - :data:`~currentOp.query` does not appear for :data:`~currentOp.op` - of ``"insert"``. :data:`~currentOp.query` can also be an empty - document. - - For :data:`"update" ` or :data:`"remove" - ` operations or for read operations categorized under - :data:`"query" `, the :data:`~currentOp.query` - document contains the query predicate for the operations. - - .. include:: /includes/extracts/currentOp-getmore-operation-query-field.rst - - For other commands categorized under :data:`"query" `, - :data:`~currentOp.query` contains the issued command - document. Refer to the specific command reference page for the details - on the command document. - - .. versionchanged:: 3.0 - - Previous versions categorized operations that used write - commands under :data:`~currentOp.op` of ``"query"`` and returned - the write command information (e.g. query predicate, update - statement, and update options) in :data:`~currentOp.query` - document. - -.. data:: currentOp.planSummary - - A string that contains the query plan to help debug slow queries. - -.. data:: currentOp.client - - The IP address (or hostname) and the ephemeral port of the client - connection where the operation originates. If your ``inprog`` - array has operations from many different clients, use this string - to relate operations to clients. - -.. data:: currentOp.appName - - .. include:: /includes/fact-client-appname.rst - -.. data:: currentOp.locks - - .. versionchanged:: 3.0 - - The :data:`~currentOp.locks` document reports the type and mode of - locks the operation currently holds. The possible lock types are as - follows: - - .. include:: /includes/fact-lock-types.rst - - The possible modes are as follows: - - .. include:: /includes/fact-lock-modes.rst - -.. data:: currentOp.waitingForLock - - Returns a boolean value. :data:`~currentOp.waitingForLock` is ``true`` if the - operation is waiting for a lock and ``false`` if the operation has - the required lock. - -.. data:: currentOp.msg - - The :data:`~currentOp.msg` provides a message that describes the status and - progress of the operation. In the case of indexing or mapReduce - operations, the field reports the completion percentage. - -.. data:: currentOp.progress - - Reports on the progress of mapReduce or indexing operations. The - :data:`~currentOp.progress` fields corresponds to the completion percentage in - the :data:`~currentOp.msg` field. The :data:`~currentOp.progress` specifies the following - information: - - .. data:: currentOp.progress.done - - Reports the number completed. - - .. data:: currentOp.progress.total - - Reports the total number. - -.. data:: currentOp.killPending - - Returns ``true`` if the operation is currently flagged for - termination. When the operation encounters its next safe termination point, the - operation will terminate. - -.. data:: currentOp.numYields - - :data:`~currentOp.numYields` is a counter that reports the number of times the - operation has yielded to allow other operations to complete. - - Typically, operations yield when they need access to data that - MongoDB has not yet fully read into memory. This allows - other operations that have data in memory to complete quickly - while MongoDB reads in data for the yielding operation. - -.. data:: currentOp.fsyncLock - - Specifies if database is currently locked for :method:`fsync - write/snapshot `. - - Only appears if locked; i.e. if :data:`~currentOp.fsyncLock` is - ``true``. - -.. data:: currentOp.info - - Information regarding how to unlock database from - :method:`db.fsyncLock()`. Only appears if - :data:`~currentOp.fsyncLock` is ``true``. - -.. data:: currentOp.lockStats - - For each lock type and mode (see :data:`currentOp.locks` for - descriptions of lock types and modes), returns the following - information: - - .. COMMENT - these definitions are for per operations and not for server, - as such, they differ from those in serverStatus.txt - - .. data:: currentOp.lockStats.acquireCount - - Number of times the operation acquired the lock in the specified - mode. - - .. data:: currentOp.lockStats.acquireWaitCount - - Number of times the operation had to wait for the - :data:`~currentOp.lockStats.acquireCount` lock acquisitions - because the locks were held in a conflicting mode. - :data:`~currentOp.lockStats.acquireWaitCount` is less than or - equal to :data:`~currentOp.lockStats.acquireCount`. - - .. data:: currentOp.lockStats.timeAcquiringMicros - - Cumulative time in microseconds that the operation had to wait to - acquire the locks. - - :data:`~currentOp.lockStats.timeAcquiringMicros` divided by - :data:`~currentOp.lockStats.acquireWaitCount` gives an - approximate average wait time for the particular lock mode. - - .. data:: currentOp.lockStats.deadlockCount - - Number of times the operation encountered deadlocks while waiting - for lock acquisitions. +For a complete list of :method:`db.currentOp()` output fields, see +:ref:`currentOp `.