diff --git a/bin/htaccess.yaml b/bin/htaccess.yaml index d9a02e8f353..c6814b7744e 100644 --- a/bin/htaccess.yaml +++ b/bin/htaccess.yaml @@ -1438,6 +1438,14 @@ redirect-path: '/reference/commands' url-base: '/reference/command' type: 'redirect' code: 301 +outputs: + - 'after-v2.2' + - 'manual' +--- +redirect-path: '/reference/connection-pool-stats' +url-base: '/reference/command/connPoolStats' +type: 'redirect' +code: 301 outputs: - 'after-v2.2' - 'manual' diff --git a/source/meta/reference.txt b/source/meta/reference.txt index c7f71fd4962..dcc0506b71a 100644 --- a/source/meta/reference.txt +++ b/source/meta/reference.txt @@ -71,7 +71,7 @@ Status, Monitoring, and Reporting Output /reference/command/serverStatus /reference/database-statistics /reference/collection-statistics - /reference/connection-pool-stats + /reference/command/connPoolStats /reference/replica-status /reference/exit-codes /reference/current-op diff --git a/source/reference.txt b/source/reference.txt index 37d2b9eb486..c35f17403e8 100644 --- a/source/reference.txt +++ b/source/reference.txt @@ -38,7 +38,7 @@ Status and Reporting reference/database-statistics reference/collection-statistics reference/collection-validation - reference/connection-pool-stats + reference/command/connPoolStats reference/current-op reference/database-profiler reference/explain diff --git a/source/reference/command/connPoolStats.txt b/source/reference/command/connPoolStats.txt index ec48265bceb..15648ffd42d 100644 --- a/source/reference/command/connPoolStats.txt +++ b/source/reference/command/connPoolStats.txt @@ -4,6 +4,9 @@ connPoolStats .. default-domain:: mongodb +Definition +---------- + .. dbcommand:: connPoolStats .. include:: /includes/note-conn-pool-stats.rst @@ -19,5 +22,161 @@ connPoolStats { connPoolStats: 1 } 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 the :dbcommand:`connPoolStats` output. + output of the command. + + .. include:: /includes/note-conn-pool-stats.rst + +Output +------ + +.. data:: connPoolStats.hosts + + The sub-documents of the :data:`~connPoolStats.hosts` :term:`document` report connections + between the :program:`mongos` or :program:`mongod` instance and each component + :program:`mongod` of the :term:`sharded cluster`. + + .. data:: connPoolStats.hosts.[host].available + + :data:`~connPoolStats.hosts.[host].available` reports the total number of + connections that the :program:`mongos` or :program:`mongod` + could use to connect to this :program:`mongod`. + + .. data:: connPoolStats.hosts.[host].created + + :data:`~connPoolStats.hosts.[host].created` reports the number of connections + that this :program:`mongos` or :program:`mongod` has ever created for this host. + +.. data:: connPoolStats.replicaSets + + :data:`~connPoolStats.replicaSets` is a :term:`document` that contains + :term:`replica set` information for the :term:`sharded cluster`. + + .. data:: connPoolStats.replicaSets.shard + + The :data:`~connPoolStats.replicaSets.shard` :term:`document` reports + on each :term:`shard` within the :term:`sharded cluster` + + .. data:: connPoolStats.replicaSets.[shard].host + + The :data:`~connPoolStats.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. + + .. data:: connPoolStats.replicaSets.[shard].host[n].addr + + :data:`~connPoolStats.replicaSets.[shard].host[n].addr` reports the address + for the host in the :term:`sharded cluster` in the format of + "``[hostname]:[port]``". + + .. data:: connPoolStats.replicaSets.[shard].host[n].ok + + :data:`~connPoolStats.replicaSets.[shard].host[n].ok` reports ``false`` + when: + + - the :program:`mongos` or :program:`mongod` cannot connect + to instance. + + - the :program:`mongos` or :program:`mongod` received a + connection exception or error. + + This field is for internal use. + + .. data:: connPoolStats.replicaSets.[shard].host[n].ismaster + + :data:`~connPoolStats.replicaSets.[shard].host[n].ismaster` reports ``true`` + if this :data:`~connPoolStats.replicaSets.[shard].host` is the + :term:`primary` member of the :term:`replica set`. + + .. data:: connPoolStats.replicaSets.[shard].host[n].hidden + + :data:`~connPoolStats.replicaSets.[shard].host[n].hidden` reports ``true`` + if this :data:`~connPoolStats.replicaSets.[shard].host` is a :term:`hidden + member` of the :term:`replica set`. + + .. data:: connPoolStats.replicaSets.[shard].host[n].secondary + + :data:`~connPoolStats.replicaSets.[shard].host[n].secondary` reports + ``true`` if this :data:`~connPoolStats.replicaSets.[shard].host` is a + :term:`secondary` member of the :term:`replica set`. + + .. data:: connPoolStats.replicaSets.[shard].host[n].pingTimeMillis + + :data:`~connPoolStats.replicaSets.[shard].host[n].pingTimeMillis` reports + the ping time in milliseconds from the :program:`mongos` or + :program:`mongod` to this :data:`~connPoolStats.replicaSets.[shard].host`. + + .. data:: connPoolStats.replicaSets.[shard].host[n].tags + + .. versionadded:: 2.2 + + :data:`~connPoolStats.replicaSets.[shard].host[n].tags` reports the + :data:`~local.system.replset.members[n].tags`, if this member of the set has tags + configured. + + .. data:: connPoolStats.replicaSets.[shard].master + + :data:`~connPoolStats.replicaSets.[shard].master` reports the ordinal identifier + of the host in the :data:`~connPoolStats.replicaSets.[shard].host` array that is + the :term:`primary` of the :term:`replica set`. + + .. data:: connPoolStats.replicaSets.[shard].nextSlave + + .. deprecated:: 2.2 + + :data:`~connPoolStats.replicaSets.[shard].nextSlave` reports the + :term:`secondary` member that the :program:`mongos` will use to + service the next request for this :term:`replica set`. + +.. data:: connPoolStats.createdByType + + :data:`~connPoolStats.createdByType` :term:`document` reports the number of each + type of connection that :program:`mongos` or :program:`mongod` has created in all + connection pools. + + :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. + + .. data:: connPoolStats.createdByType.master + + :data:`~connPoolStats.createdByType.master` reports the total number of + connections to the :term:`primary` member in each :term:`cluster`. + + .. data:: connPoolStats.createdByType.set + + :data:`~connPoolStats.createdByType.set` reports the total number of + connections to a :term:`replica set` member. + + .. data:: connPoolStats.createdByType.sync + + :data:`~connPoolStats.createdByType.sync` reports the total number of + :term:`config database` connections. + +.. data:: connPoolStats.totalAvailable + + :data:`~connPoolStats.totalAvailable` reports the running total of connections + from the :program:`mongos` or :program:`mongod` to all :program:`mongod` instances in + the :term:`sharded cluster` available for use. + +.. data:: connPoolStats.totalCreated + + :data:`~connPoolStats.totalCreated` reports the total number of connections ever + created from the :program:`mongos` or :program:`mongod` to all :program:`mongod` + instances in the :term:`sharded cluster`. + +.. data:: connPoolStats.numDBClientConnection + + :data:`~connPoolStats.numDBClientConnection` reports the total number of + connections from the :program:`mongos` or :program:`mongod` to all of the :program:`mongod` + instances in the :term:`sharded cluster`. + +.. data:: connPoolStats.numAScopedConnection + + :data:`~connPoolStats.numAScopedConnection` reports the number of exception safe + connections created from :program:`mongos` or :program:`mongod` to all :program:`mongod` + in the :term:`sharded cluster`. The :program:`mongos` or :program:`mongod` releases these + connections after receiving a socket exception from the + :program:`mongod`. diff --git a/source/reference/connection-pool-stats.txt b/source/reference/connection-pool-stats.txt deleted file mode 100644 index a1e391fdd3d..00000000000 --- a/source/reference/connection-pool-stats.txt +++ /dev/null @@ -1,174 +0,0 @@ -==================================== -Connection Pool Statistics Reference -==================================== - -.. default-domain:: mongodb - -Synopsis --------- - -:program:`mongos` instances maintain a pool of connections for -interacting with constituent members of the :term:`sharded cluster`. -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.rst - -Output ------- - -.. data:: connPoolStats.hosts - - The sub-documents of the :data:`~connPoolStats.hosts` :term:`document` report connections - between the :program:`mongos` or :program:`mongod` instance and each component - :program:`mongod` of the :term:`sharded cluster`. - - .. data:: connPoolStats.hosts.[host].available - - :data:`~connPoolStats.hosts.[host].available` reports the total number of - connections that the :program:`mongos` or :program:`mongod` - could use to connect to this :program:`mongod`. - - .. data:: connPoolStats.hosts.[host].created - - :data:`~connPoolStats.hosts.[host].created` reports the number of connections - that this :program:`mongos` or :program:`mongod` has ever created for this host. - -.. data:: connPoolStats.replicaSets - - :data:`~connPoolStats.replicaSets` is a :term:`document` that contains - :term:`replica set` information for the :term:`sharded cluster`. - - .. data:: connPoolStats.replicaSets.shard - - The :data:`~connPoolStats.replicaSets.shard` :term:`document` reports - on each :term:`shard` within the :term:`sharded cluster` - - .. data:: connPoolStats.replicaSets.[shard].host - - The :data:`~connPoolStats.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. - - .. data:: connPoolStats.replicaSets.[shard].host[n].addr - - :data:`~connPoolStats.replicaSets.[shard].host[n].addr` reports the address - for the host in the :term:`sharded cluster` in the format of - "``[hostname]:[port]``". - - .. data:: connPoolStats.replicaSets.[shard].host[n].ok - - :data:`~connPoolStats.replicaSets.[shard].host[n].ok` reports ``false`` - when: - - - the :program:`mongos` or :program:`mongod` cannot connect - to instance. - - - the :program:`mongos` or :program:`mongod` received a - connection exception or error. - - This field is for internal use. - - .. data:: connPoolStats.replicaSets.[shard].host[n].ismaster - - :data:`~connPoolStats.replicaSets.[shard].host[n].ismaster` reports ``true`` - if this :data:`~connPoolStats.replicaSets.[shard].host` is the - :term:`primary` member of the :term:`replica set`. - - .. data:: connPoolStats.replicaSets.[shard].host[n].hidden - - :data:`~connPoolStats.replicaSets.[shard].host[n].hidden` reports ``true`` - if this :data:`~connPoolStats.replicaSets.[shard].host` is a :term:`hidden - member` of the :term:`replica set`. - - .. data:: connPoolStats.replicaSets.[shard].host[n].secondary - - :data:`~connPoolStats.replicaSets.[shard].host[n].secondary` reports - ``true`` if this :data:`~connPoolStats.replicaSets.[shard].host` is a - :term:`secondary` member of the :term:`replica set`. - - .. data:: connPoolStats.replicaSets.[shard].host[n].pingTimeMillis - - :data:`~connPoolStats.replicaSets.[shard].host[n].pingTimeMillis` reports - the ping time in milliseconds from the :program:`mongos` or - :program:`mongod` to this :data:`~connPoolStats.replicaSets.[shard].host`. - - .. data:: connPoolStats.replicaSets.[shard].host[n].tags - - .. versionadded:: 2.2 - - :data:`~connPoolStats.replicaSets.[shard].host[n].tags` reports the - :data:`~local.system.replset.members[n].tags`, if this member of the set has tags - configured. - - .. data:: connPoolStats.replicaSets.[shard].master - - :data:`~connPoolStats.replicaSets.[shard].master` reports the ordinal identifier - of the host in the :data:`~connPoolStats.replicaSets.[shard].host` array that is - the :term:`primary` of the :term:`replica set`. - - .. data:: connPoolStats.replicaSets.[shard].nextSlave - - .. deprecated:: 2.2 - - :data:`~connPoolStats.replicaSets.[shard].nextSlave` reports the - :term:`secondary` member that the :program:`mongos` will use to - service the next request for this :term:`replica set`. - -.. data:: connPoolStats.createdByType - - :data:`~connPoolStats.createdByType` :term:`document` reports the number of each - type of connection that :program:`mongos` or :program:`mongod` has created in all - connection pools. - - :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. - - .. data:: connPoolStats.createdByType.master - - :data:`~connPoolStats.createdByType.master` reports the total number of - connections to the :term:`primary` member in each :term:`cluster`. - - .. data:: connPoolStats.createdByType.set - - :data:`~connPoolStats.createdByType.set` reports the total number of - connections to a :term:`replica set` member. - - .. data:: connPoolStats.createdByType.sync - - :data:`~connPoolStats.createdByType.sync` reports the total number of - :term:`config database` connections. - -.. data:: connPoolStats.totalAvailable - - :data:`~connPoolStats.totalAvailable` reports the running total of connections - from the :program:`mongos` or :program:`mongod` to all :program:`mongod` instances in - the :term:`sharded cluster` available for use. - -.. data:: connPoolStats.totalCreated - - :data:`~connPoolStats.totalCreated` reports the total number of connections ever - created from the :program:`mongos` or :program:`mongod` to all :program:`mongod` - instances in the :term:`sharded cluster`. - -.. data:: connPoolStats.numDBClientConnection - - :data:`~connPoolStats.numDBClientConnection` reports the total number of - connections from the :program:`mongos` or :program:`mongod` to all of the :program:`mongod` - instances in the :term:`sharded cluster`. - -.. data:: connPoolStats.numAScopedConnection - - :data:`~connPoolStats.numAScopedConnection` reports the number of exception safe - connections created from :program:`mongos` or :program:`mongod` to all :program:`mongod` - in the :term:`sharded cluster`. The :program:`mongos` or :program:`mongod` releases these - connections after receiving a socket exception from the - :program:`mongod`.