shardConnPoolStats

On this page本页内容

Definition定义

shardConnPoolStats

Removed in MongoDB 5.0.在MongoDB 5.0中删除。 Use connPoolStats instead.请改用connPoolStats

Returns information on the pooled and cached connections in the sharded connection pool. 返回分片连接池中的池连接和缓存连接的信息。The command also returns information on the per-thread connection cache in the connection pool.该命令还返回连接池中每线程连接缓存的信息。

The shardConnPoolStats command uses the following syntax:shardConnPoolStats命令使用以下语法:

{ shardConnPoolStats: 1 }

The sharded connection pool is specific to connections between members in a sharded cluster. 分片连接池特定于分片集群中成员之间的连接。The mongos instances in a cluster use the connection pool to execute client reads and writes. 集群中的mongos实例使用连接池执行客户端读写。The mongod instances in a cluster use the pool when issuing mapReduce to query temporary collections on other shards.集群中的mongod实例在发出mapReduce查询其他分片上的临时集合时使用该池。

When the cluster requires a connection, MongoDB pulls a connection from the sharded connection pool into the per-thread connection cache. 当集群需要连接时,MongoDB将一个连接从分片连接池拉到每线程连接缓存中。MongoDB returns the connection to the connection pool after every operation.MongoDB在每次操作后都会将连接返回到连接池。

Output输出

shardConnPoolStats.hosts

Displays connection status for each config server, replica set, and standalone instance in the cluster.显示群集中每个配置服务器副本集独立实例的连接状态。

shardConnPoolStats.hosts.<host>.available

The number of connections available for this host to connect to the mongos.此主机可连接到mongo的连接数。

shardConnPoolStats.hosts.<host>.created

The number of connections the host has ever created to connect to the mongos.主机为连接到mongos而创建的连接数。

shardConnPoolStats.replicaSets

Displays information specific to replica sets.显示特定于副本集的信息。

shardConnPoolStats.replicaSets.<name>.host

Holds an array of documents that report on each replica set member. 保存报告每个副本集成员的文档数组。These values derive from the replica set status values.这些值源自副本集状态值。

shardConnPoolStats.replicaSets.<name>.host[n].addr

The host address in the format [hostname]:[port].主机地址,格式为[hostname]:[port]

shardConnPoolStats.replicaSets.<name>.host[n].ok

This field is for internal use. 此字段供内部使用。Reports false when the mongos either cannot connect to instance or received a connection exception or error.mongos无法连接到实例或收到连接异常或错误时,报告false

shardConnPoolStats.replicaSets.<name>.host[n].ismaster

The host is the replica set's primary if this is true.如果这是true,则主机是副本集的primary

shardConnPoolStats.replicaSets.<name>.host[n].hidden

The host is a hidden member of the replica set if this is true.如果这是true,则主机是副本集的隐藏成员

shardConnPoolStats.replicaSets.<name>.host[n].secondary

The host is a hidden member of the replica set if this is true.如果这是true,则主机是副本集的隐藏成员

The host is a secondary member of the replica set if this is true.如果这是true,则主机是副本集的secondary成员。

shardConnPoolStats.replicaSets.<name>.host[n].pingTimeMillis

The latency, in milliseconds, from the mongos to this member.mongos到该成员的延迟(毫秒)。

shardConnPoolStats.replicaSets.<name>.host[n].tags

A tags document contains user-defined tag field and value pairs for the replica set member.tags文档包含复制集成员的用户定义标记字段和值对。

{ "<tag1>": "<string1>", "<tag2>": "<string2>",... }

For more information, see Configure Replica Set Tag Sets.有关详细信息,请参阅配置副本集标记集

Tip提示
See also: 参阅:
shardConnPoolStats.createdByType

The number connections in the cluster's connection pool.群集连接池中的连接数。

shardConnPoolStats.createdByType.master

The number of connections to a shard.到分片的连接数。

shardConnPoolStats.createdByType.set

The number of connections to a replica set.到副本集的连接数。

shardConnPoolStats.createdByType.sync

The number of connections to the config database.配置数据库的连接数。

shardConnPoolStats.totalAvailable

The number of connections available from the mongos to the config servers, replica sets, and standalone mongod instances in the cluster.mongos到集群中的配置服务器、副本集和独立mongod实例的可用连接数。

shardConnPoolStats.totalCreated

The number of connections the mongos has ever created to other members of the cluster.mongos曾经创建的与集群其他成员的连接数。

shardConnPoolStats.threads

Displays information on the per-thread connection cache.显示每线程连接缓存的信息。

shardConnPoolStats.threads.hosts

Displays each incoming client connection. 显示每个传入的客户端连接。For a mongos, this array field displays one document per incoming client thread. 对于mongos,此数组字段为每个传入的客户端线程显示一个文档。For a mongod, the array displays one entry per incoming sharded mapReduce client thread.对于mongod,数组为每个传入的分片mapReduce客户端线程显示一个条目。

shardConnPoolStats.threads.hosts.host

The host using the connection. 使用连接的主机。The host can be a config server, replica set, or standalone instance.主机可以是配置服务器副本集独立实例

shardConnPoolStats.threads.hosts.created

The number of times the host pulled a connection from the pool.主机从池中拉出连接的次数。

shardConnPoolStats.threads.hosts.avail

The thread's availability.线程的可用性。

shardConnPoolStats.threads.seenNS

The namespaces used on this connection thus far.到目前为止,此连接上使用的名称空间。

←  serverStatustop →