diff --git a/source/includes/options-mongostat.yaml b/source/includes/options-mongostat.yaml index decbb97b52b..9c7b4cc0455 100644 --- a/source/includes/options-mongostat.yaml +++ b/source/includes/options-mongostat.yaml @@ -364,4 +364,19 @@ post: | See :ref:`ex-mongostat-specify-columns` for an example of {{role}}. optional: true +--- +program: mongostat +name: interactive +directive: option +args: null +pre: | + .. versionadded:: 3.4 +description: | + Display {{program}} output in an interactive non-scrolling interface + rather than the default scrolling output. + + {{role}} is not available with the :option:`--json ` + option. +post: | + See: :ref:`example-mongostat-interactive` for an example of {{role}}. ... diff --git a/source/reference/program/mongostat.txt b/source/reference/program/mongostat.txt index 233ee9d7a42..ef2f8169e21 100644 --- a/source/reference/program/mongostat.txt +++ b/source/reference/program/mongostat.txt @@ -112,14 +112,16 @@ Options .. include:: /includes/option/option-mongostat-rowcount.rst -.. include:: /includes/option/option-mongostat-http.rst - .. include:: /includes/option/option-mongostat-discover.rst +.. include:: /includes/option/option-mongostat-http.rst + .. include:: /includes/option/option-mongostat-all.rst .. include:: /includes/option/option-mongostat-json.rst +.. include:: /includes/option/option-mongostat-interactive.rst + .. include:: /includes/option/option-mongostat-.rst .. _mongostat-fields: @@ -508,3 +510,37 @@ members of the cluster: .. code-block:: sh mongostat --discover + +.. _example-mongostat-interactive: + +View Statistics in an Interactive Interface +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. versionadded:: 3.4 + +Use the :option:`--interactive ` option to +view statistics in a non-scrolling `ncurses`_-style +interactive output. The :option:`--interactive` option lets you highlight specific +hosts, columns, or fields to view. When combined with :option:`--discover`, +:option:`--interactive` displays statistics for all members of a +replica set or sharded cluster, as in the following example: + +.. code-block:: sh + + mongostat --discover --interactive + +The output for a sharded cluster would then resemble: + +.. code-block:: sh + + host insert query update delete getmore command dirty used flushes mapped vsize res faults qrw arw net_in net_out conn set repl time + hostname.local:27018 *0 *0 *0 *0 0 1|0 0.0% 0.0% 0 3.25G 25.0M n/a 0|0 1|0 157b 43.9k 19 tic PRI Nov 2 11:44:46.439 + hostname.local:27019 *0 *0 *0 *0 0 2|0 0.0% 0.0% 0 3.18G 26.0M n/a 0|0 1|0 322b 44.4k 12 tic SEC Nov 2 11:44:46.439 + hostname.local:27020 *0 *0 *0 *0 0 2|0 0.0% 0.0% 0 3.18G 26.0M n/a 0|0 1|0 322b 44.4k 12 tic SEC Nov 2 11:44:46.439 + hostname.local:27021 2017 *0 *0 *0 826 1029|0 0.0% 0.0% 0 3.25G 31.0M n/a 0|0 1|0 1.74m 1.60m 20 tac PRI Nov 2 11:44:46.439 + hostname.local:27022 *2021 *0 *0 *0 0 2|0 0.0% 0.0% 0 3.19G 32.0M n/a 0|0 1|0 322b 44.6k 12 tac SEC Nov 2 11:44:46.438 + hostname.local:27023 *2022 *0 *0 *0 0 3|0 0.0% 0.0% 0 3.19G 33.0M n/a 0|0 1|0 323b 44.7k 12 tac SEC Nov 2 11:44:46.438 + localhost:27017 2071 *0 *0 *0 0 2073|0 0 0B 2.43G 9.00M 0 0|0 0|0 249k 130k 4 RTR Nov 2 11:44:47.429 + + Press '?' to toggle help +