Skip to content

Commit d5a16f8

Browse files
davidhou17ksuarz
andauthored
(DOCS-7159): Add tcmalloc verbosity section to serverStatus() (#2167) (#2183)
* Add tcmalloc section to serverStatus() * copy review feedback * Update source/reference/command/serverStatus.txt Co-authored-by: Kyle Suarez <[email protected]> Co-authored-by: Kyle Suarez <[email protected]> Co-authored-by: Kyle Suarez <[email protected]>
1 parent c6d6d51 commit d5a16f8

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

source/reference/command/serverStatus.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,30 @@ After you run an update query, ``db.serverStatus()`` and
9999
"total" : NumberLong(1)
100100
}
101101

102+
Change ``tcmalloc`` Verbosity
103+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
104+
105+
By default, ``tcmalloc`` information is included in the output. This
106+
section provides memory allocation statistics for your database. To
107+
change the verbosity of the ``tcmalloc`` section, specify an integer
108+
between ``0`` and ``2`` (inclusive):
109+
110+
.. code-block:: javascript
111+
112+
db.runCommand( { serverStatus: 1, tcmalloc: <int> } )
113+
114+
The command has the following behavior:
115+
116+
- By default, ``tcmalloc`` is set to ``1``.
117+
- Passing a larger integer value increases the verbosity.
118+
- Passing ``0`` or ``false`` omits the ``tcmalloc`` section from the
119+
output.
120+
- Passing any other input results in the default setting.
121+
122+
For more information about how MongoDB allocates memory, see `TCMalloc`_.
123+
124+
.. _`TCMalloc`: http://goog-perftools.sourceforge.net/doc/tcmalloc.html
125+
102126
.. _server-status-output:
103127

104128
Output

0 commit comments

Comments
 (0)