diff --git a/source/includes/options-mongotop.yaml b/source/includes/options-mongotop.yaml index c503fe89bc6..783afe46d4d 100644 --- a/source/includes/options-mongotop.yaml +++ b/source/includes/options-mongotop.yaml @@ -36,6 +36,9 @@ inherit: name: host program: _shared file: options-shared.yaml +post: | + If connected to a replica set where the :term:`primary` is not + reachable, {{program}} returns an error message. --- program: mongotop name: port @@ -128,8 +131,11 @@ inherit: program: _shared file: options-shared.yaml post: | - {{role}} is required for :program:`mongod` - and :program:`mongos` instances that use :ref:`authentication`. + + + .. versionchanged:: 2.8.0 + {{role}} is required for :program:`mongod` + and :program:`mongos` instances that use :ref:`authentication`. --- program: mongotop name: authenticationMechanism @@ -167,6 +173,9 @@ description: | Toggles the mode of :program:`mongotop` to report on use of per-database :ref:`locks `. These data are useful for measuring concurrent operations and lock percentage. +post: | + {{role}} returns an error when called against a :program:`mongod` instance + that does not report lock usage. optional: true --- program: mongotop diff --git a/source/includes/options-shared.yaml b/source/includes/options-shared.yaml index 1f1ee0df48d..b0bf73a0463 100644 --- a/source/includes/options-shared.yaml +++ b/source/includes/options-shared.yaml @@ -67,9 +67,9 @@ description: | connect. By default, the {{program}} attempts to connect to a MongoDB instance running on the localhost on port number ``27017``. - To connect to a replica set, specify the :setting:`replica set name - <~replication.replSetName>` and a seed list of set members. Use the - following form: + To connect to a replica set, specify the + :setting:`~replication.replSetName` and a seed list of set members, as in + the following: .. code-block:: none @@ -79,7 +79,7 @@ description: | specifying the host and port number directly. .. versionchanged:: 2.8.0 - If you use IPv6 and use the ``
:`` format, you must + If you use IPv6 and use the ``
:`` format, you must enclose the portion of an address and port combination in brackets (e.g. ``[
]``). optional: false diff --git a/source/reference/program/mongotop.txt b/source/reference/program/mongotop.txt index 0afa76cec0e..3e14f7b3f68 100644 --- a/source/reference/program/mongotop.txt +++ b/source/reference/program/mongotop.txt @@ -121,7 +121,7 @@ affect the output of :program:`mongotop`. and collection. .. versionchanged:: 2.2 - If you use the :option:`--locks`, the :data:`~mongotop.ns` field does not + If you use the :option:`mongotop --locks`, the :data:`~mongotop.ns` field does not appear in the :program:`mongotop` output. .. data:: mongotop.db @@ -153,6 +153,8 @@ affect the output of :program:`mongotop`. Provides a time stamp for the returned data. +.. _mongotop-use: + Use --- @@ -174,22 +176,32 @@ This command produces the following output: .. code-block:: sh - connected to: 127.0.0.1 - - ns total read write 2012-08-13T15:45:40 - test.system.namespaces 0ms 0ms 0ms - local.system.replset 0ms 0ms 0ms - local.system.indexes 0ms 0ms 0ms - admin.system.indexes 0ms 0ms 0ms - admin. 0ms 0ms 0ms - - ns total read write 2012-08-13T15:45:55 - test.system.namespaces 0ms 0ms 0ms - local.system.replset 0ms 0ms 0ms - local.system.indexes 0ms 0ms 0ms - admin.system.indexes 0ms 0ms 0ms - admin. 0ms 0ms 0ms - + ns total read write 2014-12-19T15:32:01-05:00 + admin.system.roles 0ms 0ms 0ms + admin.system.version 0ms 0ms 0ms + local.me 0ms 0ms 0ms + local.oplog.rs 0ms 0ms 0ms + local.replset.minvalid 0ms 0ms 0ms + local.startup_log 0ms 0ms 0ms + local.system.indexes 0ms 0ms 0ms + local.system.namespaces 0ms 0ms 0ms + local.system.replset 0ms 0ms 0ms + + ns total read write 2014-12-19T15:47:01-05:00 + admin.system.roles 0ms 0ms 0ms + admin.system.version 0ms 0ms 0ms + local.me 0ms 0ms 0ms + local.oplog.rs 0ms 0ms 0ms + local.replset.minvalid 0ms 0ms 0ms + local.startup_log 0ms 0ms 0ms + local.system.indexes 0ms 0ms 0ms + local.system.namespaces 0ms 0ms 0ms + local.system.replset 0ms 0ms 0ms + +The output varies depending on your MongoDB setup. For example, +``local.system.indexes`` and ``local.system.namespaces`` only appear +for :program:`mongod` instances using the :ref:`MMAPv1 ` +storage engine. To return a :program:`mongotop` report every 5 minutes, use the following command: @@ -198,7 +210,7 @@ following command: mongotop 300 -To report the use of per-database locks, use :option:`mongotop --locks`, +To report the use of per-database locks, use :option:`--locks`, which produces the following output: .. code-block:: sh @@ -210,3 +222,8 @@ which produces the following output: local 0ms 0ms 0ms admin 0ms 0ms 0ms . 0ms 0ms 0ms + +.. versionchanged:: 2.8.0 + When called against a :program:`mongod` that does not report lock + usage, :option:`--locks` will return a ``Failed: Server does not + support reporting locking information`` error.