@@ -18,39 +18,98 @@ setParameter
1818 Replace the ``<option>`` with one of the following options
1919 supported by this command:
2020
21- :option integer journalCommitInterval: Specify an integer between 1
22- and 500 specifying the
23- number of milliseconds (ms)
24- between journal commits.
25-
26- :option integer logLevel: Specify an integer between ``0`` and
27- ``5`` signifying the verbosity of the
28- logging, where larger is more verbose.
29-
30- :option boolean notablescan: If ``true``, queries that do not
31- using an index will fail.
32-
33- :option boolean traceExceptions: If ``true``, :program:`mongod` will
34- log full stack traces on assertions
35- or errors. This parameter is only
36- available in version 2.1 and later.
37-
38- :option boolean quiet: Enables a quiet logging mode when
39- ``true``. Use ``false`` to disable. Quiet
40- logging removes the following messages from
41- the log: connection events; the
42- :dbcommand:`drop`, :dbcommand:`dropIndexes`,
43- :dbcommand:`diagLogging`,
44- :dbcommand:`validate`, and
45- :dbcommand:`clean`; and replication
46- synchronization activity.
47-
48- :option integer syncdelay: Specify the interval, in seconds,
49- between :term:`fsyncs <fsync>` (i.e.,
50- flushes of memory to disk). By default,
51- :program:`mongod` will flush memory to
52- disk every 60 seconds. Do not change
53- this value unless you see a background
54- flush average greater than 60 seconds.
21+ :option integer journalCommitInterval:
22+
23+ Specify an integer between ``1`` and ``500`` signifying the number
24+ of milliseconds (ms) between journal commits.
25+
26+ Consider the following example which sets the
27+ :option:`journalCommitInterval` to ``200`` ms:
28+
29+ .. code-block:: javascript
30+
31+ use admin
32+ db.runCommand( { setParameter: 1, journalCommitInterval: 200 } )
33+
34+ :option integer logLevel:
35+
36+ Specify an integer between ``0`` and ``5`` signifying the
37+ verbosity of the logging, where ``5`` is the most verbose.
38+
39+ Consider the following example which sets the
40+ :option:`logLevel` to ``2``:
41+
42+ .. code-block:: javascript
43+
44+ use admin
45+ db.runCommand( { setParameter: 1, logLevel: 2 } )
46+
47+ :option boolean notablescan:
48+
49+ Specify whether queries must use indexes. If ``true``,
50+ queries that perform a table scan instead of using an index
51+ will fail.
52+
53+ Consider the following example which sets the
54+ :option:`notablescan` to true:
55+
56+ .. code-block:: javascript
57+
58+ use admin
59+ db.runCommand( { setParameter: 1, notablescan: true } )
60+
61+ :option boolean traceExceptions:
62+
63+ .. versionadded:: 2.1
64+
65+ Specify whether to log full stack traces on assertions or
66+ errors. If ``true``, :program:`mongod` will log full stack
67+ traces on assertions or errors.
68+
69+ Consider the following example which sets the
70+ :option:`traceExceptions` to true:
71+
72+ .. code-block:: javascript
73+
74+ use admin
75+ db.runCommand( { setParameter: 1, traceExceptions: true } )
76+
77+ :option boolean quiet:
78+
79+ Specify whether to go into a quiet logging mode. If
80+ ``true``, :program:`mongod` will go into a quiet logging
81+ mode which will not log the following events/activities:
82+
83+ - connection events;
84+ - the :dbcommand:`drop` command, the
85+ :dbcommand:`dropIndexes` command, the
86+ :dbcommand:`diagLogging` command, the
87+ :dbcommand:`validate` command, and the
88+ :dbcommand:`clean` command; and
89+ - replication synchronization activities.
90+
91+ Consider the following example which sets the
92+ :option:`quiet` to true:
93+
94+ .. code-block:: javascript
95+
96+ use admin
97+ db.runCommand( { setParameter: 1, quiet: true } )
98+
99+ :option integer syncdelay:
100+
101+ Specify the interval, in seconds, between :term:`fsyncs
102+ <fsync>` (i.e., flushes of memory to disk). By default,
103+ :program:`mongod` will flush memory to disk every 60
104+ seconds. Do not change this value unless you see a
105+ background flush average greater than 60 seconds.
106+
107+ Consider the following example which sets the
108+ :option:`syncdelay` to 60:
109+
110+ .. code-block:: javascript
111+
112+ use admin
113+ db.runCommand( { setParameter: 1, syncdelay: 60 } )
55114
56115 .. slave-ok, admin-only
0 commit comments