From 788235bc64f74baa8993dd160562f55481a3dc2a Mon Sep 17 00:00:00 2001 From: Andrew Leung Date: Thu, 12 Jul 2012 09:32:11 -0400 Subject: [PATCH 01/23] initial additions for DOCS-158 --- source/reference/commands.txt | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/source/reference/commands.txt b/source/reference/commands.txt index 423be64d265..8f10c1c0cbd 100644 --- a/source/reference/commands.txt +++ b/source/reference/commands.txt @@ -1730,9 +1730,33 @@ Diagnostics { connPoolStats: 1 } - The value of the argument (e.g. ``1`` above) does not affect the + The value of the argument (e.g. ``1`` or above) does not affect the output of the command. + "available" - number of connections avaiable for the host + + "created" - cummulative total of connections for the host + + "createdByType" - the number of each type of connection that exists + in all the pools. + + "master" - connection to shard primary + + "set" - replica set connection + + "sync" - connection to the config server + +.. These are all cummulative ( sum (master,set,sync) = totalCreated) + + "totalAvailable" - Running total of total number of connections + (available) in all pools + + "totalCreated" - cummulative total of connections ever created + + "numDBClientConnection" - normal connections + + "numAScopedConnection" - exception safe connections + .. dbcommand:: getCmdLineOpts The :dbcommand:`getCmdLineOpts` command returns a document containing From 9f1969c90a5cce6abf874068cde461983da93108 Mon Sep 17 00:00:00 2001 From: Andrew Leung Date: Thu, 12 Jul 2012 15:06:50 -0400 Subject: [PATCH 02/23] updated command explaination for connPoolStats DOCS-158 --- source/reference/commands.txt | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/source/reference/commands.txt b/source/reference/commands.txt index 8f10c1c0cbd..447cd1cff0a 100644 --- a/source/reference/commands.txt +++ b/source/reference/commands.txt @@ -1733,29 +1733,35 @@ Diagnostics The value of the argument (e.g. ``1`` or above) does not affect the output of the command. - "available" - number of connections avaiable for the host - - "created" - cummulative total of connections for the host + This command will only successfully return on a mongos instance. + + Detailed description of the output of :dbcommand:`connPoolStats`: - "createdByType" - the number of each type of connection that exists - in all the pools. + - "available" - the number of connections avaiable for a particular + host + + - "created" - the cummulative total of connections for a particular + host - "master" - connection to shard primary + - "createdByType" - the number of each type of connection that + exists in all the pools. The types of connection possible: - "set" - replica set connection + - "master" - connection to shard primary - "sync" - connection to the config server + - "set" - replica set connection -.. These are all cummulative ( sum (master,set,sync) = totalCreated) + - "sync" - connection to the config server - "totalAvailable" - Running total of total number of connections - (available) in all pools + - "totalAvailable" - the total number of connections available in + all pools - "totalCreated" - cummulative total of connections ever created + - "totalCreated" - the cummulative total of connections created - "numDBClientConnection" - normal connections + - "numDBClientConnection" - the number of normal connections - "numAScopedConnection" - exception safe connections + - "numAScopedConnection" - the number of exception safe + connections. These connections will drop when there is an + exception thrown by the system. .. dbcommand:: getCmdLineOpts From 2e954154c79187dae063fcc31a26a02db11a3e59 Mon Sep 17 00:00:00 2001 From: Andrew Leung Date: Fri, 13 Jul 2012 10:38:48 -0400 Subject: [PATCH 03/23] connPoolStats update to have description of each item. DOCS-158 --- source/reference/commands.txt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/source/reference/commands.txt b/source/reference/commands.txt index 447cd1cff0a..1950ee5db0b 100644 --- a/source/reference/commands.txt +++ b/source/reference/commands.txt @@ -1733,15 +1733,16 @@ Diagnostics The value of the argument (e.g. ``1`` or above) does not affect the output of the command. - This command will only successfully return on a mongos instance. + Detailed description of the output of + :dbcommand:`connPoolStats`. For each MongoDB host connected: - Detailed description of the output of :dbcommand:`connPoolStats`: - - - "available" - the number of connections avaiable for a particular - host + - "available" - the number of connections avaiable for a particular + host - - "created" - the cummulative total of connections for a particular - host + - "created" - the cummulative total of connections for a particular + host + + Summary details: - "createdByType" - the number of each type of connection that exists in all the pools. The types of connection possible: From 987056549aa91de3fbf55aa716c6734fc63e4a32 Mon Sep 17 00:00:00 2001 From: Andrew Leung Date: Fri, 13 Jul 2012 15:09:44 -0400 Subject: [PATCH 04/23] expanded fields. redoing --- source/reference/commands.txt | 92 +++++++++++++++++++++++++++-------- 1 file changed, 72 insertions(+), 20 deletions(-) diff --git a/source/reference/commands.txt b/source/reference/commands.txt index 1950ee5db0b..9ebcc6ccb8a 100644 --- a/source/reference/commands.txt +++ b/source/reference/commands.txt @@ -1730,39 +1730,91 @@ Diagnostics { connPoolStats: 1 } - The value of the argument (e.g. ``1`` or above) does not affect the - output of the command. + The value of the argument (i.e. ``1`` ) does not affect the + output of the command. The output of :dbcommand:`connPoolStats` is: - Detailed description of the output of - :dbcommand:`connPoolStats`. For each MongoDB host connected: + .. stats:: hosts - - "available" - the number of connections avaiable for a particular - host - - - "created" - the cummulative total of connections for a particular - host + :stats:`hosts` contains one field for every host, replica set, + and config server in the :term:`shard cluster`. - Summary details: + .. stats:: hosts.[host].available + + The cummulative number of connections in the connection pool + available for a host to connect to a :program:`mongos`. - - "createdByType" - the number of each type of connection that - exists in all the pools. The types of connection possible: + .. stats:: hosts.[host].created - - "master" - connection to shard primary + The number of connections in the connection pool that has ever + been created for this host by the :program:`mongos`. - - "set" - replica set connection + .. stats:: replicaSets - - "sync" - connection to the config server + This field holds a document that contains foo. - - "totalAvailable" - the total number of connections available in - all pools + .. stats:: replicaSets.[shard].[host] + + .. also tell what this document is. + + These values are derived from the :doc:`replica set status + ` values. + + .. stats:: replicaSets.[shard].[host].addr + .. stats:: replicaSets.[shard].[host].ok + .. stats:: replicaSets.[shard].[host].ismaster + .. stats:: replicaSets.[shard].[host].hidden + .. stats:: replicaSets.[shard].[host].secondary + .. stats:: replicaSets.[shard].[host].pingTimeMillis + .. stats:: replicaSets.[shard].master + + Is a :term:`master` in a master/slave replication deployment. + + .. stats:: replicaSets.[shard].nexSlave + + .. stats:: createdByType + + The number of each type of connection that has been created in + all connection pools. + + .. stats:: createdByType.master + + The total number of connections created to connect to a :term:`shard + primary`. + + .. stats:: createdByType.set + + The total number of connections created to connect to a :term:`replica + set` member. + + .. stats:: createdByType.sync + + The total number of connections created to connect to a + :term:`config server`. + + .. stats:: totalAvailable + + The total number of connections available in all pools. + + .. stats:: totalCreated + + .. stats:: numDBClientConnection + + .. stats:: numAScopedConnection + + the number of exception safe connections that exists in the + connection pool. These connections will drop when there is an + exception thrown by the system. + + - "totalAvailable" - - "totalCreated" - the cummulative total of connections created - "numDBClientConnection" - the number of normal connections - - "numAScopedConnection" - the number of exception safe - connections. These connections will drop when there is an - exception thrown by the system. + .. note:: + + :dbcommand:`connPoolStats` only return meaningful results + :program:`mongos` .. dbcommand:: getCmdLineOpts From 807c33f39f57f08d6ce6738f55d423f30d90837d Mon Sep 17 00:00:00 2001 From: Andrew Leung Date: Mon, 16 Jul 2012 11:09:20 -0400 Subject: [PATCH 05/23] updated connPoolStats draft --- source/reference/commands.txt | 62 ++++++++++++++++++++++++++--------- 1 file changed, 47 insertions(+), 15 deletions(-) diff --git a/source/reference/commands.txt b/source/reference/commands.txt index 9ebcc6ccb8a..ab313b734c2 100644 --- a/source/reference/commands.txt +++ b/source/reference/commands.txt @@ -1750,26 +1750,60 @@ Diagnostics .. stats:: replicaSets - This field holds a document that contains foo. + This field holds a document that contains detailed replica set + information. - .. stats:: replicaSets.[shard].[host] + .. stats:: replicaSets.shard - .. also tell what this document is. + This document gives details on each shard within the replica set. + + .. stats:: replicaSets.[shard].host + + This document gives details on each host within the shard in the replica set. These values are derived from the :doc:`replica set status ` values. .. stats:: replicaSets.[shard].[host].addr + + This is the address for a particular host in the shard + .. stats:: replicaSets.[shard].[host].ok + + .. ? Is the system ok ? (i.e. running) + .. reference/collection-validation says: 'when command succeeds' + .. stats:: replicaSets.[shard].[host].ismaster + + The field indicates whether this host is the :term:`master` member of + the replica set. + .. stats:: replicaSets.[shard].[host].hidden + + This field indicates whether this host is a :term:`hidden` member of + the replica set. + .. stats:: replicaSets.[shard].[host].secondary + + This field indicates whether this host is a :term:`secondary` member of + the replica set. + .. stats:: replicaSets.[shard].[host].pingTimeMillis + + This field indicates the :term:`ping time` in miliseconds (from the :program:`mongos`) + .. stats:: replicaSets.[shard].master - Is a :term:`master` in a master/slave replication deployment. + This field indicates which member is the :term:`master` + member of the replica set. + + .. stats:: replicaSets.[shard].nexSlave + + This field indicates which member is the preferred slave to + read from for :term:`secondaryQueries`. - .. stats:: replicaSets.[shard].nexSlave + .. Double check this. Code where this is computed + .. (src/mongo/client/dbclient_rs.cpp) line 475 - 490 .. stats:: createdByType @@ -1793,28 +1827,26 @@ Diagnostics .. stats:: totalAvailable - The total number of connections available in all pools. + The total number of connections available in all connection pools. .. stats:: totalCreated + The total number of connections ever created in all connection pools. + .. stats:: numDBClientConnection + The number of normal client connections in the connection pool. + .. stats:: numAScopedConnection - the number of exception safe connections that exists in the + The number of exception safe connections that exists in the connection pool. These connections will drop when there is an exception thrown by the system. - - "totalAvailable" - - - - "totalCreated" - the cummulative total of connections created - - - "numDBClientConnection" - the number of normal connections - .. note:: - :dbcommand:`connPoolStats` only return meaningful results - :program:`mongos` + :dbcommand:`connPoolStats` only return meaningful results in the + :program:`mongos` program. .. dbcommand:: getCmdLineOpts From 7c8a3466cd4c0c1dc3fd4ce23823bd38018ef0b4 Mon Sep 17 00:00:00 2001 From: Andrew Leung Date: Mon, 16 Jul 2012 14:09:00 -0400 Subject: [PATCH 06/23] updated command.txt for connPoolStats --- source/reference/commands.txt | 151 ++++++++++++++++++---------------- 1 file changed, 80 insertions(+), 71 deletions(-) diff --git a/source/reference/commands.txt b/source/reference/commands.txt index ab313b734c2..d265d0564bd 100644 --- a/source/reference/commands.txt +++ b/source/reference/commands.txt @@ -1735,8 +1735,9 @@ Diagnostics .. stats:: hosts - :stats:`hosts` contains one field for every host, replica set, - and config server in the :term:`shard cluster`. + :stats:`hosts` contains a document for every member in the + connection pool, every :term:`shard cluster`, :term:`replica + set`, and :term:`config database`. .. stats:: hosts.[host].available @@ -1753,81 +1754,86 @@ Diagnostics This field holds a document that contains detailed replica set information. - .. stats:: replicaSets.shard + .. stats:: replicaSets.shard - This document gives details on each shard within the replica set. + This document gives details on each shard within the replica set. - .. stats:: replicaSets.[shard].host + .. stats:: replicaSets.[shard].host - This document gives details on each host within the shard in the replica set. + This document gives details on each host within the shard in the replica set. - These values are derived from the :doc:`replica set status - ` values. + These values are derived from the :doc:`replica set status + ` values. - .. stats:: replicaSets.[shard].[host].addr + .. stats:: replicaSets.[shard].[host].addr - This is the address for a particular host in the shard + This field indicates the address for a particular host in + the :term:`shard cluster` in the format of + "``[hostname]:[port]``". - .. stats:: replicaSets.[shard].[host].ok + .. stats:: replicaSets.[shard].[host].ok - .. ? Is the system ok ? (i.e. running) - .. reference/collection-validation says: 'when command succeeds' + This field indicates whether the host is accessible for + queries. - .. stats:: replicaSets.[shard].[host].ismaster + .. TODO verify with someone more knowledgable. - The field indicates whether this host is the :term:`master` member of - the replica set. + .. stats:: replicaSets.[shard].[host].ismaster - .. stats:: replicaSets.[shard].[host].hidden + A field indicates whether this host is the :term:`master` + member of the replica set. - This field indicates whether this host is a :term:`hidden` member of - the replica set. + .. stats:: replicaSets.[shard].[host].hidden - .. stats:: replicaSets.[shard].[host].secondary + This field indicates whether this host is a :term:`hidden + member` of the replica set. - This field indicates whether this host is a :term:`secondary` member of - the replica set. + .. stats:: replicaSets.[shard].[host].secondary - .. stats:: replicaSets.[shard].[host].pingTimeMillis + This field indicates whether this host is a + :term:`secondary` member of the replica set. - This field indicates the :term:`ping time` in miliseconds (from the :program:`mongos`) + .. stats:: replicaSets.[shard].[host].pingTimeMillis + + This field indicates the ping time in miliseconds from the + :program:`mongos` .. stats:: replicaSets.[shard].master - This field indicates which member is the :term:`master` - member of the replica set. + This field indicates the number of the host that is the + :term:`master` from the ``hosts`` list. - .. stats:: replicaSets.[shard].nexSlave + .. stats:: replicaSets.[shard].nextSlave - This field indicates which member is the preferred slave to - read from for :term:`secondaryQueries`. + This field indicates the number of the host that is the next + :term:`secondary` to read from instead of :term:`master` from + the ``hosts`` list. - .. Double check this. Code where this is computed - .. (src/mongo/client/dbclient_rs.cpp) line 475 - 490 + .. TODO verify with someone more knowledgable. .. stats:: createdByType The number of each type of connection that has been created in all connection pools. - .. stats:: createdByType.master + .. stats:: createdByType.master - The total number of connections created to connect to a :term:`shard - primary`. + The total number of connections created to connect to a + :term:`shard cluster` that is a :term:`master` member. - .. stats:: createdByType.set + .. stats:: createdByType.set - The total number of connections created to connect to a :term:`replica - set` member. + The total number of connections created to connect to a :term:`replica + set` member. - .. stats:: createdByType.sync + .. stats:: createdByType.sync - The total number of connections created to connect to a - :term:`config server`. + The total number of connections created to connect to the + :term:`config database`. .. stats:: totalAvailable - The total number of connections available in all connection pools. + A running total of connections available in all connection pools. .. stats:: totalCreated @@ -1837,11 +1843,14 @@ Diagnostics The number of normal client connections in the connection pool. + .. TODO verify - unlike scoped, does this stay connected when + .. there is an exception? + .. stats:: numAScopedConnection The number of exception safe connections that exists in the - connection pool. These connections will drop when there is an - exception thrown by the system. + connection pool. These connections will be released when there is an + exception thrown in MongoDB. .. note:: @@ -1878,10 +1887,10 @@ Diagnostics ``users``. You may also specify one of the following options: - - ``full: true`` provides a more thorough scan of the data. + 1. ``full: true`` provides a more thorough scan of the data. - - ``scandata: false`` skips the scan of the base collection - without skipping the scan of the index. + 2. ``scandata: false`` skips the scan of the base collection + without skipping the scan of the index. The :program:`mongo` shell also provides a wrapper: @@ -1906,15 +1915,15 @@ Diagnostics and provides amount of time, in microseconds, used and a count of operations for the following event types: - - total - - readLock - - writeLock - - queries - - getmore - - insert - - update - - remove - - commands + 3. total + 4. readLock + 5. writeLock + 6. queries + 7. getmore + 8. insert + 9. update + 10. remove + 11. commands The command takes the following form: @@ -1933,12 +1942,12 @@ Diagnostics 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``.) + 12. The version of MongoDB currently running. + 13. The information about the system that built the + ":program:`mongod`" binary, including a timestamp for the build. + 14. The architecture of the binary (i.e. 64 or 32 bits) + 15. The maximum allowable :term:`BSON` object size in bytes (in the field + ``maxBsonObjectSize``.) You must issue the :dbcommand:`buildInfo` command against the ``admin`` database. @@ -2006,17 +2015,17 @@ Diagnostics Replace ```` with one of the following values: - - ``global`` - returns the combined output of all recent log - entries. + 16. ``global`` - returns the combined output of all recent log + entries. - - ``rs`` - if the :program:`mongod` is part of a :term:`replica - set`, :dbcommand:`getLog` will return recent notices related to - replica set activity. + 17. ``rs`` - if the :program:`mongod` is part of a :term:`replica + set`, :dbcommand:`getLog` will return recent notices related to + replica set activity. - - ``startupWarnings`` - will return logs that *may* contain - errors or warnings from MongoDB's log from when the current - process started. If :program:`mongod` started without warnings, - this filter may return an empty array. + 18. ``startupWarnings`` - will return logs that *may* contain + errors or warnings from MongoDB's log from when the current + process started. If :program:`mongod` started without warnings, + this filter may return an empty array. You may also specify an asterisk (e.g. ``*``) as the ```` value to return a list of available log filters. The following @@ -2070,7 +2079,7 @@ Diagnostics The :dbcommand:`isMaster` command provides a basic overview of the current replication configuration. MongoDB :term:`drivers ` and :term:`clients ` use this command to determine what kind of - node they're connected to and to discover additional members of a + member they're connected to and to discover additional members of a :term:`replica set`. The :func:`db.isMaster()` method provides a wrapper around this database command. From bef3d74989287d5ae567a249444f62c65380bad5 Mon Sep 17 00:00:00 2001 From: Andrew Leung Date: Mon, 16 Jul 2012 20:36:57 -0400 Subject: [PATCH 07/23] corrected spacing on connPoolStats --- source/reference/commands.txt | 104 +++++++++++++++++----------------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/source/reference/commands.txt b/source/reference/commands.txt index 6fbb5681350..625ebe938d2 100644 --- a/source/reference/commands.txt +++ b/source/reference/commands.txt @@ -1759,49 +1759,49 @@ Diagnostics This field holds a document that contains detailed replica set information. - .. stats:: replicaSets.shard + .. stats:: replicaSets.shard - This document gives details on each shard within the replica set. + This document gives details on each shard within the replica set. - .. stats:: replicaSets.[shard].host + .. stats:: replicaSets.[shard].host - This document gives details on each host within the shard in the replica set. + This document gives details on each host within the shard in the replica set. - These values are derived from the :doc:`replica set status - ` values. + These values are derived from the :doc:`replica set status + ` values. - .. stats:: replicaSets.[shard].[host].addr + .. stats:: replicaSets.[shard].[host].addr - This field indicates the address for a particular host in - the :term:`shard cluster` in the format of - "``[hostname]:[port]``". + This field indicates the address for a particular host + in the :term:`shard cluster` in the format of + "``[hostname]:[port]``". - .. stats:: replicaSets.[shard].[host].ok + .. stats:: replicaSets.[shard].[host].ok - This field indicates whether the host is accessible for - queries. + This field indicates whether the host is accessible for + queries. - .. TODO verify with someone more knowledgable. + .. TODO verify with someone more knowledgable. - .. stats:: replicaSets.[shard].[host].ismaster + .. stats:: replicaSets.[shard].[host].ismaster - A field indicates whether this host is the :term:`master` - member of the replica set. + A field indicates whether this host is the + :term:`master` member of the replica set. - .. stats:: replicaSets.[shard].[host].hidden + .. stats:: replicaSets.[shard].[host].hidden - This field indicates whether this host is a :term:`hidden - member` of the replica set. + This field indicates whether this host is a + :term:`hidden member` of the replica set. - .. stats:: replicaSets.[shard].[host].secondary + .. stats:: replicaSets.[shard].[host].secondary - This field indicates whether this host is a - :term:`secondary` member of the replica set. + This field indicates whether this host is a + :term:`secondary` member of the replica set. - .. stats:: replicaSets.[shard].[host].pingTimeMillis + .. stats:: replicaSets.[shard].[host].pingTimeMillis - This field indicates the ping time in miliseconds from the - :program:`mongos` + This field indicates the ping time in miliseconds from + the :program:`mongos` .. stats:: replicaSets.[shard].master @@ -1892,9 +1892,9 @@ Diagnostics ``users``. You may also specify one of the following options: - 1. ``full: true`` provides a more thorough scan of the data. + - ``full: true`` provides a more thorough scan of the data. - 2. ``scandata: false`` skips the scan of the base collection + - ``scandata: false`` skips the scan of the base collection without skipping the scan of the index. The :program:`mongo` shell also provides a wrapper: @@ -1920,15 +1920,15 @@ Diagnostics and provides amount of time, in microseconds, used and a count of operations for the following event types: - 3. total - 4. readLock - 5. writeLock - 6. queries - 7. getmore - 8. insert - 9. update - 10. remove - 11. commands + - total + - readLock + - writeLock + - queries + - getmore + - insert + - update + - remove + - commands The command takes the following form: @@ -1947,12 +1947,12 @@ Diagnostics The information provided includes the following: - 12. The version of MongoDB currently running. - 13. The information about the system that built the - ":program:`mongod`" binary, including a timestamp for the build. - 14. The architecture of the binary (i.e. 64 or 32 bits) - 15. The maximum allowable :term:`BSON` object size in bytes (in the field - ``maxBsonObjectSize``.) + - 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 ``admin`` database. @@ -2020,17 +2020,17 @@ Diagnostics Replace ```` with one of the following values: - 16. ``global`` - returns the combined output of all recent log - entries. + - ``global`` - returns the combined output of all recent log + entries. - 17. ``rs`` - if the :program:`mongod` is part of a :term:`replica - set`, :dbcommand:`getLog` will return recent notices related to - replica set activity. + - ``rs`` - if the :program:`mongod` is part of a :term:`replica + set`, :dbcommand:`getLog` will return recent notices related to + replica set activity. - 18. ``startupWarnings`` - will return logs that *may* contain - errors or warnings from MongoDB's log from when the current - process started. If :program:`mongod` started without warnings, - this filter may return an empty array. + - ``startupWarnings`` - will return logs that *may* contain errors + or warnings from MongoDB's log from when the current process + started. If :program:`mongod` started without warnings, this + filter may return an empty array. You may also specify an asterisk (e.g. ``*``) as the ```` value to return a list of available log filters. The following From d6d72618ded39e12cc8db25c25a374c2f9158d76 Mon Sep 17 00:00:00 2001 From: Andrew Leung Date: Tue, 17 Jul 2012 09:38:07 -0400 Subject: [PATCH 08/23] moved note for connPoolStats --- source/reference/commands.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/source/reference/commands.txt b/source/reference/commands.txt index 625ebe938d2..4748d9e4cc2 100644 --- a/source/reference/commands.txt +++ b/source/reference/commands.txt @@ -1736,7 +1736,14 @@ Diagnostics { connPoolStats: 1 } The value of the argument (i.e. ``1`` ) does not affect the - output of the command. The output of :dbcommand:`connPoolStats` is: + output of the command. + + .. note:: + + :dbcommand:`connPoolStats` only return meaningful results in the + :program:`mongos` program. + + The output of :dbcommand:`connPoolStats` is: .. stats:: hosts @@ -1857,11 +1864,6 @@ Diagnostics connection pool. These connections will be released when there is an exception thrown in MongoDB. - .. note:: - - :dbcommand:`connPoolStats` only return meaningful results in the - :program:`mongos` program. - .. dbcommand:: getCmdLineOpts The :dbcommand:`getCmdLineOpts` command returns a document containing From 9f119e0737b9fda90d2f21c74f12a1b2674df8db Mon Sep 17 00:00:00 2001 From: Andrew Leung Date: Tue, 17 Jul 2012 09:56:50 -0400 Subject: [PATCH 09/23] updates to connPoolStats command --- source/reference/commands.txt | 141 ++++++++++++++++++++++++++++++++-- 1 file changed, 136 insertions(+), 5 deletions(-) diff --git a/source/reference/commands.txt b/source/reference/commands.txt index 4748d9e4cc2..0c44d9ef7a2 100644 --- a/source/reference/commands.txt +++ b/source/reference/commands.txt @@ -1736,7 +1736,132 @@ Diagnostics { connPoolStats: 1 } The value of the argument (i.e. ``1`` ) does not affect the - output of the command. + output of the command. The output of :dbcommand:`connPoolStats` is: + + .. stats:: hosts + + :stats:`hosts` contains a document for every member in the + connection pool, every :term:`shard cluster`, :term:`replica + set`, and :term:`config database`. + + .. stats:: hosts.[host].available + + The cummulative number of connections in the connection pool + available for a host to connect to a :program:`mongos`. + + .. stats:: hosts.[host].created + + The number of connections in the connection pool that has ever + been created for this host by the :program:`mongos`. + + .. stats:: replicaSets + + This field holds a document that contains detailed replica set + information. + + .. stats:: replicaSets.shard + + This document gives details on each shard within the replica set. + + .. stats:: replicaSets.[shard].host + + This document gives details on each host within the shard in the replica set. + + These values are derived from the :doc:`replica set status + ` values. + + .. stats:: replicaSets.[shard].[host].addr + + This field indicates the address for a particular host in + the :term:`shard cluster` in the format of + "``[hostname]:[port]``". + + .. stats:: replicaSets.[shard].[host].ok + + This field indicates whether the host is accessible for + queries. + + .. TODO verify with someone more knowledgable. + + .. stats:: replicaSets.[shard].[host].ismaster + + A field indicates whether this host is the :term:`master` + member of the replica set. + + .. stats:: replicaSets.[shard].[host].hidden + + This field indicates whether this host is a :term:`hidden + member` of the replica set. + + .. stats:: replicaSets.[shard].[host].secondary + + This field indicates whether this host is a + :term:`secondary` member of the replica set. + + .. stats:: replicaSets.[shard].[host].pingTimeMillis + + This field indicates the ping time in miliseconds from the + :program:`mongos` + + .. stats:: replicaSets.[shard].master + + This field indicates the number of the host that is the + :term:`master` from the ``hosts`` list. + + .. stats:: replicaSets.[shard].nextSlave + + This field indicates the number of the host that is the next + :term:`secondary` to read from instead of :term:`master` from + the ``hosts`` list. + + .. TODO verify with someone more knowledgable. + + .. stats:: createdByType + + The number of each type of connection that has been created in + all connection pools. + + .. stats:: createdByType.master + + The total number of connections created to connect to a + :term:`shard cluster` that is a :term:`master` member. + + .. stats:: createdByType.set + + The total number of connections created to connect to a :term:`replica + set` member. + + .. stats:: createdByType.sync + + The total number of connections created to connect to the + :term:`config database`. + + .. stats:: totalAvailable + + A running total of connections available in all connection pools. + + .. stats:: totalCreated + + The total number of connections ever created in all connection pools. + + .. stats:: numDBClientConnection + + The number of normal client connections in the connection pool. + + .. TODO verify - unlike scoped, does this stay connected when + .. there is an exception? + + .. stats:: numAScopedConnection + + The number of exception safe connections that exists in the + connection pool. These connections will be released when there is an + exception thrown in MongoDB. + + .. note:: + + :dbcommand:`connPoolStats` only return meaningful results in the + :program:`mongos` program. +>>>>>>> 7c8a3466cd4c0c1dc3fd4ce23823bd38018ef0b4 .. note:: @@ -1903,7 +2028,7 @@ Diagnostics .. code-block:: javascript - db.collection.validate(); + db.collection.validate(); Use one of the following forms to perform the full collection validation: @@ -1916,6 +2041,8 @@ Diagnostics .. warning:: This command is resource intensive and may have an impact on the performance of your MongoDB instance. + .. TODO link to the document with these statistics + .. dbcommand:: top The :dbcommand:`top` command returns raw usage of each database, @@ -1950,13 +2077,17 @@ Diagnostics 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 architecture of the binary (i.e. 64 or 32 bits.) + - The maximum allowable :term:`BSON` object size in bytes (in the field - ``maxBsonObjectSize``.) + ``maxBsonObjectSize``.) - You must issue the :dbcommand:`buildInfo` command against the ``admin`` database. + You must issue the :dbcommand:`buildInfo` command against the + ``admin`` database. .. dbcommand:: getLastError From e6c65ffd28ce42ead91e4a13b6d1c9dc84a25efe Mon Sep 17 00:00:00 2001 From: Andrew Leung Date: Tue, 17 Jul 2012 13:59:01 -0400 Subject: [PATCH 10/23] removed double entry on connPoolStats --- source/reference/commands.txt | 144 +++------------------------------- 1 file changed, 10 insertions(+), 134 deletions(-) diff --git a/source/reference/commands.txt b/source/reference/commands.txt index 0c44d9ef7a2..dc1b715a9fe 100644 --- a/source/reference/commands.txt +++ b/source/reference/commands.txt @@ -1736,7 +1736,15 @@ Diagnostics { connPoolStats: 1 } The value of the argument (i.e. ``1`` ) does not affect the - output of the command. The output of :dbcommand:`connPoolStats` is: + output of the command. + + .. note:: + + :dbcommand:`connPoolStats` only return meaningful results in the + :program:`mongos` program. + + + The output of :dbcommand:`connPoolStats` is: .. stats:: hosts @@ -1765,7 +1773,7 @@ Diagnostics .. stats:: replicaSets.[shard].host - This document gives details on each host within the shard in the replica set. + This :term:`document` gives details on each host within the shard in the replica set. These values are derived from the :doc:`replica set status ` values. @@ -1857,138 +1865,6 @@ Diagnostics connection pool. These connections will be released when there is an exception thrown in MongoDB. - .. note:: - - :dbcommand:`connPoolStats` only return meaningful results in the - :program:`mongos` program. ->>>>>>> 7c8a3466cd4c0c1dc3fd4ce23823bd38018ef0b4 - - .. note:: - - :dbcommand:`connPoolStats` only return meaningful results in the - :program:`mongos` program. - - The output of :dbcommand:`connPoolStats` is: - - .. stats:: hosts - - :stats:`hosts` contains a document for every member in the - connection pool, every :term:`shard cluster`, :term:`replica - set`, and :term:`config database`. - - .. stats:: hosts.[host].available - - The cummulative number of connections in the connection pool - available for a host to connect to a :program:`mongos`. - - .. stats:: hosts.[host].created - - The number of connections in the connection pool that has ever - been created for this host by the :program:`mongos`. - - .. stats:: replicaSets - - This field holds a document that contains detailed replica set - information. - - .. stats:: replicaSets.shard - - This document gives details on each shard within the replica set. - - .. stats:: replicaSets.[shard].host - - This document gives details on each host within the shard in the replica set. - - These values are derived from the :doc:`replica set status - ` values. - - .. stats:: replicaSets.[shard].[host].addr - - This field indicates the address for a particular host - in the :term:`shard cluster` in the format of - "``[hostname]:[port]``". - - .. stats:: replicaSets.[shard].[host].ok - - This field indicates whether the host is accessible for - queries. - - .. TODO verify with someone more knowledgable. - - .. stats:: replicaSets.[shard].[host].ismaster - - A field indicates whether this host is the - :term:`master` member of the replica set. - - .. stats:: replicaSets.[shard].[host].hidden - - This field indicates whether this host is a - :term:`hidden member` of the replica set. - - .. stats:: replicaSets.[shard].[host].secondary - - This field indicates whether this host is a - :term:`secondary` member of the replica set. - - .. stats:: replicaSets.[shard].[host].pingTimeMillis - - This field indicates the ping time in miliseconds from - the :program:`mongos` - - .. stats:: replicaSets.[shard].master - - This field indicates the number of the host that is the - :term:`master` from the ``hosts`` list. - - .. stats:: replicaSets.[shard].nextSlave - - This field indicates the number of the host that is the next - :term:`secondary` to read from instead of :term:`master` from - the ``hosts`` list. - - .. TODO verify with someone more knowledgable. - - .. stats:: createdByType - - The number of each type of connection that has been created in - all connection pools. - - .. stats:: createdByType.master - - The total number of connections created to connect to a - :term:`shard cluster` that is a :term:`master` member. - - .. stats:: createdByType.set - - The total number of connections created to connect to a :term:`replica - set` member. - - .. stats:: createdByType.sync - - The total number of connections created to connect to the - :term:`config database`. - - .. stats:: totalAvailable - - A running total of connections available in all connection pools. - - .. stats:: totalCreated - - The total number of connections ever created in all connection pools. - - .. stats:: numDBClientConnection - - The number of normal client connections in the connection pool. - - .. TODO verify - unlike scoped, does this stay connected when - .. there is an exception? - - .. stats:: numAScopedConnection - - The number of exception safe connections that exists in the - connection pool. These connections will be released when there is an - exception thrown in MongoDB. - .. dbcommand:: getCmdLineOpts The :dbcommand:`getCmdLineOpts` command returns a document containing From add340fa30ba67283847bdc0116eb2682d24ee94 Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Tue, 17 Jul 2012 16:38:20 -0400 Subject: [PATCH 11/23] DOCS-158 breaking out conn pool stats into its own page --- source/includes/note-conn-pool-stats.rst | 4 + source/reference.txt | 1 + source/reference/commands.txt | 132 +------------------- source/reference/connection-pool-stats.txt | 137 +++++++++++++++++++++ 4 files changed, 146 insertions(+), 128 deletions(-) create mode 100644 source/includes/note-conn-pool-stats.rst create mode 100644 source/reference/connection-pool-stats.txt diff --git a/source/includes/note-conn-pool-stats.rst b/source/includes/note-conn-pool-stats.rst new file mode 100644 index 00000000000..932ad566b83 --- /dev/null +++ b/source/includes/note-conn-pool-stats.rst @@ -0,0 +1,4 @@ +.. note:: + + :dbcommand:`connPoolStats` only return meaningful results for + :program:`mongos` program. diff --git a/source/reference.txt b/source/reference.txt index 2b5c28242b7..139e85a0210 100644 --- a/source/reference.txt +++ b/source/reference.txt @@ -35,6 +35,7 @@ Statuses and Errors reference/database-statistics reference/collection-statistics reference/collection-validation + reference/connection-pool-stats reference/replica-status reference/replica-configuration reference/replication-info diff --git a/source/reference/commands.txt b/source/reference/commands.txt index dc1b715a9fe..994d37bdf85 100644 --- a/source/reference/commands.txt +++ b/source/reference/commands.txt @@ -1725,6 +1725,8 @@ Diagnostics .. dbcommand:: connPoolStats + .. include:: /includes/note-conn-pool-stats + The command :dbcommand:`connPoolStats` returns information regarding the number of open connections to the current database instance, including client connections and server-to-server @@ -1736,134 +1738,8 @@ Diagnostics { connPoolStats: 1 } The value of the argument (i.e. ``1`` ) does not affect the - output of the command. - - .. note:: - - :dbcommand:`connPoolStats` only return meaningful results in the - :program:`mongos` program. - - - The output of :dbcommand:`connPoolStats` is: - - .. stats:: hosts - - :stats:`hosts` contains a document for every member in the - connection pool, every :term:`shard cluster`, :term:`replica - set`, and :term:`config database`. - - .. stats:: hosts.[host].available - - The cummulative number of connections in the connection pool - available for a host to connect to a :program:`mongos`. - - .. stats:: hosts.[host].created - - The number of connections in the connection pool that has ever - been created for this host by the :program:`mongos`. - - .. stats:: replicaSets - - This field holds a document that contains detailed replica set - information. - - .. stats:: replicaSets.shard - - This document gives details on each shard within the replica set. - - .. stats:: replicaSets.[shard].host - - This :term:`document` gives details on each host within the shard in the replica set. - - These values are derived from the :doc:`replica set status - ` values. - - .. stats:: replicaSets.[shard].[host].addr - - This field indicates the address for a particular host in - the :term:`shard cluster` in the format of - "``[hostname]:[port]``". - - .. stats:: replicaSets.[shard].[host].ok - - This field indicates whether the host is accessible for - queries. - - .. TODO verify with someone more knowledgable. - - .. stats:: replicaSets.[shard].[host].ismaster - - A field indicates whether this host is the :term:`master` - member of the replica set. - - .. stats:: replicaSets.[shard].[host].hidden - - This field indicates whether this host is a :term:`hidden - member` of the replica set. - - .. stats:: replicaSets.[shard].[host].secondary - - This field indicates whether this host is a - :term:`secondary` member of the replica set. - - .. stats:: replicaSets.[shard].[host].pingTimeMillis - - This field indicates the ping time in miliseconds from the - :program:`mongos` - - .. stats:: replicaSets.[shard].master - - This field indicates the number of the host that is the - :term:`master` from the ``hosts`` list. - - .. stats:: replicaSets.[shard].nextSlave - - This field indicates the number of the host that is the next - :term:`secondary` to read from instead of :term:`master` from - the ``hosts`` list. - - .. TODO verify with someone more knowledgable. - - .. stats:: createdByType - - The number of each type of connection that has been created in - all connection pools. - - .. stats:: createdByType.master - - The total number of connections created to connect to a - :term:`shard cluster` that is a :term:`master` member. - - .. stats:: createdByType.set - - The total number of connections created to connect to a :term:`replica - set` member. - - .. stats:: createdByType.sync - - The total number of connections created to connect to the - :term:`config database`. - - .. stats:: totalAvailable - - A running total of connections available in all connection pools. - - .. stats:: totalCreated - - The total number of connections ever created in all connection pools. - - .. stats:: numDBClientConnection - - The number of normal client connections in the connection pool. - - .. TODO verify - unlike scoped, does this stay connected when - .. there is an exception? - - .. stats:: numAScopedConnection - - The number of exception safe connections that exists in the - connection pool. These connections will be released when there is an - exception thrown in MongoDB. + output of the command. See :doc:`/reference/connection-pool-stats` + for full documentation of all connection pool status. .. dbcommand:: getCmdLineOpts diff --git a/source/reference/connection-pool-stats.txt b/source/reference/connection-pool-stats.txt new file mode 100644 index 00000000000..bb8ac8c6952 --- /dev/null +++ b/source/reference/connection-pool-stats.txt @@ -0,0 +1,137 @@ +==================================== +Connection Pool Statistics Reference +==================================== + +.. default-domain:: mongodb + +Synopsis +-------- + +:program:`mongos` instances maintain a pool of connections for +interacting with the constituent members of the :term:`shard clusters +`. The :dbcommand:`connPoolStats` returns statistics +regarding these connection pools. + +.. include:: /includes/note-conn-pool-stats + +Output +------ + +.. stats:: hosts + + :stats:`hosts` contains a document for every member in the + connection pool, every :term:`shard cluster`, :term:`replica + set`, and :term:`config database`. + +.. stats:: hosts.[host].available + + The cummulative number of connections in the connection pool + available for a host to connect to a :program:`mongos`. + +.. stats:: hosts.[host].created + + The number of connections in the connection pool that has ever + been created for this host by the :program:`mongos`. + +.. stats:: replicaSets + + This field holds a document that contains detailed replica set + information. + + .. stats:: replicaSets.shard + + This document gives details on each shard within the replica set. + + .. stats:: replicaSets.[shard].host + + This :term:`document` gives details on each host within the shard in the replica set. + + These values derive from the :doc:`replica set status + ` values. + + .. stats:: replicaSets.[shard].[host].addr + + This field indicates the address for a particular host in + the :term:`shard cluster` in the format of + "``[hostname]:[port]``". + + .. stats:: replicaSets.[shard].[host].ok + + This field indicates whether the host is accessible for + queries. + + .. TODO verify with someone more knowledgable. + + .. stats:: replicaSets.[shard].[host].ismaster + + A field indicates whether this host is the :term:`master` + member of the replica set. + + .. stats:: replicaSets.[shard].[host].hidden + + This field indicates whether this host is a :term:`hidden + member` of the replica set. + + .. stats:: replicaSets.[shard].[host].secondary + + This field indicates whether this host is a + :term:`secondary` member of the replica set. + + .. stats:: replicaSets.[shard].[host].pingTimeMillis + + This field indicates the ping time in miliseconds from the + :program:`mongos` + + .. stats:: replicaSets.[shard].master + + This field indicates the number of the host that is the + :term:`master` from the ``hosts`` list. + + .. stats:: replicaSets.[shard].nextSlave + + This field indicates the number of the host that is the next + :term:`secondary` to read from instead of :term:`master` from + the ``hosts`` list. + + .. TODO verify with someone more knowledgable. + +.. stats:: createdByType + + The number of each type of connection that :program:`mongos` has + created in all connection pools. + + .. stats:: createdByType.master + + The total number of connections created to connect to a + :term:`shard cluster` that is a :term:`master` member. + + .. stats:: createdByType.set + + The total number of connections created to connect to a :term:`replica + set` member. + + .. stats:: createdByType.sync + + The total number of connections created to connect to the + :term:`config database`. + +.. stats:: totalAvailable + + A running total of connections available in all connection pools. + +.. stats:: totalCreated + + The total number of connections ever created in all connection pools. + +.. stats:: numDBClientConnection + + The number of normal client connections in the connection pool. + + .. TODO verify - unlike scoped, does this stay connected when + .. there is an exception? + +.. stats:: numAScopedConnection + + The number of exception safe connections that exists in the + connection pool. The :program:`mongos will release all connections + when there is an exception thrown in MongoDB. From 1c02e52203d1b00553b581f4e763013382002964 Mon Sep 17 00:00:00 2001 From: Andrew Leung Date: Wed, 18 Jul 2012 11:59:49 -0400 Subject: [PATCH 12/23] updated connection-pool-stats page. --- source/reference/connection-pool-stats.txt | 125 ++++++++++++--------- 1 file changed, 71 insertions(+), 54 deletions(-) diff --git a/source/reference/connection-pool-stats.txt b/source/reference/connection-pool-stats.txt index bb8ac8c6952..18b0c3dc372 100644 --- a/source/reference/connection-pool-stats.txt +++ b/source/reference/connection-pool-stats.txt @@ -9,8 +9,9 @@ Synopsis :program:`mongos` instances maintain a pool of connections for interacting with the constituent members of the :term:`shard clusters -`. The :dbcommand:`connPoolStats` returns statistics -regarding these connection pools. +`. The :dbcommand:`connPoolStats` command returns +statistics regarding these connections between :program:`mongod` and +:program:`mongos` .. include:: /includes/note-conn-pool-stats @@ -19,119 +20,135 @@ Output .. stats:: hosts - :stats:`hosts` contains a document for every member in the - connection pool, every :term:`shard cluster`, :term:`replica - set`, and :term:`config database`. + :stats:`hosts` contains a document for every :program:`mongod` + member that is connected to the :program:`mongos`. .. stats:: hosts.[host].available - - The cummulative number of connections in the connection pool - available for a host to connect to a :program:`mongos`. + + :stats:`hosts.[host].available` reports the total number of + connections created by the :program:`mongos`, and used to connect + to members of the :term:`shard cluster`. .. stats:: hosts.[host].created - The number of connections in the connection pool that has ever - been created for this host by the :program:`mongos`. + :stats:`hosts.[host].created` reports the number of connections + that has ever been created for this host by the :program:`mongos`. .. stats:: replicaSets - This field holds a document that contains detailed replica set - information. + :stats:`replicaSets` is a :term:`document` that contains detailed + :term:`replica set` information for the :term:`shard cluster`. - .. stats:: replicaSets.shard + .. stats:: replicaSets.shard - This document gives details on each shard within the replica set. + The :stats:`replicaSets.shard` :term:`document` reports details + on each shard within the :term:`replica set`. - .. stats:: replicaSets.[shard].host + .. stats:: replicaSets.[shard].host - This :term:`document` gives details on each host within the shard in the replica set. + This :stats:`replicaSets.[shard].host` :term:`document` gives + details on each host within the shard in the :term:`replica + set`. - These values derive from the :doc:`replica set status - ` values. + These values derive from the :doc:`replica set status + ` values. .. stats:: replicaSets.[shard].[host].addr - This field indicates the address for a particular host in - the :term:`shard cluster` in the format of + :stats:`replicaSets.[shard].[host].addr` reports the address + for the host in the :term:`shard cluster` in the format of "``[hostname]:[port]``". .. stats:: replicaSets.[shard].[host].ok - This field indicates whether the host is accessible for - queries. + :stats:`replicaSets.[shard].[host].ok` reports ``false`` + when: + + - :program:`mongos` cannot connect to this member. - .. TODO verify with someone more knowledgable. + - an error occurred on this member. .. stats:: replicaSets.[shard].[host].ismaster - A field indicates whether this host is the :term:`master` - member of the replica set. + :stats:`replicaSets.[shard].[host].ismaster` reports if this + host is the :term:`master` member of the :term:`replica set`. .. stats:: replicaSets.[shard].[host].hidden - This field indicates whether this host is a :term:`hidden - member` of the replica set. + :stats:`replicaSets.[shard].[host].hidden` reports if this + host is a :term:`hidden member` of the :term:`replica set`. .. stats:: replicaSets.[shard].[host].secondary - This field indicates whether this host is a - :term:`secondary` member of the replica set. + :stats:`replicaSets.[shard].[host].secondary` reports if this + host is a :term:`secondary` member of the :term:`replica set`. .. stats:: replicaSets.[shard].[host].pingTimeMillis - This field indicates the ping time in miliseconds from the - :program:`mongos` + :stats:`replicaSets.[shard].[host].pingTimeMillis` reports + the ping time in miliseconds from the :program:`mongos` to + the :stats:`replicaSets.[shard].host`. .. stats:: replicaSets.[shard].master - This field indicates the number of the host that is the - :term:`master` from the ``hosts`` list. + :stats:`replicaSets.[shard].master` reports the number of the + host that is the :term:`master` of the :term:`replica set` from the + :stats:`replicaSets.[shard].host` list. .. stats:: replicaSets.[shard].nextSlave - This field indicates the number of the host that is the next - :term:`secondary` to read from instead of :term:`master` from - the ``hosts`` list. + :stats:`replicaSets.[shard].nextSlave` reports which + :term:`secondary` member to use when servicing a new request + from a new connection. - .. TODO verify with someone more knowledgable. + .. note:: + This field is only used for debugging and is depreciated. + .. stats:: createdByType - The number of each type of connection that :program:`mongos` has - created in all connection pools. + :stats:`createdByType` :term:`document` reports the number of each + type of connection that :program:`mongos` has created in all + connection pools. .. stats:: createdByType.master - The total number of connections created to connect to a - :term:`shard cluster` that is a :term:`master` member. + :stats:`createdByType.master` reports the total number of + connections created to connect to :term:`master` members in the + :term:`shard cluster`. .. stats:: createdByType.set - The total number of connections created to connect to a :term:`replica - set` member. + :stats:`createdByType.set` reports the total number of + connections created to connect to a :term:`replica set` member. .. stats:: createdByType.sync - The total number of connections created to connect to the - :term:`config database`. + :stats:`createdByType.sync` reports the total number of + connections created to connect to the :term:`config database`. .. stats:: totalAvailable - A running total of connections available in all connection pools. + :stats:`totalAvailable` reports the running total of connections + from :program:`mongos` to all :program:`mongod` in the :term:`shard + cluster` .. stats:: totalCreated - The total number of connections ever created in all connection pools. + :stats:`totalCreated` reports the total number of connections ever + created from :program:`mongos` to all :program:`mongod` in the + :term:`shard cluster`. .. stats:: numDBClientConnection - The number of normal client connections in the connection pool. - - .. TODO verify - unlike scoped, does this stay connected when - .. there is an exception? + :stats:`numDBClientConnection` reports the number of normal client + connections created from :program:`mongos` to all :program:`mongod` + in the :term:`shard cluster`. .. stats:: numAScopedConnection - The number of exception safe connections that exists in the - connection pool. The :program:`mongos will release all connections - when there is an exception thrown in MongoDB. + :stats:`numAScopedConnection` reports the number of exception safe + connections created from :program:`mongos` to all :program:`mongod` + in the :term:`shard cluster`. These connections will be released + from :program:`mongos` when there is an exception thrown in + MongoDB. From 91d616fd86da53b543a1fa6e7378ab854d94aea6 Mon Sep 17 00:00:00 2001 From: Andrew Leung Date: Wed, 18 Jul 2012 13:52:24 -0400 Subject: [PATCH 13/23] updated connection-pool-stats.txt again. --- source/reference/connection-pool-stats.txt | 90 ++++++++++++---------- 1 file changed, 51 insertions(+), 39 deletions(-) diff --git a/source/reference/connection-pool-stats.txt b/source/reference/connection-pool-stats.txt index 18b0c3dc372..82f90ce3efd 100644 --- a/source/reference/connection-pool-stats.txt +++ b/source/reference/connection-pool-stats.txt @@ -8,10 +8,10 @@ Synopsis -------- :program:`mongos` instances maintain a pool of connections for -interacting with the constituent members of the :term:`shard clusters +interacting with constituent members of the :term:`shard clusters `. The :dbcommand:`connPoolStats` command returns -statistics regarding these connections between :program:`mongod` and -:program:`mongos` +statistics regarding these connections between :program:`mongos` and +:program:`mongod` instances. .. include:: /includes/note-conn-pool-stats @@ -20,35 +20,39 @@ Output .. stats:: hosts - :stats:`hosts` contains a document for every :program:`mongod` - member that is connected to the :program:`mongos`. + The sub-documents of the :stats:`hosts` :term:`document` report connections + between the :program:`mongos` instance and every component + :program:`mongod` of the :term:`shard cluster`. -.. stats:: hosts.[host].available + .. stats:: hosts.[host].available - :stats:`hosts.[host].available` reports the total number of - connections created by the :program:`mongos`, and used to connect - to members of the :term:`shard cluster`. + :stats:`hosts.[host].available` reports the total number of + connections created by the :program:`mongos`, and used to + connect to members of the :term:`shard cluster`. -.. stats:: hosts.[host].created + .. stats:: hosts.[host].created - :stats:`hosts.[host].created` reports the number of connections - that has ever been created for this host by the :program:`mongos`. + :stats:`hosts.[host].created` reports the number of connections + that has ever been created for this host by the + :program:`mongos`. .. stats:: replicaSets - :stats:`replicaSets` is a :term:`document` that contains detailed + :stats:`replicaSets` is a :term:`document` that contains :term:`replica set` information for the :term:`shard cluster`. + .. fix "detailed" + .. stats:: replicaSets.shard - The :stats:`replicaSets.shard` :term:`document` reports details - on each shard within the :term:`replica set`. + The :stats:`replicaSets.shard` :term:`document` reports + on each :term:`shard` within the :term:`shard cluster` .. stats:: replicaSets.[shard].host - This :stats:`replicaSets.[shard].host` :term:`document` gives - details on each host within the shard in the :term:`replica - set`. + The :stats:`replicaSets.[shard].host` :term:`document` reports + on each host within the :term:`shard` in the :term:`replica + set`. These values derive from the :doc:`replica set status ` values. @@ -64,42 +68,45 @@ Output :stats:`replicaSets.[shard].[host].ok` reports ``false`` when: - - :program:`mongos` cannot connect to this member. + - the :program:`mongos` cannot connect to instance. - - an error occurred on this member. + - an error occurred on this instance. .. stats:: replicaSets.[shard].[host].ismaster - :stats:`replicaSets.[shard].[host].ismaster` reports if this - host is the :term:`master` member of the :term:`replica set`. + :stats:`replicaSets.[shard].[host].ismaster` reports ``true`` + if this :stats:`replicaSets.[shard].host` is the + :term:`primary` member of the :term:`replica set`. .. stats:: replicaSets.[shard].[host].hidden - :stats:`replicaSets.[shard].[host].hidden` reports if this - host is a :term:`hidden member` of the :term:`replica set`. + :stats:`replicaSets.[shard].[host].hidden` reports ``true`` + if this :stats:`replicaSets.[shard].host` is a :term:`hidden + member` of the :term:`replica set`. .. stats:: replicaSets.[shard].[host].secondary - :stats:`replicaSets.[shard].[host].secondary` reports if this - host is a :term:`secondary` member of the :term:`replica set`. + :stats:`replicaSets.[shard].[host].secondary` reports + ``true`` if this :stats:`replicaSets.[shard].host` is a + :term:`secondary` member of the :term:`replica set`. .. stats:: replicaSets.[shard].[host].pingTimeMillis :stats:`replicaSets.[shard].[host].pingTimeMillis` reports - the ping time in miliseconds from the :program:`mongos` to - the :stats:`replicaSets.[shard].host`. + the ping time in milliseconds from the :program:`mongos` to + this :stats:`replicaSets.[shard].host`. .. stats:: replicaSets.[shard].master :stats:`replicaSets.[shard].master` reports the number of the - host that is the :term:`master` of the :term:`replica set` from the + host that is :term:`primary` of the :term:`replica set` from the :stats:`replicaSets.[shard].host` list. .. stats:: replicaSets.[shard].nextSlave - :stats:`replicaSets.[shard].nextSlave` reports which - :term:`secondary` member to use when servicing a new request - from a new connection. + :stats:`replicaSets.[shard].nextSlave` reports the + :term:`secondary` member that the :program:`mongos` will use to + service the next request for this :term:`replica set`. .. note:: @@ -111,11 +118,16 @@ Output type of connection that :program:`mongos` has created in all connection pools. + There are three connection types :program:`mongos` use to connect + to each type of :program:`mongod` instance. The following + sub-document contains the total number of each connection type the + :program:`mongos` uses. + .. stats:: createdByType.master :stats:`createdByType.master` reports the total number of - connections created to connect to :term:`master` members in the - :term:`shard cluster`. + connections created to connect to the :term:`primary` member in + each :term:`shard cluster`. .. stats:: createdByType.set @@ -130,20 +142,20 @@ Output .. stats:: totalAvailable :stats:`totalAvailable` reports the running total of connections - from :program:`mongos` to all :program:`mongod` in the :term:`shard - cluster` + from :program:`mongos` to all :program:`mongod` instances in the + :term:`shard cluster` .. stats:: totalCreated :stats:`totalCreated` reports the total number of connections ever - created from :program:`mongos` to all :program:`mongod` in the - :term:`shard cluster`. + created from :program:`mongos` to all :program:`mongod` instances in + the :term:`shard cluster`. .. stats:: numDBClientConnection :stats:`numDBClientConnection` reports the number of normal client connections created from :program:`mongos` to all :program:`mongod` - in the :term:`shard cluster`. + instances in the :term:`shard cluster`. .. stats:: numAScopedConnection From b482f3f44ba9a3b4e50eaf82ff2de411ec8b7da0 Mon Sep 17 00:00:00 2001 From: Andrew Leung Date: Wed, 18 Jul 2012 15:48:38 -0400 Subject: [PATCH 14/23] semi update to connPoolStats --- source/reference/connection-pool-stats.txt | 43 ++++++++++++---------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/source/reference/connection-pool-stats.txt b/source/reference/connection-pool-stats.txt index 82f90ce3efd..6a30d2702e0 100644 --- a/source/reference/connection-pool-stats.txt +++ b/source/reference/connection-pool-stats.txt @@ -10,8 +10,8 @@ Synopsis :program:`mongos` instances maintain a pool of connections for interacting with constituent members of the :term:`shard clusters `. The :dbcommand:`connPoolStats` command returns -statistics regarding these connections between :program:`mongos` and -:program:`mongod` instances. +statistics regarding these connections between the :program:`mongos` +and :program:`mongod` instances. .. include:: /includes/note-conn-pool-stats @@ -20,6 +20,12 @@ Output .. stats:: hosts + .. TODO double check + + The host field holds an array which contains a list of + documents. Each document in this array reports the state of that + host. + The sub-documents of the :stats:`hosts` :term:`document` report connections between the :program:`mongos` instance and every component :program:`mongod` of the :term:`shard cluster`. @@ -41,8 +47,6 @@ Output :stats:`replicaSets` is a :term:`document` that contains :term:`replica set` information for the :term:`shard cluster`. - .. fix "detailed" - .. stats:: replicaSets.shard The :stats:`replicaSets.shard` :term:`document` reports @@ -98,9 +102,11 @@ Output .. stats:: replicaSets.[shard].master - :stats:`replicaSets.[shard].master` reports the number of the - host that is :term:`primary` of the :term:`replica set` from the - :stats:`replicaSets.[shard].host` list. + :stats:`replicaSets.[shard].master` numerical identifier of the + host in the :stats:`replicaSets.[shard].host` list that is the + :term:`primary` member of the :term:`replica set`. + + .. TODO clarify - check over. .. stats:: replicaSets.[shard].nextSlave @@ -118,38 +124,37 @@ Output type of connection that :program:`mongos` has created in all connection pools. - There are three connection types :program:`mongos` use to connect - to each type of :program:`mongod` instance. The following - sub-document contains the total number of each connection type the - :program:`mongos` uses. + :program:`mongos` connect to :program:`mongod` instances using one + of three types of connections. The following sub-document reports + the total number of connections by type. .. stats:: createdByType.master :stats:`createdByType.master` reports the total number of - connections created to connect to the :term:`primary` member in - each :term:`shard cluster`. + connections to the :term:`primary` member in each :term:`shard + cluster`. .. stats:: createdByType.set :stats:`createdByType.set` reports the total number of - connections created to connect to a :term:`replica set` member. + connections to a :term:`replica set` member. .. stats:: createdByType.sync :stats:`createdByType.sync` reports the total number of - connections created to connect to the :term:`config database`. + :term:`config database` connections. .. stats:: totalAvailable :stats:`totalAvailable` reports the running total of connections - from :program:`mongos` to all :program:`mongod` instances in the - :term:`shard cluster` + from the :program:`mongos` to all :program:`mongod` instances in + the :term:`shard cluster` .. stats:: totalCreated :stats:`totalCreated` reports the total number of connections ever - created from :program:`mongos` to all :program:`mongod` instances in - the :term:`shard cluster`. + created from the :program:`mongos` to all :program:`mongod` + instances in the :term:`shard cluster`. .. stats:: numDBClientConnection From f7ce1edbb2ffa8d5677ae7baa7ac8df1afcecf54 Mon Sep 17 00:00:00 2001 From: Andrew Leung Date: Wed, 18 Jul 2012 18:09:30 -0400 Subject: [PATCH 15/23] updating connPoolStats more... --- source/reference/connection-pool-stats.txt | 23 ++++++++++------------ 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/source/reference/connection-pool-stats.txt b/source/reference/connection-pool-stats.txt index 6a30d2702e0..79fb5a4bc8e 100644 --- a/source/reference/connection-pool-stats.txt +++ b/source/reference/connection-pool-stats.txt @@ -20,12 +20,6 @@ Output .. stats:: hosts - .. TODO double check - - The host field holds an array which contains a list of - documents. Each document in this array reports the state of that - host. - The sub-documents of the :stats:`hosts` :term:`document` report connections between the :program:`mongos` instance and every component :program:`mongod` of the :term:`shard cluster`. @@ -74,7 +68,9 @@ Output - the :program:`mongos` cannot connect to instance. - - an error occurred on this instance. + - another connection error occurred on this instance. + + .. TODO verifying actual type of error. .. stats:: replicaSets.[shard].[host].ismaster @@ -102,11 +98,12 @@ Output .. stats:: replicaSets.[shard].master - :stats:`replicaSets.[shard].master` numerical identifier of the - host in the :stats:`replicaSets.[shard].host` list that is the - :term:`primary` member of the :term:`replica set`. + :stats:`replicaSets.[shard].master` reports the numerical + identifier of the host in the :stats:`replicaSets.[shard].host` + list that is the :term:`primary` member of the :term:`replica + set`. - .. TODO clarify - check over. + .. TODO clarify - is this clear (very long way to say this...) .. stats:: replicaSets.[shard].nextSlave @@ -158,8 +155,8 @@ Output .. stats:: numDBClientConnection - :stats:`numDBClientConnection` reports the number of normal client - connections created from :program:`mongos` to all :program:`mongod` + :stats:`numDBClientConnection` reports the total number of + connections from the :program:`mongos` to all of the :program:`mongod` instances in the :term:`shard cluster`. .. stats:: numAScopedConnection From e376e039feccee3382459229d7f7b0182e687c04 Mon Sep 17 00:00:00 2001 From: Andrew Leung Date: Thu, 19 Jul 2012 12:01:26 -0400 Subject: [PATCH 16/23] fixed connPoolStats --- source/reference/connection-pool-stats.txt | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/source/reference/connection-pool-stats.txt b/source/reference/connection-pool-stats.txt index 79fb5a4bc8e..8c699f4b712 100644 --- a/source/reference/connection-pool-stats.txt +++ b/source/reference/connection-pool-stats.txt @@ -68,9 +68,7 @@ Output - the :program:`mongos` cannot connect to instance. - - another connection error occurred on this instance. - - .. TODO verifying actual type of error. + - an error that affected the connection occurred on this instance. .. stats:: replicaSets.[shard].[host].ismaster @@ -98,12 +96,9 @@ Output .. stats:: replicaSets.[shard].master - :stats:`replicaSets.[shard].master` reports the numerical - identifier of the host in the :stats:`replicaSets.[shard].host` - list that is the :term:`primary` member of the :term:`replica - set`. - - .. TODO clarify - is this clear (very long way to say this...) + :stats:`replicaSets.[shard].master` reports the ordinal identifier + of the host in the :stats:`replicaSets.[shard].host` array that is + the :term:`primary` of the :term:`replica set`. .. stats:: replicaSets.[shard].nextSlave From 0fc5de39d86fd4c9d4420648b2878b1c46e5098f Mon Sep 17 00:00:00 2001 From: Andrew Leung Date: Thu, 19 Jul 2012 12:03:41 -0400 Subject: [PATCH 17/23] tightened up error on host.ok --- source/reference/connection-pool-stats.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/reference/connection-pool-stats.txt b/source/reference/connection-pool-stats.txt index 8c699f4b712..f080a90de1f 100644 --- a/source/reference/connection-pool-stats.txt +++ b/source/reference/connection-pool-stats.txt @@ -68,7 +68,7 @@ Output - the :program:`mongos` cannot connect to instance. - - an error that affected the connection occurred on this instance. + - an error affected this instance's connection. .. stats:: replicaSets.[shard].[host].ismaster From 03ef0b8b75404e2caae921bfcf13536dad425a2b Mon Sep 17 00:00:00 2001 From: Andrew Leung Date: Fri, 20 Jul 2012 09:24:48 -0400 Subject: [PATCH 18/23] added internal note to host.ok entry and fixed spacing problem. --- source/reference/connection-pool-stats.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/reference/connection-pool-stats.txt b/source/reference/connection-pool-stats.txt index f080a90de1f..ba65831c1a4 100644 --- a/source/reference/connection-pool-stats.txt +++ b/source/reference/connection-pool-stats.txt @@ -70,6 +70,10 @@ Output - an error affected this instance's connection. + .. note:: + + This field is only used internally for testing and debugging. + .. stats:: replicaSets.[shard].[host].ismaster :stats:`replicaSets.[shard].[host].ismaster` reports ``true`` @@ -134,7 +138,7 @@ Output .. stats:: createdByType.sync :stats:`createdByType.sync` reports the total number of - :term:`config database` connections. + :term:`config database` connections. .. stats:: totalAvailable From cbaddf4d48577cbe2560ab4591be1f75b84c12cc Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Fri, 20 Jul 2012 11:14:23 -0400 Subject: [PATCH 19/23] minor: DOCS-158 minor style corrections --- source/reference/connection-pool-stats.txt | 23 +++++++++------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/source/reference/connection-pool-stats.txt b/source/reference/connection-pool-stats.txt index ba65831c1a4..001e58db5e6 100644 --- a/source/reference/connection-pool-stats.txt +++ b/source/reference/connection-pool-stats.txt @@ -33,8 +33,7 @@ Output .. stats:: hosts.[host].created :stats:`hosts.[host].created` reports the number of connections - that has ever been created for this host by the - :program:`mongos`. + that this :program:`mongos` has ever created for this host. .. stats:: replicaSets @@ -66,13 +65,11 @@ Output :stats:`replicaSets.[shard].[host].ok` reports ``false`` when: - - the :program:`mongos` cannot connect to instance. + - the :program:`mongos` cannot connect to instance. - - an error affected this instance's connection. + - the :program:`mongos` received a connection exception or error. - .. note:: - - This field is only used internally for testing and debugging. + This field is for internal use. .. stats:: replicaSets.[shard].[host].ismaster @@ -106,13 +103,11 @@ Output .. stats:: replicaSets.[shard].nextSlave + .. deprecated:: 2.2 + :stats:`replicaSets.[shard].nextSlave` reports the :term:`secondary` member that the :program:`mongos` will use to service the next request for this :term:`replica set`. - - .. note:: - - This field is only used for debugging and is depreciated. .. stats:: createdByType @@ -162,6 +157,6 @@ Output :stats:`numAScopedConnection` reports the number of exception safe connections created from :program:`mongos` to all :program:`mongod` - in the :term:`shard cluster`. These connections will be released - from :program:`mongos` when there is an exception thrown in - MongoDB. + in the :term:`shard cluster`. The :program:`mongos` releases these + connections after receiving a socket exception from the + :program:`mongod`. From 055d642cc72225799ccd2cc3532c2e8ce628a917 Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Fri, 20 Jul 2012 11:18:53 -0400 Subject: [PATCH 20/23] minor: whitespace cleanup --- source/reference/connection-pool-stats.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/reference/connection-pool-stats.txt b/source/reference/connection-pool-stats.txt index 001e58db5e6..4e9e3657577 100644 --- a/source/reference/connection-pool-stats.txt +++ b/source/reference/connection-pool-stats.txt @@ -42,7 +42,7 @@ Output .. stats:: replicaSets.shard - The :stats:`replicaSets.shard` :term:`document` reports + The :stats:`replicaSets.shard` :term:`document` reports on each :term:`shard` within the :term:`shard cluster` .. stats:: replicaSets.[shard].host @@ -65,7 +65,7 @@ Output :stats:`replicaSets.[shard].[host].ok` reports ``false`` when: - - the :program:`mongos` cannot connect to instance. + - the :program:`mongos` cannot connect to instance. - the :program:`mongos` received a connection exception or error. @@ -108,7 +108,7 @@ Output :stats:`replicaSets.[shard].nextSlave` reports the :term:`secondary` member that the :program:`mongos` will use to service the next request for this :term:`replica set`. - + .. stats:: createdByType :stats:`createdByType` :term:`document` reports the number of each From ec43c21c15bea60188e796ca16ce2ff0517a0dad Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Thu, 26 Jul 2012 12:45:46 -0400 Subject: [PATCH 21/23] minor: corrections to connPoolStats docs --- source/includes/note-conn-pool-stats.rst | 2 +- source/reference/commands.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/includes/note-conn-pool-stats.rst b/source/includes/note-conn-pool-stats.rst index 932ad566b83..5dbbd5e19d7 100644 --- a/source/includes/note-conn-pool-stats.rst +++ b/source/includes/note-conn-pool-stats.rst @@ -1,4 +1,4 @@ .. note:: - :dbcommand:`connPoolStats` only return meaningful results for + :dbcommand:`connPoolStats` only returns meaningful results for :program:`mongos` program. diff --git a/source/reference/commands.txt b/source/reference/commands.txt index 994d37bdf85..28d6e856591 100644 --- a/source/reference/commands.txt +++ b/source/reference/commands.txt @@ -1739,7 +1739,7 @@ Diagnostics The value of the argument (i.e. ``1`` ) does not affect the output of the command. See :doc:`/reference/connection-pool-stats` - for full documentation of all connection pool status. + for full documentation of the :dbcommand:`connPoolStats` output. .. dbcommand:: getCmdLineOpts From 21b1b6cc2d398a2f75ec0d008a45f4fbca60018d Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Thu, 26 Jul 2012 13:58:51 -0400 Subject: [PATCH 22/23] DOCS-158 clarification about use case and applicability --- source/includes/note-conn-pool-stats.rst | 3 ++- source/reference/connection-pool-stats.txt | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/source/includes/note-conn-pool-stats.rst b/source/includes/note-conn-pool-stats.rst index 5dbbd5e19d7..19a8a7f5e2f 100644 --- a/source/includes/note-conn-pool-stats.rst +++ b/source/includes/note-conn-pool-stats.rst @@ -1,4 +1,5 @@ .. note:: :dbcommand:`connPoolStats` only returns meaningful results for - :program:`mongos` program. + :program:`mongos` instances and for :program:`mongod` instances + in shard clusters. diff --git a/source/reference/connection-pool-stats.txt b/source/reference/connection-pool-stats.txt index 4e9e3657577..6daef0ea82f 100644 --- a/source/reference/connection-pool-stats.txt +++ b/source/reference/connection-pool-stats.txt @@ -9,12 +9,15 @@ Synopsis :program:`mongos` instances maintain a pool of connections for interacting with constituent members of the :term:`shard clusters -`. The :dbcommand:`connPoolStats` command returns -statistics regarding these connections between the :program:`mongos` -and :program:`mongod` instances. +`. Additionally, :program:`mongod` instances maintain +connection with other shards in the cluster for migrations. The +:dbcommand:`connPoolStats` command returns statistics regarding these +connections between the :program:`mongos` and :program:`mongod` +instances or between the :program:`mongod` instances in a shard +cluster. .. include:: /includes/note-conn-pool-stats - +.. Output ------ From ff15ad1997b5f1904f8a52bdd19d0520ea225b85 Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Thu, 26 Jul 2012 15:42:52 -0400 Subject: [PATCH 23/23] DOCS-158 changes in response to technical review --- source/reference/connection-pool-stats.txt | 71 +++++++++++++--------- 1 file changed, 41 insertions(+), 30 deletions(-) diff --git a/source/reference/connection-pool-stats.txt b/source/reference/connection-pool-stats.txt index 6daef0ea82f..fba7a6398f3 100644 --- a/source/reference/connection-pool-stats.txt +++ b/source/reference/connection-pool-stats.txt @@ -24,19 +24,19 @@ Output .. stats:: hosts The sub-documents of the :stats:`hosts` :term:`document` report connections - between the :program:`mongos` instance and every component + between the :program:`mongos` or :program:`mongod` instance and each component :program:`mongod` of the :term:`shard cluster`. .. stats:: hosts.[host].available :stats:`hosts.[host].available` reports the total number of - connections created by the :program:`mongos`, and used to - connect to members of the :term:`shard cluster`. + connections that the :program:`mongos` or :program:`mongod` + could use to connect to this :program:`mongod`. .. stats:: hosts.[host].created :stats:`hosts.[host].created` reports the number of connections - that this :program:`mongos` has ever created for this host. + that this :program:`mongos` or :program:`mongod` has ever created for this host. .. stats:: replicaSets @@ -50,53 +50,63 @@ Output .. stats:: replicaSets.[shard].host - The :stats:`replicaSets.[shard].host` :term:`document` reports - on each host within the :term:`shard` in the :term:`replica - set`. + The :stats:`replicaSets.[shard].host` field holds an array of + :term:`document` that reports on each host within the + :term:`shard` in the :term:`replica set`. These values derive from the :doc:`replica set status ` values. - .. stats:: replicaSets.[shard].[host].addr + .. stats:: replicaSets.[shard].host[n].addr - :stats:`replicaSets.[shard].[host].addr` reports the address + :stats:`replicaSets.[shard].host[n].addr` reports the address for the host in the :term:`shard cluster` in the format of "``[hostname]:[port]``". - .. stats:: replicaSets.[shard].[host].ok + .. stats:: replicaSets.[shard].host[n].ok - :stats:`replicaSets.[shard].[host].ok` reports ``false`` + :stats:`replicaSets.[shard].host[n].ok` reports ``false`` when: - - the :program:`mongos` cannot connect to instance. + - the :program:`mongos` or :program:`mongod` cannot connect + to instance. - - the :program:`mongos` received a connection exception or error. + - the :program:`mongos` or :program:`mongod` received a + connection exception or error. This field is for internal use. - .. stats:: replicaSets.[shard].[host].ismaster + .. stats:: replicaSets.[shard].host[n].ismaster - :stats:`replicaSets.[shard].[host].ismaster` reports ``true`` + :stats:`replicaSets.[shard].host[n].ismaster` reports ``true`` if this :stats:`replicaSets.[shard].host` is the :term:`primary` member of the :term:`replica set`. - .. stats:: replicaSets.[shard].[host].hidden + .. stats:: replicaSets.[shard].host[n].hidden - :stats:`replicaSets.[shard].[host].hidden` reports ``true`` + :stats:`replicaSets.[shard].host[n].hidden` reports ``true`` if this :stats:`replicaSets.[shard].host` is a :term:`hidden member` of the :term:`replica set`. - .. stats:: replicaSets.[shard].[host].secondary + .. stats:: replicaSets.[shard].host[n].secondary - :stats:`replicaSets.[shard].[host].secondary` reports + :stats:`replicaSets.[shard].host[n].secondary` reports ``true`` if this :stats:`replicaSets.[shard].host` is a :term:`secondary` member of the :term:`replica set`. - .. stats:: replicaSets.[shard].[host].pingTimeMillis + .. stats:: replicaSets.[shard].host[n].pingTimeMillis - :stats:`replicaSets.[shard].[host].pingTimeMillis` reports - the ping time in milliseconds from the :program:`mongos` to - this :stats:`replicaSets.[shard].host`. + :stats:`replicaSets.[shard].host[n].pingTimeMillis` reports + the ping time in milliseconds from the :program:`mongos` or + :program:`mongod` to this :stats:`replicaSets.[shard].host`. + + .. stats:: replicaSets.[shard].host[n].tags + + .. versionadded:: 2.2 + + :stats:`replicaSets.[shard].host[n].tags` reports the + :data:`members[n].tags`, if this member of the set has tags + configured. .. stats:: replicaSets.[shard].master @@ -115,7 +125,7 @@ Output .. stats:: createdByType :stats:`createdByType` :term:`document` reports the number of each - type of connection that :program:`mongos` has created in all + type of connection that :program:`mongos` or :program:`mongod` has created in all connection pools. :program:`mongos` connect to :program:`mongod` instances using one @@ -141,25 +151,26 @@ Output .. stats:: totalAvailable :stats:`totalAvailable` reports the running total of connections - from the :program:`mongos` to all :program:`mongod` instances in - the :term:`shard cluster` + from the :program:`mongos` or :program:`mongod` to all :program:`mongod` instances in + the :term:`shard cluster` available for use. This value does not + reflect those connections that .. stats:: totalCreated :stats:`totalCreated` reports the total number of connections ever - created from the :program:`mongos` to all :program:`mongod` + created from the :program:`mongos` or :program:`mongod` to all :program:`mongod` instances in the :term:`shard cluster`. .. stats:: numDBClientConnection :stats:`numDBClientConnection` reports the total number of - connections from the :program:`mongos` to all of the :program:`mongod` + connections from the :program:`mongos` or :program:`mongod` to all of the :program:`mongod` instances in the :term:`shard cluster`. .. stats:: numAScopedConnection :stats:`numAScopedConnection` reports the number of exception safe - connections created from :program:`mongos` to all :program:`mongod` - in the :term:`shard cluster`. The :program:`mongos` releases these + connections created from :program:`mongos` or :program:`mongod` to all :program:`mongod` + in the :term:`shard cluster`. The :program:`mongos` or :program:`mongod` releases these connections after receiving a socket exception from the :program:`mongod`.