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