Skip to content

DOCS-331 Add examples to setParameter command doc #230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 17, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
155 changes: 121 additions & 34 deletions source/reference/command/setParameter.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,39 +18,126 @@ setParameter
Replace the ``<option>`` with one of the following options
supported by this command:

:option integer journalCommitInterval: Specify an integer between 1
and 500 specifying the
number of milliseconds (ms)
between journal commits.

:option integer logLevel: Specify an integer between ``0`` and
``5`` signifying the verbosity of the
logging, where larger is more verbose.

:option boolean notablescan: If ``true``, queries that do not
using an index will fail.

:option boolean traceExceptions: If ``true``, :program:`mongod` will
log full stack traces on assertions
or errors. This parameter is only
available in version 2.1 and later.

:option boolean quiet: Enables a quiet logging mode when
``true``. Use ``false`` to disable. Quiet
logging removes the following messages from
the log: connection events; the
:dbcommand:`drop`, :dbcommand:`dropIndexes`,
:dbcommand:`diagLogging`,
:dbcommand:`validate`, and
:dbcommand:`clean`; and replication
synchronization activity.

:option integer syncdelay: Specify the interval, in seconds,
between :term:`fsyncs <fsync>` (i.e.,
flushes of memory to disk). By default,
:program:`mongod` will flush memory to
disk every 60 seconds. Do not change
this value unless you see a background
flush average greater than 60 seconds.
:option integer journalCommitInterval:

Specify an integer between ``1`` and ``500`` signifying the number
of milliseconds (ms) between journal commits.

Consider the following example which sets the
``journalCommitInterval`` to ``200`` ms:

.. code-block:: javascript

use admin
db.runCommand( { setParameter: 1, journalCommitInterval: 200 } )

.. seealso::

:setting:`journalCommitInterval`.

:option integer logLevel:

Specify an integer between ``0`` and ``5`` signifying the
verbosity of the logging, where ``5`` is the most verbose.

Consider the following example which sets the
``logLevel`` to ``2``:

.. code-block:: javascript

use admin
db.runCommand( { setParameter: 1, logLevel: 2 } )

.. seealso::

:setting:`verbose`.

:option boolean notablescan:

Specify whether queries must use indexes. If ``true``,
queries that perform a table scan instead of using an index
will fail.

Consider the following example which sets the
``notablescan`` to true:

.. code-block:: javascript

use admin
db.runCommand( { setParameter: 1, notablescan: true } )

.. seealso::

:setting:`notablescan`.


:option boolean traceExceptions:

.. versionadded:: 2.1

Specify whether to log full stack traces on assertions or
errors. If ``true``, :program:`mongod` will log full stack
traces on assertions or errors.

Consider the following example which sets the
``traceExceptions`` to true:

.. code-block:: javascript

use admin
db.runCommand( { setParameter: 1, traceExceptions: true } )

.. seealso::

:setting:`traceExceptions`.

:option boolean quiet:

Specify whether to go into a quiet logging mode. If
``true``, :program:`mongod` will go into a quiet logging
mode which will not log the following events/activities:

- connection events;

- the :dbcommand:`drop` command, the
:dbcommand:`dropIndexes` command, the
:dbcommand:`diagLogging` command, the
:dbcommand:`validate` command, and the
:dbcommand:`clean` command; and

- replication synchronization activities.

Consider the following example which sets the
``quiet`` to true:

.. code-block:: javascript

use admin
db.runCommand( { setParameter: 1, quiet: true } )

.. seealso::

:setting:`quiet`.

:option integer syncdelay:

Specify the interval in seconds between :term:`fsyncs
<fsync>` (i.e., flushes of memory to disk). By default,
:program:`mongod` will flush memory to disk every 60
seconds. Do not change this value unless you see a
background flush average greater than 60 seconds.

Consider the following example which sets the
``syncdelay`` to ``60`` seconds:

.. code-block:: javascript

use admin
db.runCommand( { setParameter: 1, syncdelay: 60 } )

.. seealso::

:setting:`syncdelay`.


.. slave-ok, admin-only