From 81232450cfabe39c470699e1870e0c6f035497e9 Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Mon, 17 Sep 2012 16:25:05 -0400 Subject: [PATCH 1/2] DOCS-529 consistency edit of references to admin database --- source/core/sharding.txt | 8 +++---- source/reference/command/getParameter.txt | 2 +- .../reference/command/journalLatencyTest.txt | 2 +- source/reference/command/renameCollection.txt | 2 +- source/reference/command/replSetFreeze.txt | 2 +- source/reference/command/replSetGetStatus.txt | 2 +- source/reference/command/replSetReconfig.txt | 2 +- source/reference/command/setParameter.txt | 4 ++-- source/reference/command/shutdown.txt | 2 +- source/reference/command/top.txt | 2 +- source/reference/commands.txt | 4 +++- source/reference/method/db.shutdownServer.txt | 2 +- source/reference/mongo.txt | 2 +- source/reference/replica-status.txt | 2 +- source/reference/server-status.txt | 22 +++++++++---------- 15 files changed, 31 insertions(+), 29 deletions(-) diff --git a/source/core/sharding.txt b/source/core/sharding.txt index f7963bb8696..ca2396e0e97 100644 --- a/source/core/sharding.txt +++ b/source/core/sharding.txt @@ -531,14 +531,14 @@ setting:`keyFile` configuration option for all :program:`mongos`, configuration instances, and shard :program:`mongod` instances. There are two classes of security credentials in a shard cluster: -credentials for "admin" users (i.e. for the "admin" database) and +credentials for "admin" users (i.e. for the :term:`admin database`) and credentials for all other databases. These credentials reside in different locations within the shard cluster and have different roles: #. Admin database credentials reside on the config servers, to receive admin access to the cluster you *must* authenticate a session while - connected to a :program:`mongos` instance using the "admin" - database. + connected to a :program:`mongos` instance using the + :term:`admin database`. #. Other database credentials reside on the *primary* shard for the database. @@ -552,6 +552,6 @@ the database should use a :program:`mongos` instance. Individual shards can store administrative credentials to their instance, which only permit access to a single shard. MongoDB - stores these credentials in the shards "admin" databases and these + stores these credentials in the shards' :term:`admin database`\s and these credentials are *completely* distinct from the cluster-wide administrative credentials. diff --git a/source/reference/command/getParameter.txt b/source/reference/command/getParameter.txt index 3a03c1f4dd9..f6eec8aaa12 100644 --- a/source/reference/command/getParameter.txt +++ b/source/reference/command/getParameter.txt @@ -8,7 +8,7 @@ getParameter :dbcommand:`getParameter` is an administrative command for retrieving the value of options normally set on the command - line. Issue commands against the ``admin`` database as follows: + line. Issue commands against the :term:`admin database` as follows: .. code-block:: javascript diff --git a/source/reference/command/journalLatencyTest.txt b/source/reference/command/journalLatencyTest.txt index b76874a5a76..b5514f132a3 100644 --- a/source/reference/command/journalLatencyTest.txt +++ b/source/reference/command/journalLatencyTest.txt @@ -6,7 +6,7 @@ journalLatencyTest .. dbcommand:: journalLatencyTest - :dbcommand:`journalLatencyTest` is an admin command that tests the + :dbcommand:`journalLatencyTest` is an administrative command that tests the length of time required to write and perform a file system sync (e.g. :term:`fsync`) for a file in the journal directory. The command syntax is: diff --git a/source/reference/command/renameCollection.txt b/source/reference/command/renameCollection.txt index b276cc8f9ce..3f262ce7a8f 100644 --- a/source/reference/command/renameCollection.txt +++ b/source/reference/command/renameCollection.txt @@ -14,7 +14,7 @@ renameCollection { renameCollection: "store.things", to: "store.events" } - You must run this command against the admin database. and thus + You must run this command against the :term:`admin database`. and thus requires you to specify the complete namespace (i.e., database name and collection name.) diff --git a/source/reference/command/replSetFreeze.txt b/source/reference/command/replSetFreeze.txt index 4944978ef41..984ddd887cb 100644 --- a/source/reference/command/replSetFreeze.txt +++ b/source/reference/command/replSetFreeze.txt @@ -30,6 +30,6 @@ replSetFreeze set member. :dbcommand:`replSetFreeze` is an administrative command, and you - must issue the it against the ``admin`` database. + must issue the it against the :term:`admin database`. .. slave-ok, admin-only diff --git a/source/reference/command/replSetGetStatus.txt b/source/reference/command/replSetGetStatus.txt index 120217bfa71..3d76fb15115 100644 --- a/source/reference/command/replSetGetStatus.txt +++ b/source/reference/command/replSetGetStatus.txt @@ -8,7 +8,7 @@ replSetGetStatus The ``replSetGetStatus`` command returns the status of the replica set from the point of view of the current server. You must run the - command against the admin database. The command has the following + command against the :term:`admin database`. The command has the following prototype format: .. code-block:: javascript diff --git a/source/reference/command/replSetReconfig.txt b/source/reference/command/replSetReconfig.txt index a37801f597c..32d70b4c8fb 100644 --- a/source/reference/command/replSetReconfig.txt +++ b/source/reference/command/replSetReconfig.txt @@ -19,7 +19,7 @@ replSetReconfig Be aware of the following :dbcommand:`replSetReconfig` behaviors: - - You must issue this command against the admin database of the current + - You must issue this command against the :term:`admin database` of the current primary member of the replica set. - You can optionally force the replica set to accept the new diff --git a/source/reference/command/setParameter.txt b/source/reference/command/setParameter.txt index e0a7b9cf308..7fa9eed4ed7 100644 --- a/source/reference/command/setParameter.txt +++ b/source/reference/command/setParameter.txt @@ -8,8 +8,8 @@ setParameter :dbcommand:`setParameter` is an administrative command for modifying options normally set on the command line. You must issue - the :dbcommand:`setParameter` command against the ``admin`` - database in the form: + the :dbcommand:`setParameter` command against the :term:`admin database` + in the form: .. code-block:: javascript diff --git a/source/reference/command/shutdown.txt b/source/reference/command/shutdown.txt index c0b351dd246..cc9cfab4bed 100644 --- a/source/reference/command/shutdown.txt +++ b/source/reference/command/shutdown.txt @@ -16,7 +16,7 @@ shutdown .. note:: - Run the :dbcommand:`shutdown` against the admin database. When + Run the :dbcommand:`shutdown` against the :term:`admin database`. When using :dbcommand:`shutdown`, the connection must originate from localhost **or** use an authenticated connection. diff --git a/source/reference/command/top.txt b/source/reference/command/top.txt index 07c47aead0c..7a85cc35a04 100644 --- a/source/reference/command/top.txt +++ b/source/reference/command/top.txt @@ -47,4 +47,4 @@ top - The maximum allowable :term:`BSON` object size in bytes (in the field ``maxBsonObjectSize``.) You must issue the :dbcommand:`buildInfo` command against the - ``admin`` database. + :term:`admin database`. diff --git a/source/reference/commands.txt b/source/reference/commands.txt index efcd7af7279..4309e7cc72a 100644 --- a/source/reference/commands.txt +++ b/source/reference/commands.txt @@ -45,7 +45,9 @@ Many commands have their own shell helpers: db.isMaster(); -You must run some commands on the ``admin`` database. Normally, that +.. _admin-command:: + +You must run some commands on the :term:`admin database`. Normally, that looks like this: .. code-block:: javascript diff --git a/source/reference/method/db.shutdownServer.txt b/source/reference/method/db.shutdownServer.txt index f19cdc2dc68..fdc5ef2bbd5 100644 --- a/source/reference/method/db.shutdownServer.txt +++ b/source/reference/method/db.shutdownServer.txt @@ -10,6 +10,6 @@ db.shutdownServer() process cleanly and safely. This operation fails when the current database *is not* the - admin database. + :term:`admin database`. This command provides a wrapper around the :dbcommand:`shutdown`. diff --git a/source/reference/mongo.txt b/source/reference/mongo.txt index e5a72e2b380..d7c33cbadd3 100644 --- a/source/reference/mongo.txt +++ b/source/reference/mongo.txt @@ -111,7 +111,7 @@ Options mongo admin The above command will connect the :program:`mongo` shell to the - administrative database on the local machine. You may specify a + :term:`admin database` on the local machine. You may specify a remote database instance, with the resolvable hostname or IP address. Separate the database name from the hostname using a ``/`` character. See the following examples: :: diff --git a/source/reference/replica-status.txt b/source/reference/replica-status.txt index 617ba7c869c..245a0346ac6 100644 --- a/source/reference/replica-status.txt +++ b/source/reference/replica-status.txt @@ -6,7 +6,7 @@ Replica Status Reference The :dbcommand:`replSetGetStatus` provides an overview of the current status of a :term:`replica set`. Issue the following command against -the ``admin`` database, in the :program:`mongo` shell: +the :term:`admin database`, in the :program:`mongo` shell: .. code-block:: javascript diff --git a/source/reference/server-status.txt b/source/reference/server-status.txt index 2d46d89cc70..f4084b0801e 100644 --- a/source/reference/server-status.txt +++ b/source/reference/server-status.txt @@ -144,41 +144,41 @@ locks .. status:: locks.admin The :status:`locks.admin` document contains two sub-documents that - reports data regarding lock use in the ``admin`` database. + reports data regarding lock use in the :term:`admin database`. .. status:: locks.admin.timeLockedMicros The :status:`locks.admin.timeLockedMicros` document reports the amount of time in microseconds that locks have existed in the context of the - ``admin`` database. + :term:`admin database`. .. status:: locks.admin.timeLockedMicros.r The ``r`` field reports the amount of time in microseconds that the - ``admin`` database has held the read lock. + :term:`admin database` has held the read lock. .. status:: locks.admin.timeLockedMicros.w The ``w`` field reports the amount of time in microseconds that the - ``admin`` database has held the write lock. + :term:`admin database` has held the write lock. .. status:: locks.admin.timeAcquiringMicros The :status:`locks.admin.timeAcquiringMicros` document reports on the amount of field time in microseconds that operations have spent - waiting to acquire a lock for the ``admin`` database. + waiting to acquire a lock for the :term:`admin database`. .. status:: locks.admin.timeAcquiringMicros.r The ``r`` field reports the amount of time in microseconds that - operations have spent waiting a read lock on the ``admin`` - database. + operations have spent waiting a read lock on the + :term:`admin database`. .. status:: locks.admin.timeAcquiringMicros.w The ``w`` field reports the amount of time in microseconds that - operations have spent waiting a write lock on the ``admin`` - database. + operations have spent waiting a write lock on the + :term:`admin database`. .. status:: locks.local @@ -1133,13 +1133,13 @@ recordStats :status:`recordStats.admin.accessNotInMemory` reflects the number of times :program:`mongod` needed to access a memory page that was - *not* resident in memory for the ``admin`` database. + *not* resident in memory for the :term:`admin database`. .. status:: recordStats.admin.pageFaultExceptionsThrown :status:`recordStats.admin.pageFaultExceptionsThrown` reflects the number of page fault exceptions thrown by :program:`mongod` when - accessing data for the ``admin`` database. + accessing data for the :term:`admin database`. .. status:: recordStats..accessNotInMemory From c276f224d7172818e32a5f63f2d9fabc16b7ec65 Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Mon, 17 Sep 2012 18:23:53 -0400 Subject: [PATCH 2/2] DOCS-529 consistency edit for references to admin database/admin commands --- source/reference/command/buildInfo.txt | 25 ++++++++++++++ source/reference/command/getParameter.txt | 5 ++- .../reference/command/journalLatencyTest.txt | 10 +++--- source/reference/command/logRotate.txt | 8 +++-- source/reference/command/moveChunk.txt | 6 ++-- source/reference/command/shutdown.txt | 7 ++-- source/reference/command/top.txt | 34 ++++--------------- source/reference/commands.txt | 5 +++ source/reference/glossary.txt | 4 ++- 9 files changed, 64 insertions(+), 40 deletions(-) create mode 100644 source/reference/command/buildInfo.txt diff --git a/source/reference/command/buildInfo.txt b/source/reference/command/buildInfo.txt new file mode 100644 index 00000000000..fca246a39e0 --- /dev/null +++ b/source/reference/command/buildInfo.txt @@ -0,0 +1,25 @@ +========= +buildInfo +========= + +.. default-domain:: mongodb + +.. dbcommand:: buildInfo + + The :dbcommand:`buildInfo` command is an administrative command which + returns a build summary for the current :program:`mongod`. + + .. code-block:: javascript + + { buildInfo: 1 } + + The information provided includes the following: + + - The version of MongoDB currently running. + + - The information about the system that built the + ":program:`mongod`" binary, including a timestamp for the build. + + - The architecture of the binary (i.e. 64 or 32 bits.) + + - The maximum allowable :term:`BSON` object size in bytes (in the field ``maxBsonObjectSize``.) \ No newline at end of file diff --git a/source/reference/command/getParameter.txt b/source/reference/command/getParameter.txt index f6eec8aaa12..a6c27b7d922 100644 --- a/source/reference/command/getParameter.txt +++ b/source/reference/command/getParameter.txt @@ -8,7 +8,10 @@ getParameter :dbcommand:`getParameter` is an administrative command for retrieving the value of options normally set on the command - line. Issue commands against the :term:`admin database` as follows: + line. + You must issue the + :dbcommand:`getParameter` + command against the :term:`admin database` in the form: .. code-block:: javascript diff --git a/source/reference/command/journalLatencyTest.txt b/source/reference/command/journalLatencyTest.txt index b5514f132a3..a34e3dce8b4 100644 --- a/source/reference/command/journalLatencyTest.txt +++ b/source/reference/command/journalLatencyTest.txt @@ -8,12 +8,14 @@ journalLatencyTest :dbcommand:`journalLatencyTest` is an administrative command that tests the length of time required to write and perform a file system sync - (e.g. :term:`fsync`) for a file in the journal directory. The - command syntax is: - + (e.g. :term:`fsync`) for a file in the journal directory. + You must issue the + :dbcommand:`journalLatencyTest` + command against the :term:`admin database` in the form: + .. code-block:: javascript { journalLatencyTest: 1 } The value (i.e. ``1`` above), does not affect the operation of the - command. + command. \ No newline at end of file diff --git a/source/reference/command/logRotate.txt b/source/reference/command/logRotate.txt index b85b5951bf8..9f8f6b5a097 100644 --- a/source/reference/command/logRotate.txt +++ b/source/reference/command/logRotate.txt @@ -6,9 +6,13 @@ logRotate .. dbcommand:: logRotate - :dbcommand:`logRotate` is an admin only command that allows you to rotate + The :dbcommand:`logRotate` command is an administrative command that + allows you to rotate the MongoDB logs to prevent a single logfile from consuming too - much disk space. Use the following syntax: :: + much disk space. + You must issue the + :dbcommand:`logRotate` + command against the :term:`admin database` in the form: { logRotate: 1 } diff --git a/source/reference/command/moveChunk.txt b/source/reference/command/moveChunk.txt index ccd5012d4c1..33c70b65fc6 100644 --- a/source/reference/command/moveChunk.txt +++ b/source/reference/command/moveChunk.txt @@ -7,8 +7,10 @@ moveChunk .. dbcommand:: moveChunk :dbcommand:`moveChunk` is an internal administrative command that - moves :term:`chunks ` between :term:`shards `. The - command has the following prototype form: + moves :term:`chunks ` between :term:`shards `. + You must issue the + :dbcommand:`moveChunk` + command against the :term:`admin database` in the form: .. code-block:: javascript diff --git a/source/reference/command/shutdown.txt b/source/reference/command/shutdown.txt index cc9cfab4bed..7dc136a3bfc 100644 --- a/source/reference/command/shutdown.txt +++ b/source/reference/command/shutdown.txt @@ -7,8 +7,9 @@ shutdown .. dbcommand:: shutdown The :dbcommand:`shutdown` command cleans up all database resources - and then terminates the process. The command has the following - form: + and then terminates the process. You must issue + the :dbcommand:`shutdown` command against the :term:`admin database` + in the form: .. code-block:: javascript @@ -16,7 +17,7 @@ shutdown .. note:: - Run the :dbcommand:`shutdown` against the :term:`admin database`. When + When using :dbcommand:`shutdown`, the connection must originate from localhost **or** use an authenticated connection. diff --git a/source/reference/command/top.txt b/source/reference/command/top.txt index 7a85cc35a04..bb4460899f4 100644 --- a/source/reference/command/top.txt +++ b/source/reference/command/top.txt @@ -6,7 +6,8 @@ top .. dbcommand:: top - The :dbcommand:`top` command returns raw usage of each database, + The :dbcommand:`top` command is an administrative command which + returns raw usage of each database, and provides amount of time, in microseconds, used and a count of operations for the following event types: @@ -20,31 +21,10 @@ top - remove - commands - The command takes the following form: - - .. code-block:: javascript - - { top: 1 } - -.. dbcommand:: buildInfo - - The :dbcommand:`buildInfo` command returns a build summary for the current - :program:`mongod`: - + You must issue the + :dbcommand:`top` + command against the :term:`admin database` in the form: + .. code-block:: javascript - { buildInfo: 1 } - - The information provided includes the following: - - - The version of MongoDB currently running. - - - The information about the system that built the - ":program:`mongod`" binary, including a timestamp for the build. - - - The architecture of the binary (i.e. 64 or 32 bits.) - - - The maximum allowable :term:`BSON` object size in bytes (in the field ``maxBsonObjectSize``.) - - You must issue the :dbcommand:`buildInfo` command against the - :term:`admin database`. + { top: 1 } \ No newline at end of file diff --git a/source/reference/commands.txt b/source/reference/commands.txt index 4309e7cc72a..fc93fcbabd0 100644 --- a/source/reference/commands.txt +++ b/source/reference/commands.txt @@ -194,6 +194,8 @@ Collections .. include:: command/collMod.txt :start-after: mongodb +.. _admin-commands:: + Administration ~~~~~~~~~~~~~~ @@ -239,6 +241,9 @@ Administration Diagnostics ~~~~~~~~~~~ +.. include:: command/buildInfo.txt + :start-after: mongodb + .. include:: command/dbStats.txt :start-after: mongodb diff --git a/source/reference/glossary.txt b/source/reference/glossary.txt index 2da7a889d80..e35f3f5feb5 100644 --- a/source/reference/glossary.txt +++ b/source/reference/glossary.txt @@ -82,7 +82,9 @@ Glossary admin database A privileged database named ``admin``. Users must have access to this database to run certain administrative commands. - See :doc:`commands` for more information on these commands. + See :ref:`administrative commands ` + for more information + and :ref:`admin-commands` for a list of these commands. replica set A cluster of MongoDB servers that implements master-slave