Docs 菜单
Docs 主页
/
MongoDB Manual
/ / /

shardConnPoolStats

在此页面上

  • 定义
  • 兼容性
  • 输出
shardConnPoolStats

已在 MongoDB 5中删除。 0 。请改用 connPoolStats

返回有关分片连接池中池化和缓存连接的信息。 该命令还会返回连接池中每线程连接缓存的信息。

shardConnPoolStats命令使用以下语法:

{ shardConnPoolStats: 1 }

分片连接池特定于分片集群中成员之间的连接。 集群中的mongos实例使用连接池来执行客户端读取和写入。 mongod发出mapReduce 来查询其他分片上的临时collection时,集群中的 实例会使用该池。

当集群需要连接时,MongoDB 会将连接从分片连接池拉取到每线程连接缓存中。 MongoDB 在每次操作后将连接返回到连接池。

此命令可用于以下环境中托管的部署:

  • MongoDB Atlas :用于在云中部署 MongoDB 的完全托管服务

注意

无服务器实例不支持此命令。 有关更多信息,请参阅不支持的命令。

shardConnPoolStats.hosts

显示集群中每个配置服务器副本集独立运行的实例的连接状态。

shardConnPoolStats.hosts.<host>.available

该主机可用于连接到mongos的连接数。

shardConnPoolStats.hosts.<host>.created

主机为连接到mongos而创建的连接数。

shardConnPoolStats.replicaSets

显示特定于副本集的信息。

shardConnPoolStats.replicaSets.<name>.host

保存报告每个副本集成员的文档数组。 这些值派生自副本集状态值。

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

格式为[hostname]:[port]的主机地址。

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

此字段供内部使用。 当mongos无法连接到实例或收到连接异常或错误时,报告false

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

如果此值为true ,则该主机是副本集的节点。

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

如果此值为true ,则主机是副本集的隐藏节点

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

如果此值为true ,则主机是副本集的隐藏节点

如果此值为true ,则主机为副本集的从节点。

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

mongos到该成员的延迟(以毫秒为单位)。

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

一份 tags 文档包含用户定义的副本集节点标签字段和值对。

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

有关详细信息,请参阅配置自管理副本集标签集。

提示

另请参阅:

shardConnPoolStats.createdByType

集群连接池中的连接数。

shardConnPoolStats.createdByType.master

与分片的连接数。

shardConnPoolStats.createdByType.set

副本集的连接数。

shardConnPoolStats.createdByType.sync

与配置数据库的连接数。

shardConnPoolStats.totalAvailable

mongos到集群中的配置服务器、副本集和独立mongod实例的可用连接数。

shardConnPoolStats.totalCreated

mongos曾经创建的与集群其他节点的连接数。

shardConnPoolStats.threads

显示有关每线程连接缓存的信息。

shardConnPoolStats.threads.hosts

显示每个传入的客户端连接。 对于mongos ,此数组字段为每个传入客户端线程显示一个文档。 对于mongod ,该数组为每个传入的分片mapReduce客户端线程显示一个条目。

shardConnPoolStats.threads.hosts.host

使用该连接的主机。 主机可以是配置服务器副本集独立运行的实例。

shardConnPoolStats.threads.hosts.created

主机从池中拉取连接的次数。

shardConnPoolStats.threads.hosts.avail

线程的可用性。

shardConnPoolStats.threads.seenNS

到目前为止此连接上使用的命名空间。

后退

serverStatus

来年

top

在此页面上