@@ -112,14 +112,16 @@ Options
112112
113113.. include:: /includes/option/option-mongostat-rowcount.rst
114114
115- .. include:: /includes/option/option-mongostat-http.rst
116-
117115.. include:: /includes/option/option-mongostat-discover.rst
118116
117+ .. include:: /includes/option/option-mongostat-http.rst
118+
119119.. include:: /includes/option/option-mongostat-all.rst
120120
121121.. include:: /includes/option/option-mongostat-json.rst
122122
123+ .. include:: /includes/option/option-mongostat-interactive.rst
124+
123125.. include:: /includes/option/option-mongostat-<sleeptime>.rst
124126
125127.. _mongostat-fields:
@@ -508,3 +510,37 @@ members of the cluster:
508510.. code-block:: sh
509511
510512 mongostat --discover
513+
514+ .. _example-mongostat-interactive:
515+
516+ View Statistics in an Interactive Interface
517+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
518+
519+ .. versionadded:: 3.4
520+
521+ Use the :option:`--interactive <mongostat --interactive>` option to
522+ view statistics in a non-scrolling `ncurses<https://www.gnu.org/software/ncurses/>`_-style
523+ interactive output. :option:`--interactive` lets you highlight specific
524+ hosts, columns, or fields to view. When combined with :option:`--discover`,
525+ :option:`--interactive` displays statistics for all members of a
526+ replica set or sharded cluster, as in the following example:
527+
528+ .. code-block:: sh
529+
530+ mongostat --discover --interactive
531+
532+ The output for a sharded cluster would then resemble:
533+
534+ .. code-block:: sh
535+
536+ host insert query update delete getmore command dirty used flushes mapped vsize res faults qrw arw net_in net_out conn set repl time
537+ 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
538+ 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
539+ 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
540+ 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
541+ 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
542+ 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
543+ 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
544+
545+ Press '?' to toggle help
546+
0 commit comments