@@ -42,17 +42,31 @@ getParameter
42
42
43
43
* - ``getParameter``
44
44
45
- - int, ``'*'``
45
+ - int, string, document
46
46
47
47
- Specify a value of:
48
48
49
- - ``'*'`` to return all parameters available to
50
- :dbcommand:`getParameter`, ignoring the ``<parameter>`` field.
51
-
52
- - any numerical value to return the value for the specified
53
- ``<parameter>``.
49
+ - ``1`` (or any integer value) to return the value for the
50
+ specified ``<parameter>``.
54
51
52
+ - ``'*'`` to return values for all parameters available to
53
+ :dbcommand:`getParameter`, ignoring the ``<parameter>`` field.
54
+
55
+ - ``{ showDetails: true }`` to return a document containing:
56
+
57
+ .. _showdetails-fields:
58
+
59
+ - ``value``, the value that ``<parameter>`` is set to
60
+ - ``settableAtRuntime``, whether or not ``<parameter>`` can
61
+ be set at runtime
62
+ - ``settableAtStartup``, whether or not ``<parameter>`` can
63
+ be set at startup
55
64
65
+ - ``{ showDetails: true, allParameters: true }`` to return a
66
+ document containing :ref:`showDetails fields
67
+ <showdetails-fields>` for **all** parameters.
68
+
69
+
56
70
57
71
* - ``<parameter>``
58
72
@@ -126,4 +140,45 @@ The following operation runs :dbcommand:`getParameter` with a value of
126
140
:dbcommand:`setParameter` for more about these parameters.
127
141
128
142
129
- .. slave-ok, admin-only
143
+ .. _getParameter-showdetails-single-param:
144
+
145
+ Report Details on a Single Parameter
146
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
147
+
148
+ The following example runs :dbcommand:`getParameter` with
149
+ ``{showDetails: true}`` to report :ref:`details <showdetails-fields>`
150
+ on :parameter:`saslHostName`.
151
+
152
+ .. code-block:: javascript
153
+
154
+ db.adminCommand( { getParameter : { showDetails: true }, "saslHostName" : 1 } )
155
+
156
+ Example output:
157
+
158
+ .. code-block:: javascript
159
+ :copyable: false
160
+
161
+ {
162
+ saslHostName: {
163
+ value: '<hostname>',
164
+ settableAtRuntime: false,
165
+ settableAtStartup: true
166
+ },
167
+ ok: 1
168
+ }
169
+
170
+ .. include:: /includes/note-output-may-vary.rst
171
+
172
+
173
+ .. _getParameter-showdetails-all-params:
174
+
175
+ Report Details for All Parameters
176
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
177
+
178
+ The following example runs :dbcommand:`getParameter` with
179
+ ``{showDetails: true, allParameters: true}`` to report
180
+ :ref:`details <showdetails-fields>` on **all** parameters.
181
+
182
+ .. code-block:: javascript
183
+
184
+ db.adminCommand( { getParameter : { showDetails: true, allParameters: true } } )
0 commit comments