On this page本页内容
serverStatus
The serverStatus
command returns a document that provides an overview of the database's state. serverStatus
命令返回提供数据库状态概述的文档。Monitoring applications can run this command at a regular interval to collect statistics about the instance.监视应用程序可以定期运行此命令以集合有关实例的统计信息。
The command has the following syntax:该命令具有以下语法:
db.runCommand( { serverStatus: 1 } )
The value (i.e. 该值(即上面的1
above) does not affect the operation of the command. 1
)不会影响命令的操作。The db.serverStatus()
command returns a large amount of data. db.serverStatus()
命令返回大量数据。To return a specific object or field from the output append the object or field name to the command.要从输出中返回特定对象或字段,请将对象或字段名称附加到命令。
For example:例如:
db.runCommand({ serverStatus: 1}).metrics db.runCommand({ serverStatus: 1}).metrics.commands db.runCommand({ serverStatus: 1}).metrics.commands.update
mongosh
provides the db.serverStatus()
wrapper for the serverStatus
command.mongosh
为serverStatus
命令提供db.serverStatus()
包装。
Much of the output of serverStatus
is also displayed dynamically by mongostat
. serverStatus
的大部分输出也由mongostat
动态显示。See the 有关详细信息,请参阅mongostat
command for more information.mongostat
命令。
By default, 默认情况下,serverStatus
excludes in its output:serverStatus
在其输出中排除:
repl
文档中的一些内容。mirroredReads
To include fields that are excluded by default, specify the top-level field and set it to 要包含默认排除的字段,请指定顶级字段并在命令中将其设置为1
in the command. 1
。To exclude fields that are included by default, specify the top-level field and set to 要排除默认包含的字段,请指定顶级字段并在命令中设置为0
in the command.0
。
For example, the following operation suppresses the 例如,以下操作将抑制输出中的repl
, metrics
and locks
information in the output.repl
、metrics
和locks
信息。
db.runCommand( { serverStatus: 1, repl: 0, metrics: 0, locks: 0 } )
The following example includes all repl information in the output:以下示例包括输出中的所有repl信息:
db.runCommand( { serverStatus: 1, repl: 1 } )
The statistics reported by 当serverStatus
are reset when the mongod
server is restarted.mongod
服务器重新启动时,serverStatus
报告的统计信息将被重置。
This command will always return a value, even on a fresh database. 此命令将始终返回一个值,即使是在新数据库上。The related command 相关命令db.serverStatus()
does not always return a value unless a counter has started to increment for a particular metric.db.serverStatus()
并不总是返回值,除非计数器已开始为特定度量递增。
After you run an update query, 运行更新查询后,db.serverStatus()
and db.runCommand({ serverStatus: 1})
both return the same values.db.serverStatus()
和db.runCommand({ serverStatus: 1})
都返回相同的值。
{ "arrayFilters" : NumberLong(0), "failed" : NumberLong(0), "pipeline" : NumberLong(0), "total" : NumberLong(1) }
mirroredReads
By default, the 默认情况下,mirroredReads
information (available starting in version 4.4) is not included in the output. mirroredReads
信息(从4.4版开始提供)不包含在输出中。To return 要返回mirroredReads
information, you must explicitly specify the inclusion:mirroredReads
信息,必须显式指定包含项:
db.runCommand( { serverStatus: 1, mirroredReads: 1 } )
latchAnalysis
By default, the 默认情况下,latchAnalysis
information (available starting in version 4.4) is not included in the output. latchAnalysis
信息(从4.4版开始提供)不包含在输出中。To return 要返回latchAnalysis
information, you must explicitly specify the inclusion:latchAnalysis
信息,必须显式指定包含项:
db.runCommand( { serverStatus: 1, latchAnalysis: 1 } )
The output fields vary depending on the version of MongoDB, underlying operating system platform, the storage engine, and the kind of node, including 输出字段根据MongoDB的版本、底层操作系统平台、存储引擎和节点类型(包括mongos
, mongod
or replica set member.mongos
、mongod
或副本集成员)而有所不同。
For the 有关特定于MongoDB版本的serverStatus
output specific to the version of your MongoDB, refer to the appropriate version of the MongoDB Manual.serverStatus
输出,请参阅MongoDB手册的相应版本。
"host" : <string>, "advisoryHostFQDNs" : <array>, "version" : <string>, "process" : <"mongod"|"mongos">, "pid" : NumberLong(<num>), "uptime" : <num>, "uptimeMillis" : NumberLong(<num>), "uptimeEstimate" : NumberLong(<num>), "localTime" : ISODate(""),
host
The system's hostname. In Unix/Linux systems, this should be the same as the output of the 系统的主机名。在Unix/Linux系统中,这应该与hostname
command.hostname
命令的输出相同。
process
The current MongoDB process. 当前MongoDB进程。Possible values are: 可能的值是:mongos
or mongod
.mongos
或mongod
。
uptimeMillis
The number of milliseconds that the current MongoDB process has been active.当前MongoDB进程处于活动状态的毫秒数。
"asserts" : { "regular" : <num>, "warning" : <num>, "msg" : <num>, "user" : <num>, "rollovers" : <num> },
asserts
A document that reports on the number of assertions raised since the MongoDB process started. 报告自MongoDB进程启动以来引发的断言数量的文档。While assert errors are typically uncommon, if there are non-zero values for the 虽然断言错误通常不常见,但如果asserts
, you should examine the log file for more information. asserts
存在非零值,则应检查日志文件以获取更多信息。In many cases, these errors are trivial, but are worth investigating.在许多情况下,这些错误微不足道,但值得调查。
asserts.regular
The number of regular assertions raised since the MongoDB process started. 自MongoDB进程启动以来引发的常规断言数。Examine the log file for more information about these messages.有关这些消息的详细信息,请检查日志文件。
asserts.warning
Changed in version 4.0.在版本4.0中更改。
Starting in MongoDB 4.0, the field returns zero 从MongoDB 4.0开始,该字段返回0
.0
。
In earlier versions, the field returns the number of warnings raised since the MongoDB process started.在早期版本中,该字段返回自MongoDB进程启动以来引发的警告数。
asserts.msg
The number of message assertions raised since the MongoDB process started. 自MongoDB进程启动以来引发的消息断言数。Examine the log file for more information about these messages.有关这些消息的详细信息,请检查日志文件。
asserts.user
The number of "user asserts" that have occurred since the last time the MongoDB process started. 自上次启动MongoDB进程以来发生的“用户断言”数。These are errors that user may generate, such as out of disk space or duplicate key. 这些是用户可能产生的错误,例如磁盘空间不足或密钥重复。You can prevent these assertions by fixing a problem with your application or deployment. Examine the MongoDB log for more information.您可以通过修复应用程序或部署的问题来防止这些断言。有关详细信息,请查看MongoDB日志。
asserts.rollovers
The number of times that the rollover counters have rolled over since the last time the MongoDB process started. 自上次启动MongoDB进程以来,滚动计数器滚动的次数。The counters will rollover to zero after 2 30 assertions. 在230次断言之后,计数器将滚动到零。Use this value to provide context to the other values in the 使用此值为asserts
data structure.asserts
数据结构中的其他值提供上下文。
"bucketCatalog" : { "numBuckets" : <num>, "numOpenBuckets" : <num>, "numIdleBuckets" : <num>, "memoryUsage" : <num> }
New in version 5.0.在版本5.0中新增。
A document that reports metrics related to the internal storage of time series collections.报告与时间序列集合的内部存储相关的度量的文档。
The bucketCatalog
returns the following metrics:bucketCatalog
返回以下指标:
Metric | |
---|---|
numBuckets | |
numOpenBuckets | |
numIdleBuckets | |
memoryUsage |
New in version 5.0.在版本5.0中新增。
"connections" : { "current" : <num>, "available" : <num>, "totalCreated" : <num>, "active" : <num>, "threaded" : <num>, "exhaustIsMaster" : <num>, "exhaustHello" : <num>, "awaitingTopologyChanges" : <num>, "loadBalanced" : <num> },
connections
A document that reports on the status of the connections. 报告连接状态的文档。Use these values to assess the current load and capacity requirements of the server.使用这些值评估服务器的当前负载和容量需求。
connections.current
The number of incoming connections from clients to the database server. 从客户端到数据库服务器的传入连接数。This number includes the current shell session. 此数字包括当前shell会话。Consider the value of 考虑connections.available
to add more context to this datum.connections.available
的值向此datum添加更多上下文。
The value will include all incoming connections including any shell connections or connections from other servers, such as replica set members or 该值将包括所有传入连接,包括任何shell连接或来自其他服务器的连接,例如副本集成员或mongos
instances.mongos
实例。
connections.available
The number of unused incoming connections available. 可用的未使用传入连接数。Consider this value in combination with the value of 将此值与connections.current
to understand the connection load on the database, and the UNIX ulimit
Settings document for more information about system thresholds on available connections.connections.current
的值结合起来考虑,以了解数据库上的连接负载,有关可用连接的系统阈值的更多信息,请参阅UNIX ulimit
设置文档。
connections.totalCreated
Count of all incoming connections created to the server. 创建到服务器的所有传入连接的计数。This number includes connections that have since closed.此数字包括自关闭以来的连接。
connections.active
The number of active client connections to the server. 与服务器的活动客户端连接数。Active client connections refers to client connections that currently have operations in progress.活动客户端连接是指当前正在进行操作的客户端连接。
New in version 4.0.7.在版本4.0.7中新增。
connections.threaded
The number of incoming connections from clients that are assigned to threads that service client requests.来自分配给服务客户端请求的线程的客户端的传入连接数。
New in version 5.0.在版本5.0中新增。
connections.exhaustIsMaster
The number of connections whose last request was an 上一个请求是带有exhaustAllowed的isMaster
request with exhaustAllowed.isMaster
请求的连接数。
New in version 4.4.在版本4.4中新增。
connections.exhaustHello
The number of connections whose last request was a 最后一个请求是带有exhaustAllowed的hello请求的连接数。hello
request with exhaustAllowed.
New in version 5.0.在版本5.0中新增。 (and 4.4.2)
Available starting in 4.4从4.4开始提供
The defaultRWConcern
section provides information on the local copy of the global default read or write concern settings. defaultRWConcern
部分提供有关全局默认读或写问题设置的本地副本的信息。The data may be stale or out of date. 数据可能已过时或过期。See 有关更多信息,请参阅getDefaultRWConcern
for more information.getDefaultRWConcern
。
"defaultRWConcern" : { "defaultReadConcern" : { "level" : <string> }, "defaultWriteConcern" : { "w" : <string> | <int>, "wtimeout" : <int>, "j" : <bool> }, "defaultWriteConcernSource": <string>, "defaultReadConcernSource": <string>, "updateOpTime" : Timestamp, "updateWallClockTime" : Date, "localUpdateWallClockTime" : Date }
defaultRWConcern
The last known global default read or write concern settings.最后一个已知的全局默认读取或写入问题设置。
New in version 4.4.在版本4.4中新增。
defaultRWConcern.defaultReadConcern
The last known global default read concern setting.最后一个已知的全局默认读取问题设置。
If 如果serverStatus
does not return this field, the global default read concern has either not been set or has not yet propagated to the instance.serverStatus
未返回此字段,则表示全局默认读取问题尚未设置或尚未传播到实例。
New in version 4.4.在版本4.4中新增。
defaultRWConcern.defaultReadConcern.level
The last known global default read concern level setting.最后一个已知的全局默认读取问题级别设置。
If 如果serverStatus
does not return this field, the global default for this setting has either not been set or has not yet propagated to the instance.serverStatus
未返回此字段,则该设置的全局默认值尚未设置或尚未传播到实例。
New in version 4.4.在版本4.4中新增。
defaultRWConcern.defaultWriteConcern
The last known global default write concern setting.最后一个已知的全局默认写入关注设置。
If 如果serverStatus
does not return this field, the global default write concern has either not been set or has not yet propagated to the instance.serverStatus
未返回此字段,则表示全局默认写入问题尚未设置或尚未传播到实例。
New in version 4.4.在版本4.4中新增。
defaultRWConcern.defaultWriteConcern.w
The last known global default w setting.最后一个已知的全局默认w
设置。
If 如果serverStatus
does not return this field, the global default for this setting has either not been set or has not yet propagated to the instance.serverStatus
未返回此字段,则该设置的全局默认值尚未设置或尚未传播到实例。
New in version 4.4.在版本4.4中新增。
defaultRWConcern.defaultWriteConcern.wtimeout
The last known global default wtimeout setting.最后一个已知的全局默认wtimeout
设置。
If 如果serverStatus
does not return this field, the global default for this setting has either not been set or has not yet propagated to the instance.serverStatus
未返回此字段,则该设置的全局默认值尚未设置或尚未传播到实例。
New in version 4.4.在版本4.4中新增。
defaultRWConcern.defaultWriteConcernSource
The source of the default write concern. 默认写入关注的来源。By default, the value is 默认情况下,该值为"implicit"
. "implicit"
。Once you set the default write concern with 使用setDefaultRWConcern
, the value becomes "global"
.setDefaultRWConcern
设置默认写入关注点后,该值将变为"global"
。
New in version 5.0.在版本5.0中新增。
defaultRWConcern.defaultReadConcernSource
The source of the default read concern. 默认读取关注的来源。By default, the value is 默认情况下,该值为"implicit"
. "implicit"
。Once you set the default read concern with 使用setDefaultRWConcern
, the value becomes "global"
.setDefaultRWConcern
设置默认读取关注点后,该值将变为"global"
。
New in version 5.0.在版本5.0中新增。
defaultRWConcern.updateOpTime
The timestamp when the instance last updated its copy of any global read or write concern settings. 实例上次更新任何全局读或写问题设置的副本时的时间戳。If the 如果缺少defaultRWConcern.defaultReadConcern
and defaultRWConcern.defaultWriteConcern
fields are absent, this field indicates the timestamp when the defaults were last unset.defaultRWConcern.defaultReadConcern
和defaultRWConcern.defaultWriteConcern
字段,则此字段表示上次未设置默认值时的时间戳。
New in version 4.4.在版本4.4中新增。
defaultRWConcern.updateWallClockTime
The wall clock time when the instance last updated its copy of any global read or write concern settings. 实例上次更新任何全局读或写问题设置的副本时的时钟时间。If the 如果缺少defaultRWConcern.defaultReadConcern
and defaultRWConcern.defaultWriteConcern
fields are absent, this field indicates the time when the defaults were last unset.defaultRWConcern.defaultReadConcern
和defaultRWConcern.defaultWriteConcern
字段,则此字段表示上次未设置默认值的时间。
New in version 4.4.在版本4.4中新增。
defaultRWConcern.localUpdateWallClockTime
The local system wall clock time when the instance last updated its copy of any global read or write concern setting. 实例上次更新任何全局读或写问题设置的副本时的本地系统时钟时间。If this field is the only field under 如果此字段是defaultRWConcern
, the instance has never had knowledge of a global default read or write concern setting.defaultRWConcern
下的唯一字段,则该实例从未了解全局默认读或写问题设置。
New in version 4.4.在版本4.4中新增。
Available starting in 4.2.1 (and 4.0.13)从4.2.1(和4.0.13)开始提供
The electionMetrics
section provides information on elections called by this mongod
instance in a bid to become the primary:electionMetrics
部分提供了有关此mongod
实例为争取成为初选而进行的选举的信息:
"electionMetrics" : { "stepUpCmd" : { "called" : NumberLong(<num>), "successful" : NumberLong(<num>) }, "priorityTakeover" : { "called" : NumberLong(<num>), "successful" : NumberLong(<num>) }, "catchUpTakeover" : { "called" : NumberLong(<num>), "successful" : NumberLong(<num>) }, "electionTimeout" : { "called" : NumberLong(<num>), "successful" : NumberLong(<num>) }, "freezeTimeout" : { "called" : NumberLong(<num>), "successful" : NumberLong(<num>) }, "numStepDownsCausedByHigherTerm" : NumberLong(<num>), "numCatchUps" : NumberLong(<num>), "numCatchUpsSucceeded" : NumberLong(<num>), "numCatchUpsAlreadyCaughtUp" : NumberLong(<num>), "numCatchUpsSkipped" : NumberLong(<num>), "numCatchUpsTimedOut" : NumberLong(<num>), "numCatchUpsFailedWithError" : NumberLong(<num>), "numCatchUpsFailedWithNewTerm" : NumberLong(<num>), "numCatchUpsFailedWithReplSetAbortPrimaryCatchUpCmd" : NumberLong(<num>), "averageCatchUpOps" : <double> }
electionMetrics.stepUpCmd
Metrics on elections that were called by the 当初选结束时,mongod
instance as part of an election handoff
when the primary stepped down.mongod
实例称之为选举交接的一部分的选举指标。
The stepUpCmd
includes both the number of elections called and the number of elections that succeeded.stepUpCmd
包括调用的选举数和成功的选举数。
Available starting in 4.2.1 (and 4.0.13)从4.2.1(和4.0.13)开始提供
electionMetrics.priorityTakeover
Metrics on elections that were called by the mongod
instance because its priority
is higher than the primary's.mongod
实例调用的选举指标,因为其priority
高于初选。
The electionMetrics.priorityTakeover
includes both the number of elections called and the number of elections that succeeded.electionMetrics.priorityTakeover
包括被召集的选举数量和成功的选举数量。
Available starting in 4.2.1 (and 4.0.13)
electionMetrics.catchUpTakeover
Metrics on elections called by the mongod
instance because it is more current than the primary.mongod
实例调用的选举指标,因为它比初选更为流行。
The catchUpTakeover
includes both the number of elections called and the number of elections that succeeded.catchUpTakeover
包括被召集的选举数量和成功的选举数量。
Available starting in 4.2.1 (and 4.0.13)从4.2.1(和4.0.13)开始提供
electionMetrics.electionTimeout
Metrics on elections called by the mongod
instance because it has not been able to reach the primary within settings.electionTimeoutMillis
.mongod
实例调用的选举指标,因为它无法在settings.electionTimeoutMillis
内进入初选。
The electionTimeout
includes both the number of elections called and the number of elections that succeeded.electionTimeout
包括已调用的选举数和成功的选举数。
Available starting in 4.2.1 (and 4.0.13)从4.2.1(和4.0.13)开始提供
electionMetrics.freezeTimeout
Metrics on elections called by the mongod
instance after its freeze period
(during which the member cannot seek an election) has expired.mongod
实例在冻结期(在此期间,成员无法寻求选举)到期后调用的选举指标。
The electionMetrics.freezeTimeout
includes both the number of elections called and the number of elections that succeeded.electionMetrics.freezeTimeout
包括调用的选举数和成功的选举数。
Available starting in 4.2.1 (and 4.0.13)从4.2.1(和4.0.13)开始提供
electionMetrics.numStepDownsCausedByHigherTerm
Number of times the mongod
instance stepped down because it saw a higher term (specifically, other member(s) participated in additional elections).mongod
实例因任期较长而下台的次数(具体而言,其他成员参加了额外的选举)。
Available starting in 4.2.1 (and 4.0.13)从4.2.1(和4.0.13)开始提供
electionMetrics.numCatchUps
Number of elections where the 作为新当选初选的mongod
instance as the newly-elected primary had to catch up to the highest known oplog entry.mongod
实例必须赶上已知最高oplog条目的选举次数。
Available starting in 4.2.1 (and 4.0.13)从4.2.1(和4.0.13)开始提供
electionMetrics.numCatchUpsSucceeded
Number of times the mongod
instance as the newly-elected primary successfully caught up to the highest known oplog entry.mongod
实例作为新当选的主实例成功赶上已知最高oplog条目的次数。
Available starting in 4.2.1 (and 4.0.13)从4.2.1(和4.0.13)开始提供
electionMetrics.numCatchUpsAlreadyCaughtUp
Number of times the 作为新当选的初选的mongod
instance as the newly-elected primary concluded its catchup process because it was already caught up when elected.mongod
实例结束追赶过程的次数,因为它在当选时已经赶上了。
Available starting in 4.2.1 (and 4.0.13)从4.2.1(和4.0.13)开始提供
electionMetrics.numCatchUpsSkipped
Number of times the 作为新当选的主要成员的mongod
instance as the newly-elected primary skipped the catchup process.mongod
实例跳过追赶过程的次数。
Available starting in 4.2.1 (and 4.0.13)
electionMetrics.numCatchUpsTimedOut
Number of times the 由于设置了mongod
instance as the newly-elected primary concluded its catchup process because of the settings.catchUpTimeoutMillis
limit.settings.catchUpTimeoutMillis
限制,作为新当选初选的mongod
实例结束追赶过程的次数。
Available starting in 4.2.1 (and 4.0.13)从4.2.1(和4.0.13)开始提供
electionMetrics.numCatchUpsFailedWithError
Number of times the newly-elected primary's catchup process failed with an error.新当选的初选过程因错误而失败的次数。
Available starting in 4.2.1 (and 4.0.13)从4.2.1(和4.0.13)开始提供
electionMetrics.numCatchUpsFailedWithNewTerm
Number of times the newly-elected primary's catchup process concluded because another member(s) had a higher term (specifically, other member(s) participated in additional elections).新当选的初选因另一名成员任期较长(具体而言,其他成员参加了额外选举)而结束的追赶过程的次数。
Available starting in 4.2.1 (and 4.0.13)从4.2.1(和4.0.13)开始提供
electionMetrics.numCatchUpsFailedWithReplSetAbortPrimaryCatchUpCmd
Number of times the newly-elected primary's catchup process concluded because the 由于mongod
received the replSetAbortPrimaryCatchUp
command.mongod
接收到replSetAbortPrimaryCatchUp
命令而导致新当选的主节点的追赶过程结束的次数。
Available starting in 4.2.1 (and 4.0.13)从4.2.1(和4.0.13)开始提供
"extra_info" : { "note" : "fields vary by platform.", "heap_usage_bytes" : <num>, "page_faults" : <num> },
extra_info
A document that provides additional information about the underlying system.提供有关底层系统的附加信息的文档。
extra_info.note
A string with the text 带有文本"fields vary by platform."
"fields vary by platform."
的字符串。
extra_info.heap_usage_bytes
The total size in bytes of heap space used by the database process. 数据库进程使用的堆空间的总大小(字节)。Available on Unix/Linux systems only.仅在Unix/Linux系统上可用。
extra_info.page_faults
The total number of page faults. 页面错误的总数。The extra_info.page_faults
counter may increase dramatically during moments of poor performance and may correlate with limited memory environments and larger data sets. extra_info.page_faults
计数器在性能不佳的时刻可能会显著增加,并且可能与有限的内存环境和较大的数据集相关。Limited and sporadic page faults do not necessarily indicate an issue.有限的和偶发的页面错误不一定表明存在问题。
Windows differentiates "hard" page faults involving disk I/O from "soft" page faults that only require moving pages in memory. Windows将涉及磁盘I/O的“硬”页面故障与只需要在内存中移动页面的“软”页面故障区分开来。MongoDB counts both hard and soft page faults in this statistic.MongoDB在此统计中同时统计硬页面和软页面错误。
New in version 4.2.在版本4.2中新增。
"flowControl" : { "enabled" : <boolean>, "targetRateLimit" : <int>, "timeAcquiringMicros" : NumberLong(<num>), "locksPerKiloOp" : <double>, // Available in 4.4+. In 4.2, returned locksPerOp instead. "sustainerRate" : <int>, "isLagged" : <boolean>, "isLaggedCount" : <int>, "isLaggedTimeMicros" : NumberLong(<num>) },
flowControl
A document that returns statistics on the Flow Control. 返回流控制统计信息的文档。With flow control enabled, as the 在启用流控制的情况下,由于多数提交点延迟接近majority commit
point lag grows close to the flowControlTargetLagSeconds
, writes on the primary must obtain tickets before taking locks. flowControlTargetLagSeconds
,因此在获取锁之前,对主节点的写入必须获得票证。As such, the metrics returned are meaningful when run on the primary.因此,当在主服务器上运行时,返回的度量是有意义的。
New in version 4.2.在版本4.2中新增。
flowControl.enabled
A boolean that indicates whether Flow Control is enabled (一个布尔值,指示流控制是启用(true
) or disabled (false
).true
)还是禁用(false
)。
See also 另请参阅enableFlowControl
.enableFlowControl
。
New in version 4.2.在版本4.2中新增。
flowControl.targetRateLimit
When run on the primary, the maximum number of tickets that can be acquired per second.在主服务器上运行时,每秒可获取的最大票证数。
When run on a secondary, the returned number is a placeholder.在辅助服务器上运行时,返回的数字是占位符。
New in version 4.2.在版本4.2中新增。
flowControl.timeAcquiringMicros
When run on the primary, the total time write operations have waited to acquire a ticket.在主服务器上运行时,写入操作等待获取票证的总时间。
When run on a secondary, the returned number is a placeholder.在辅助服务器上运行时,返回的数字是占位符。
New in version 4.2.在版本4.2中新增。
flowControl.locksPerKiloOp
locksPerKiloOp
replaces locksPerOp
field. locksPerKiloOp
替换locksPerOp
字段。locksPerOp
field is available only on version 4.2.locksPerOp
字段仅在4.2版上可用。
When run on the primary, an approximation of the number of locks taken per 1000 operations.在主服务器上运行时,每1000次操作所取锁的数量的近似值。
When run on a secondary, the returned number is a placeholder.在辅助服务器上运行时,返回的数字是占位符。
New in version 4.4.在版本4.4中新增。
flowControl.locksPerOp
MongoDB 4.4 replaces MongoDB 4.4将locksPerOp
with flowControl.locksPerKiloOp
.locksPerOp
替换为flowControl.locksPerKiloOp
。
When run on the primary, an approximation of the number of locks taken per operation.在主服务器上运行时,每个操作所取锁的数量的近似值。
When run on a secondary, the returned number is a placeholder.在辅助服务器上运行时,返回的数字是占位符。
New in version 4.2.在版本4.2中新增。
flowControl.sustainerRate
When run on the primary, an approximation of operations applied per second by the secondary that is sustaining the commit point.在主服务器上运行时,支持提交点的辅助服务器每秒应用的操作的近似值。
When run on a secondary, the returned number is a placeholder.在辅助服务器上运行时,返回的数字是占位符。
New in version 4.2.在版本4.2中新增。
flowControl.isLagged
When run on the primary, a boolean that indicates whether flow control has engaged. 在主服务器上运行时,一个布尔值,指示流控制是否已启用。Flow control engages when the majority committed lag is greater than some percentage of the configured 当大多数提交的延迟大于配置的flowControlTargetLagSeconds
.flowControlTargetLagSeconds
的某个百分比时,流控制启动。
Replication lag can occur without engaging flow control. 复制延迟可能会发生,而无需参与流量控制。An unresponsive secondary might lag without the replica set receiving sufficient load to engage flow control, leaving the 无响应的secondary可能会延迟,而副本集没有接收到足够的负载来参与流控制,从而使flowControl.isLagged
value at false
.flowControl.isLagged
值为false
。
For additional information, see Flow Control.有关更多信息,请参阅流量控制。
New in version 4.2.在版本4.2中新增。
flowControl.isLaggedCount
When run on a primary, the number of times flow control has engaged since the last restart. 在主计算机上运行时,自上次重新启动以来,流量控制已启用的次数。Flow control engages when the majority committed lag is greater than some percentage of the 当大多数提交的延迟大于flowControlTargetLagSeconds
.flowControlTargetLagSeconds
的某个百分比时,流控制启用。
When run on a secondary, the returned number is a placeholder.在辅助服务器上运行时,返回的数字是占位符。
New in version 4.2.在版本4.2中新增。
flowControl.isLaggedTimeMicros
When run on the primary, the amount of time flow control has spent being engaged since the last restart. 在主服务器上运行时,自上次重新启动以来,流控制占用的时间量。Flow control engages when the majority committed lag is greater than some percentage of the 当大多数提交的延迟大于flowControlTargetLagSeconds
.flowControlTargetLagSeconds
的某个百分比时,流控制启用。
When run on a secondary, the returned number is a placeholder.在辅助服务器上运行时,返回的数字是占位符。
New in version 4.2.在版本4.2中新增。
"freeMonitoring" : { "state" : <string>, "retryIntervalSecs" : NumberLong(<num>), "lastRunTime" : <string>, "registerErrors" : NumberLong(<num>), "metricsErrors" : NumberLong(<num>) },
freeMonitoring
A document that reports on the free Cloud monitoring.报告免费云监控的文档。
freeMonitoring.state
The enablement state of free monitoring. 自由监控的启用状态。The values can be one of the following:这些值可以是以下值之一:
"globalLock" : { "totalTime" : NumberLong(<num>), "currentQueue" : { "total" : <num>, "readers" : <num>, "writers" : <num> }, "activeClients" : { "total" : <num>, "readers" : <num>, "writers" : <num> } },
globalLock
A document that reports on the database's lock state.报告数据库锁定状态的文档。
Generally, the locks document provides more detailed data on lock uses.通常,锁文档提供了有关锁使用的更详细的数据。
globalLock.totalTime
The time, in microseconds, since the database last started and created the 自数据库上次启动并创建globalLock
. globalLock
以来的时间(以微秒为单位)。This is approximately equivalent to the total server uptime.这大约相当于服务器的总运行时间。
globalLock.currentQueue
A document that provides information concerning the number of operations queued because of a lock.提供有关由于锁而排队的操作数的信息的文档。
globalLock.currentQueue.total
The total number of operations queued waiting for the lock (i.e., the sum of 排队等待锁的操作总数(即,globalLock.currentQueue.readers
and globalLock.currentQueue.writers
).globalLock.currentQueue.readers
和globalLock.currentQueue.writers
的总和)。
A consistently small queue, particularly of shorter operations, should cause no concern. 持续较小的队列,特别是较短的操作,应该不会引起任何担忧。The globalLock.activeClients
readers and writers information provides context for this data.globalLock.activeClients
读取器和写入器信息提供了此数据的上下文。
globalLock.currentQueue.readers
The number of operations that are currently queued and waiting for the read lock. 当前排队等待读取锁定的操作数。A consistently small read queue, particularly of shorter operations, should cause no concern.始终较小的读取队列,尤其是较短的操作,应该不会引起任何问题。
globalLock.currentQueue.writers
The number of operations that are currently queued and waiting for the write lock. 当前排队等待写入锁定的操作数。A consistently small write queue, particularly of shorter operations, is no cause for concern.持续较小的写入队列,特别是较短的操作,不需要担心。
globalLock.activeClients
A document that provides information about the number of connected clients and the read and write operations performed by these clients.一种文档,提供有关连接的客户端数量以及这些客户端执行的读写操作的信息。
Use this data to provide context for the 使用此数据为globalLock.currentQueue
data.globalLock.currentQueue
数据提供上下文。
globalLock.activeClients.total
The total number of internal client connections to the database including system threads as well as queued readers and writers. 数据库的内部客户端连接总数,包括系统线程以及排队的读取器和写入器。This metric will be higher than the total of 由于包含系统线程,此度量将高于activeClients.readers
and activeClients.writers
due to the inclusion of system threads.activeClients.readers
和activeClients.writers
的总和。
New in version 4.4.在版本4.4中新增。 For 仅适用于mongos
instances only.mongos
实例。
"hedgingMetrics" : { "numTotalOperations" : <num>, "numTotalHedgedOperations" : <num>, "numAdvantageouslyHedgedOperations" : <num> },
hedgingMetrics
Provides metrics on hedged reads for the 提供mongos
instance.mongos
实例的对冲读取指标。
New in version 4.4.在版本4.4中新增。 For 仅适用于mongos
instances only.mongos
实例。
hedgingMetrics.numTotalOperations
The total number of the operations issued with the hedged read option enabled to this 此mongos
instance.mongos
实例启用对冲读取选项后发行的操作总数。
New in version 4.4.在版本4.4中新增。 For 仅适用于mongos
instances only.mongos
实例。
hedgingMetrics.numTotalHedgedOperations
The number of all operations for which the mongos
instance hedged the read operation; i.e. sent the operation to an additional member of each queried shard.mongos
实例对冲读取操作的所有操作的数量;即,将操作发送给每个查询分片的另一个成员。
New in version 4.4.在版本4.4中新增。 For 仅适用于mongos
instances only.mongos
实例。
hedgingMetrics.numAdvantageouslyHedgedOperations
The total number of the operation where the additional read sent to hedge the read operation fulfilled the client request.为对冲读取操作而发送的附加读取满足客户端请求的操作总数。
New in version 4.4.在版本4.4中新增。 For 仅适用于mongos
instances only.mongos
实例。
New in version 4.4.在版本4.4中新增。
"latchAnalysis" : {
<latch name> : {
"created" : <num>,
"destroyed" : <num>,
"acquired" : <num>,
"released" : <num>,
"contended" : <num>,
"hierarchicalAcquisitionLevelViolations" : {
"onAcquire" : <num>,
"onRelease" : <num>
}
},
...
latchAnalysis
A document that reports on metrics related to internal locking primitives (also known as latches).报告与内部锁定原语(也称为锁存器)相关的度量的文档。
To return 要返回latchAnalysis
information, you must explicitly specify the inclusion:latchAnalysis
信息,必须显式指定包含项:
db.runCommand( { serverStatus: 1, latchAnalysis: 1 } )
The latchAnalysis
returns for each latch the <latch name>
and the following associated metrics:latchAnalysis
为每个闩锁返回<latchname>
和以下相关度量:
created | |
destroyed | |
acquired | |
released | |
contended | |
hierarchicalAcquisitionLevelViolations |
|
New in version 4.4.在版本4.4中新增。
"logicalSessionRecordCache" : { "activeSessionsCount" : <num>, "sessionsCollectionJobCount" : <num>, "lastSessionsCollectionJobDurationMillis" : <num>, "lastSessionsCollectionJobTimestamp" : <Date>, "lastSessionsCollectionJobEntriesRefreshed" : <num>, "lastSessionsCollectionJobEntriesEnded" : <num>, "lastSessionsCollectionJobCursorsClosed" : <num>, "transactionReaperJobCount" : <num>, "lastTransactionReaperJobDurationMillis" : <num>, "lastTransactionReaperJobTimestamp" : <Date>, "lastTransactionReaperJobEntriesCleanedUp" : <num>, "sessionCatalogSize" : <num> // Starting in MongoDB 4.2 },
logicalSessionRecordCache
Provides metrics around the caching of server sessions.提供有关服务器会话缓存的指标。
logicalSessionRecordCache.activeSessionsCount
The number of all active local sessions cached in memory by the 自上次刷新周期以来,mongod
or mongos
instance since the last refresh period.mongod
或mongos
实例缓存在内存中的所有活动本地会话数。
logicalSessionRecordCache.sessionsCollectionJobCount
The number that tracks the number of times the refresh process has run on the 跟踪刷新进程在config.system.sessions
collection.config.system.sessions
集合上运行的次数的数字。
logicalSessionRecordCache.lastSessionsCollectionJobDurationMillis
The length in milliseconds of the last refresh.上次刷新的长度(毫秒)。
logicalSessionRecordCache.lastSessionsCollectionJobTimestamp
The time at which the last refresh occurred.上次刷新发生的时间。
logicalSessionRecordCache.lastSessionsCollectionJobEntriesRefreshed
The number of sessions that were refreshed during the last refresh.上次刷新期间刷新的会话数。
logicalSessionRecordCache.lastSessionsCollectionJobEntriesEnded
The number of sessions that ended during the last refresh.上次刷新期间结束的会话数。
logicalSessionRecordCache.lastSessionsCollectionJobCursorsClosed
The number of cursors that were closed during the last 上次config.system.sessions
collection refresh.config.system.sessions
集合刷新期间关闭的游标数。
logicalSessionRecordCache.transactionReaperJobCount
The number that tracks the number of times the transaction record cleanup process has run on the 跟踪事务记录清理进程在config.transactions
collection.config.transactions
集合上运行的次数。
logicalSessionRecordCache.lastTransactionReaperJobDurationMillis
The length (in milliseconds) of the last transaction record cleanup.上次事务记录清理的长度(以毫秒为单位)。
logicalSessionRecordCache.lastTransactionReaperJobTimestamp
The time of the last transaction record cleanup.上次事务记录清理的时间。
logicalSessionRecordCache.lastTransactionReaperJobEntriesCleanedUp
The number of entries in the 在上次事务记录清理期间删除的config.transactions
collection that were deleted during the last transaction record cleanup.config.transactions
集合中的条目数。
logicalSessionRecordCache.sessionCatalogSize
mongod
instance,mongod
实例,config.transactions
entries. config.transactions
项的内存缓存大小。localLogicalSessionTimeoutMinutes
.localLogicalSessionTimeoutMinutes
内未过期的可重试写入或事务。mongos
instance,mongos
实例,localLogicalSessionTimeoutMinutes
interval.localLogicalSessionTimeoutMinutes
间隔内具有事务的会话的内存缓存数。New in version 4.2.在版本4.2中新增。
"locks" : { <type> : { "acquireCount" : { <mode> : NumberLong(<num>), ... }, "acquireWaitCount" : { <mode> : NumberLong(<num>), ... }, "timeAcquiringMicros" : { <mode> : NumberLong(<num>), ... }, "deadlockCount" : { <mode> : NumberLong(<num>), ... } }, ...
locks
A document that reports for each lock 报告每个锁<type>
, data on lock <modes>
.<type>
的文档,锁<modes>
上的数据。
The possible lock <types>
are:
Lock Type | |
---|---|
ParallelBatchWriterMode |
|
ReplicationStateTransition |
|
Global | |
Database | |
Collection | |
Mutex | |
Metadata | |
oplog |
The possible 可能的<modes>
are:<modes>
有:
Lock Mode | |
---|---|
R | Represents Shared (S) lock. |
W | |
r | |
w |
All values are of the 所有值都是NumberLong()
type.NumberLong()
类型。
locks.<type>.acquireWaitCount
Number of times the 锁定的次数locks.<type>.acquireCount
lock acquisitions encountered waits because the locks were held in a conflicting mode.locks.<type>.acquireCount
锁获取遇到等待,因为锁处于冲突模式。
locks.<type>.timeAcquiringMicros
Cumulative wait time in microseconds for the lock acquisitions.锁获取的累计等待时间(以微秒为单位)。
locks.<type>.timeAcquiringMicros
divided by locks.<type>.acquireWaitCount
gives an approximate average wait time for the particular lock mode.locks.<type>.timeAcquiringMicros
除以locks.<type>.acquireWaitCount
提供特定锁定模式的近似平均等待时间。
Available on mongod only.仅在mongod
上可用。
"mirroredReads" : { "seen" : <num>, "sent" : <num> },
mirroredReads
Available on mongod only.仅在mongod
上可用。
A document that reports on mirrored reads. 报告镜像读取的文档。To return 要返回mirroredReads
information, you must explicitly specify the inclusion:mirroredReads
信息,必须显式指定包含项:
db.runCommand( { serverStatus: 1, mirroredReads: 1 } )
mirroredReads.seen
New in version 4.4.在版本4.4中新增。
The number of operations that support mirroring received by this member.此成员接收的支持镜像的操作数。
mirrorReads
Parameter参数
mirroredReads.sent
New in version 4.4.在版本4.4中新增。
The number of mirrored reads sent by this member when primary. 主成员时此成员发送的镜像读取数。For example, if a read is mirrored and sent to two secondaries, the number of mirrored reads is 例如,如果一个读取被镜像并发送到两个辅助设备,则镜像读取的数量为2
.2
。
mirrorReads
Parameter参数
"network" : { "bytesIn" : NumberLong(<num>), "bytesOut" : NumberLong(<num>), "numSlowDNSOperations" : NumberLong(<num>), "numSlowSSLOperations" : NumberLong(<num>), "numRequests" : NumberLong(<num>), "tcpFastOpen" : { "kernelSetting" : NumberLong(<num>), "serverSupported" : <bool>, "clientSupported" : <bool>, "accepted" : NumberLong(<num>) }, "serviceExecutors" : { "passthrough" : { "threadsRunning" : <num>, "clientsInTotal" : <num>, "clientsRunning" : <num>, "clientsWaitingForData" : <num> }, "fixed" : { "threadsRunning" : <num>, "clientsInTotal" : <num>, "clientsRunning" : <num>, "clientsWaitingForData" : <num> } } },
network
A document that reports data on MongoDB's network use. 报告MongoDB网络使用数据的文档。These statistics measure ingress connections only, specifically the traffic seen by the 这些统计数据仅测量入口连接,特别是mongod
or mongos
over network connections initiated by clients or other mongod
or mongos
instances. mongod
或mongos
通过客户端或其他mongod
和mongos
实例发起的网络连接看到的流量。Traffic from network connections initiated by this 这些统计数据中没有测量由该mongod
or mongos
instance (specifically, egress connections) is not measured in these statistics.mongod
或mongos
实例(特别是出口连接)发起的网络连接的流量。
network.bytesIn
The total number of bytes that the server has received over network connections initiated by clients or other 服务器通过客户端或其他mongod
or mongos
instances.mongod
或mongos
实例发起的网络连接接收的总字节数。
network.bytesOut
The total number of bytes that the server has sent over network connections initiated by clients or other 服务器通过客户端或其他mongod
or mongos
instances.mongod
或mongos
实例发起的网络连接发送的总字节数。
network.numSlowDNSOperations
New in version 4.4.在版本4.4中新增。
The total number of DNS resolution operations which took longer than 1 second.耗时超过1秒的DNS解析操作总数。
network.numSlowSSLOperations
New in version 4.4.在版本4.4中新增。
The total number of SSL handshake operations which took longer than 1 second.耗时超过1秒的SSL握手操作总数。
network.numRequests
The total number of distinct requests that the server has received. 服务器已接收的不同请求的总数。Use this value to provide context for the 使用此值为network.bytesIn
and network.bytesOut
values to ensure that MongoDB's network utilization is consistent with expectations and application use.network.bytesIn
和network.bytesOut
值提供上下文,以确保MongoDB的网络利用率符合预期和应用程序使用。
network.tcpFastOpen
New in version 4.4.在版本4.4中新增。
A document that reports data on MongoDB's support and use of TCP Fast Open (TFO) connections.报告MongoDB支持和使用TCP Fast Open(TFO)连接的数据的文档。
network.tcpFastOpen.kernelSetting
New in version 4.4.在版本4.4中新增。
Linux only
Returns the value of /proc/sys/net/ipv4/tcp_fastopen
:
0
- 1
- 2
- 3
- network.tcpFastOpen.serverSupported
New in version 4.4.在版本4.4中新增。
true
if the host operating system supports inbound TCP Fast Open (TFO) connections.true
。false
if the host operating system does not support inbound TCP Fast Open (TFO) connections.false
。network.tcpFastOpen.clientSupported
New in version 4.4.在版本4.4中新增。
true
if the host operating system supports outbound TCP Fast Open (TFO) connections.true
。false
if the host operating system does not support outbound TCP Fast Open (TFO) connections.false
。network.tcpFastOpen.accepted
New in version 4.4.在版本4.4中新增。
The total number of accepted incoming TCP Fast Open (TFO) connections to the 自mongod
or mongos
since the mongod
or mongos
last started.mongod
或mongos
上次启动以来,到mongod
的已接受传入TCP快速开放(TFO)连接总数。
network.serviceExecutors
New in version 5.0.在版本5.0中新增。
A document that reports data on the service executors, which run operations for client requests.报告服务执行器数据的文档,服务执行器为客户端请求运行操作。
network.serviceExecutors.passthrough
New in version 5.0.在版本5.0中新增。
A document that reports data about the threads and clients for the 报告passthrough
service executor. passthrough
服务执行器的线程和客户端数据的文档。The passthrough
service executor creates a new thread for each client and destroys the thread after the client ends.passthrough
服务执行器为每个客户端创建一个新线程,并在客户端结束后销毁该线程。
network.serviceExecutors.passthrough.threadsRunning
New in version 5.0.在版本5.0中新增。
Number of threads running in the 在passthrough
service executor.passthrough
服务执行器中运行的线程数。
network.serviceExecutors.passthrough.clientsInTotal
New in version 5.0.在版本5.0中新增。
Total number of clients allocated to the 分配给passthrough
service executor. passthrough
服务执行器的客户端总数。A client can be allocated to the 可以将客户端分配给passthrough
service executor and not currently running requests.passthrough
服务执行器,而当前不运行请求。
network.serviceExecutors.passthrough.clientsRunning
New in version 5.0.在版本5.0中新增。
Number of clients currently using the 当前使用passthrough
service executor to run requests.passthrough
服务执行器运行请求的客户端数。
network.serviceExecutors.passthrough.clientsWaitingForData
New in version 5.0.在版本5.0中新增。
Number of clients using the 使用passthrough
service executor that are waiting for incoming data from the network.passthrough
传递服务执行器等待来自网络的传入数据的客户端数。
network.serviceExecutors.fixed
New in version 5.0.在版本5.0中新增。
A document that reports data about the threads and clients for the 报告fixed
service executor. fixed
服务执行器的线程和客户端数据的文档。The fixed
service executor has a fixed number of threads. fixed
服务执行器具有固定数量的线程。A thread is temporarily assigned to a client and the thread is preserved after the client ends.线程被临时分配给客户机,并且在客户机结束后该线程被保留。
network.serviceExecutors.fixed.threadsRunning
New in version 5.0.在版本5.0中新增。
Number of threads running in the fixed
service executor.fixed
服务执行器中运行的线程数。
network.serviceExecutors.fixed.clientsInTotal
New in version 5.0.在版本5.0中新增。
Total number of clients allocated to the 分配给fixed
service executor. fixed
服务执行器的客户端总数。A client can be allocated to the 客户端可以分配给fixed
service executor and not currently running requests.fixed
服务执行器,而当前不运行请求。
Only for 仅适用于mongod
instancesmongod
实例
"opLatencies" : { "reads" : <document>, "writes" : <document>, "commands" : <document> },
opLatencies
A document containing operation latencies for the instance as a whole. 包含整个实例的操作延迟的文档。See 有关此文档的说明,请参阅latencyStats
Document for an description of this document.latencyStats
文档。
Only 只有mongod
instances report opLatencies
.mongod
实例报告opLatencies
。
Starting in version 5.0, 从5.0版开始,opReadConcernCounters
is replaced by readConcernCounters
.opReadConcernCounters
被readConcernCounters
取代。
Only for mongod instances仅适用于mongod
实例
"opReadConcernCounters" : { "available" : NumberLong(<num>), "linearizable" : NumberLong(<num>), "local" : NumberLong(<num>), "majority" : NumberLong(<num>), "snapshot" : NumberLong(<num>), "none" : NumberLong(<num>) }
opReadConcernCounters
Removed in version 5.0. 在5.0版中删除。Replaced by 替换为readConcernCounters
.readConcernCounters
。
A document that reports on the read concern level specified by query operations to the 自mongod
instance since it last started.mongod
实例上次启动以来,向其报告查询操作指定的读取关注级别的文档。
Specified w | |
---|---|
"available" | "available" . "available" 的查询操作数。 |
"linearizable" | "linearizable" . "linearizable" 的查询操作数。 |
"local" | "local" . "local" 的查询操作数。 |
"majority" | "majority" . "majority" 的查询操作数。 |
"snapshot" | "snapshot" . "snapshot" 的查询操作数。 |
"none" |
The sum of the opReadConcernCounters
equals opcounters.query
.opReadConcernCounters
的和等于opcounters.query
。
New in version 4.0.6.在版本4.0.6中新增。
Only for mongod instances仅适用于mongod
实例
"opWriteConcernCounters" : { "insert" : { "wmajority" : NumberLong(<num>), "wnum" : { "<num>" : NumberLong(<num>), ... }, "wtag" : { "<tag1>" : NumberLong(<num>), ... }, "none" : NumberLong(<num>) }, "update" : { "wmajority" : NumberLong(<num>), "wnum" : { "<num>" : NumberLong(<num>), }, "wtag" : { "<tag1>" : NumberLong(<num>), ... }, "none" : NumberLong(<num>) }, "delete" : { "wmajority" : NumberLong(<num>) "wnum" : { "<num>" : NumberLong(<num>), ... }, "wtag" : { "<tag1>" : NumberLong(<num>), ... }, "none" : NumberLong(<num>) } }
opWriteConcernCounters
A document that reports on the write concerns specified by write operations to the 自mongod
instance since it last started.mongod
实例上次启动以来,向其报告写操作指定的写关注点的文档。
More specifically, the 更具体地说,opWriteConcernCounters
reports on the w: <value> specified by the write operations. opWriteConcernCounters
报告写入操作指定的w: <value>
。The journal flag option (写入问题的日志标志选项(j
) and the timeout option (wtimeout
) of the write concerns does not affect the count. j
)和超时选项(wtimeout
)不会影响计数。The count is incremented even if the operation times out.即使操作超时,计数也会递增。
Only available when 仅当reportOpWriteConcernCountersInServerStatus
parameter is set to true
(false
by default).reportOpWriteConcernCountersInServerStatus
参数设置为true
(默认为false
)时可用。
opWriteConcernCounters.insert
New in version 4.0.6.在版本4.0.6中新增。
A document that reports on the w: <value> specified by insert operations to the 一个文档,报告自上次启动以来对mongod
instance since it last started:mongod
实例执行插入操作所指定的w: <value>:
Only available when 仅当reportOpWriteConcernCountersInServerStatus
parameter is set to true
(false
by default).reportOpWriteConcernCountersInServerStatus
参数设置为true
(默认为false
)时可用。
"insert" : { "wmajority" : NumberLong(<num>), "wnum" : { "<num>" : NumberLong(<num>), ... }, "wtag" : { "<tag1>" : NumberLong(<num>), ... }, "none" : NumberLong(<num>) },
Specified w | |
---|---|
"wmajority" | w: "majority" . w: "majority" 的插入操作数。 |
"wnum" | w: <num> . w: <num> 的插入操作数。<num> . <num> 分组。 |
"wtag" | w: <tag> . w: <tag> 的插入操作数。<tag> .<tag> 分组。 |
"none" | w value. w 值的插入操作数。w value of "majority". w 值"majority"。 |
The sum of the opWriteConcernCounters.insert
equals opcounters.insert
.opWriteConcernCounters.insert
的和等于opcounters.insert
。
opWriteConcernCounters.update
New in version 4.0.6.在版本4.0.6中新增。
A document that reports on the w: <value> specified by update operations to the 自上次启动以来,向mongod
instance since it last started:mongod
实例报告更新操作指定的w: <value>
的文档:
Only available when 仅当reportOpWriteConcernCountersInServerStatus
parameter is set to true
(false
by default).reportOpWriteConcernCountersInServerStatus
参数设置为true
(默认为false
)时可用。
"update" : { "wmajority" : NumberLong(<num>), "wnum" : { "<num>" : NumberLong(<num>), ... }, "wtag" : { "<tag1>" : NumberLong(<num>), ... }, "none" : NumberLong(<num>) },
w | |
---|---|
"wmajority" | w: "majority" . w: "majority" 的更新操作数。 |
"wnum" | w: <num> . w: <num> 的更新操作数。<num> . <num> 分组。 |
"wtag" | w: <tag> . w: <tag> 的更新操作数。<tag> . <tag> 分组。 |
"none" | w value. w 值的更新操作数。w value of 1 . w 值1 。 |
The sum of the opWriteConcernCounters.update
equals opcounters.update
.opWriteConcernCounters.update
的和等于opcounters.update
。
opWriteConcernCounters.delete
New in version 4.0.6.在版本4.0.6中新增。
A document that reports on the w: <value> specified by delete operations to the 自mongod
instance since it last started:mongod
实例上次启动以来,向其报告由删除操作指定的w: <value>
的文档:
Only available when 仅当reportOpWriteConcernCountersInServerStatus
parameter is set to true
(false
by default).reportOpWriteConcernCountersInServerStatus
参数设置为true
(默认为false
)时可用。
"delete" : { "wmajority" : NumberLong(<num>), "wnum" : { "<num>" : NumberLong(<num>), ... }, "wtag" : { "<tag1>" : NumberLong(<num>), ... }, "none" : NumberLong(<num>) }
Specified w | |
---|---|
"wmajority" | w: "majority" . w: "majority" 的删除操作数。 |
"wnum" | w: <num> . w: <num> 的删除操作数。<num> . <num> 分组。 |
"wtag" | w: <tag> . w: <tag> 的删除操作数。<tag> . <tag> 分组。 |
"none" | w value. w 值的删除操作数。w value of 1 . w 值1 。 |
The sum of the opWriteConcernCounters.delete
equals opcounters.delete
.opWriteConcernCounters.delete
的和等于opcounters.delete
。
Starting in MongoDB 4.2, the returned opcounters.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccounter.*值为NumberLong类型。In previous versions, the values are of type NumberInt.在以前的版本中,值的类型为NumberInt。
"opcounters" : { "insert" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong "query" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong "update" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong "delete" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong "getmore" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong "command" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong },
opcounters
A document that reports on database operations by type since the 自mongod
instance last started.mongod
实例上次启动以来,按类型报告数据库操作的文档。
These numbers will grow over time until next restart. 这些数字将随着时间的推移而增长,直到下次重启。Analyze these values over time to track database utilization.随时间分析这些值以跟踪数据库利用率。
The data in opcounters
treats operations that affect multiple documents, such as bulk insert or multi-update operations, as a single operation. opcounters
中的数据将影响多个文档的操作(如批量插入或多更新操作)视为单个操作。See 有关更详细的文档级操作跟踪,请参阅metrics.document
for more granular document-level operation tracking.metrics.document
。
Additionally, these values reflect received operations, and increment even when operations are not successful.此外,这些值反映接收到的操作,即使操作不成功也会增加。
opcounters.insert
The total number of insert operations received since the 自mongod
instance last started.mongod
实例上次启动以来收到的插入操作总数。
Starting in MongoDB 4.2, the returned opcounters.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccounter.*值为NumberLong类型。In previous versions, the values are of type NumberInt.在以前的版本中,值的类型为NumberInt。
opcounters.query
The total number of queries received since the 自mongod
instance last started.mongod
实例上次启动以来收到的查询总数。
Starting in MongoDB 4.2, the returned opcounters.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccounter.*值为NumberLong类型。In previous versions, the values are of type NumberInt.在以前的版本中,值的类型为NumberInt。
opcounters.update
The total number of update operations received since the 自mongod
instance last started.mongod
实例上次启动以来收到的更新操作总数。
Starting in MongoDB 4.2, the returned opcounters.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccounter.*值为NumberLong类型。In previous versions, the values are of type NumberInt.在以前的版本中,值的类型为NumberInt。
opcounters.delete
The total number of delete operations since the 自mongod
instance last started.mongod
实例上次启动以来的删除操作总数。
Starting in MongoDB 4.2, the returned opcounters.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccounter.*值为NumberLong类型。In previous versions, the values are of type NumberInt.在以前的版本中,值的类型为NumberInt。
opcounters.getmore
The total number of 自getMore
operations since the mongod
instance last started. mongod
实例上次启动以来,getMore
操作的总数。This counter can be high even if the query count is low. 即使查询计数较低,此计数器也可能较高。Secondary nodes send 辅助节点在复制过程中发送getMore操作。getMore
operations as part of the replication process.
Starting in MongoDB 4.2, the returned opcounters.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccounter.*值为NumberLong类型。In previous versions, the values are of type NumberInt.在以前的版本中,值的类型为NumberInt。
opcounters.command
The total number of commands issued to the database since the 自mongod
instance last started.mongod
实例上次启动以来,向数据库发出的命令总数。
opcounters.command
counts all commands except the write commands: insert
, update
, and delete
.opcounters.command
统计除写入命令外的所有命令:insert
、update
和delete
。
Starting in MongoDB 4.2, the returned opcounters.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccounter.*值为NumberLong类型。In previous versions, the values are of type NumberInt.在以前的版本中,值的类型为NumberInt。
opcounters.deprecated
This section only appears in the 仅当使用了以下不推荐使用的操作码之一时,db.serverStatus()
output when one of the following, deprecated opcodes has been used:db.serverStatus()
输出中才会出现此部分:
"deprecated": { "opQuery": NumberLong(<num>), "opGetMore": NumberLong(<num>), "opKillCursors": NumberLong(<num>), "opDelete": NumberLong(<num>), "opUpdate": NumberLong(<num>), "opInsert": NumberLong(<num>), "total": NumberLong(<num>), }
These opcodes were deprecated in MongoDB 5.0 and support for these opcodes is removed in MongoDB 5.1. MongoDB 5.0中已弃用这些操作码,MongoDB 5.1中已删除对这些操作码的支持。Starting in MongoDB 5.1, 从MongoDB 5.1开始,mongod
refuses requests that use a deprecated opcode and increments the corresponding counter.mongod
拒绝使用不推荐使用的操作码的请求,并增加相应的计数器。
OP_QUERY
is an exception to the general rule. 是一般规则的例外。mongod
continues to support hello
and isMaster
requests that use OP_QUERY
. mongod
继续支持使用OP_QUERY
的hello
和isMaster
请求。mongod
refuses any other OP_QUERY
requests.mongod
拒绝任何其他OP_QUERY
请求。
The counters are reset when mongod
starts.mongod
启动时计数器复位。
Starting in MongoDB 4.2, the returned opcountersRepl.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccountersRepl.*值为NumberLong类型。In previous versions, the values are type NumberInt.在以前的版本中,值的类型为NumberInt。
"opcountersRepl" : { "insert" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong "query" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong "update" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong "delete" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong "getmore" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong "command" : NumberLong(<num>), // Starting in MongoDB 4.2, type is NumberLong },
opcountersRepl
A document that reports on database replication operations by type since the 自mongod
instance last started.mongod
实例上次启动以来,按类型报告数据库复制操作的文档。
These values only appear when the current host is a member of a replica set.只有当当前主机是副本集的成员时,才会显示这些值。
These values will differ from the 由于MongoDB在复制期间如何序列化操作,这些值将与操作计数器值不同。opcounters
values because of how MongoDB serializes operations during replication. See Replication for more information on replication.有关复制的详细信息,请参阅复制。
These numbers will grow over time in response to database use until next restart. 这些数字将随着时间的推移而增长,以响应数据库的使用,直到下次重新启动。Analyze these values over time to track database utilization.随时间分析这些值以跟踪数据库利用率。
Starting in MongoDB 4.2, the returned opcountersRepl.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccountersRepl.*值为NumberLong类型。In previous versions, the values are type NumberInt.在以前的版本中,值的类型为NumberInt。
opcountersRepl.insert
The total number of replicated insert operations since the 自mongod
instance last started.mongod
实例上次启动以来复制的插入操作总数。
Starting in MongoDB 4.2, the returned opcountersRepl.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccountersRepl.*值为NumberLong类型。In previous versions, the values are type NumberInt.在以前的版本中,值的类型为NumberInt。
opcountersRepl.query
The total number of replicated queries since the 自mongod
instance last started.mongod
实例上次启动以来复制的查询总数。
Starting in MongoDB 4.2, the returned opcountersRepl.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccountersRepl.*值为NumberLong类型。In previous versions, the values are type NumberInt.在以前的版本中,值的类型为NumberInt。
opcountersRepl.update
The total number of replicated update operations since the 自mongod
instance last started.mongod
实例上次启动以来复制的更新操作总数。
Starting in MongoDB 4.2, the returned opcountersRepl.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccountersRepl.*值为NumberLong类型。In previous versions, the values are type NumberInt.在以前的版本中,值的类型为NumberInt。
opcountersRepl.delete
The total number of replicated delete operations since the 自mongod
instance last started.mongod
实例上次启动以来复制的删除操作总数。
Starting in MongoDB 4.2, the returned opcountersRepl.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccountersRepl.*值为NumberLong类型。In previous versions, the values are type NumberInt.在以前的版本中,值的类型为NumberInt。
opcountersRepl.getmore
The total number of 自getMore
operations since the mongod
instance last started. mongod
实例上次启动以来,getMore
操作的总数。This counter can be high even if the query count is low. 即使查询计数较低,此计数器也可能较高。Secondary nodes send 辅助节点在复制过程中发送getMore
operations as part of the replication process.getMore
操作。
Starting in MongoDB 4.2, the returned opcountersRepl.* values are type NumberLong. 从MongoDB 4.2开始,返回的opccountersRepl.*值为NumberLong类型。In previous versions, the values are type NumberInt.在以前的版本中,值的类型为NumberInt。
opcountersRepl.command
The total number of replicated commands issued to the database since the 自mongod
instance last started.mongod
实例上次启动以来,向数据库发出的复制命令总数。
Starting in MongoDB 4.2, the returned opcountersRepl.* values are type NumberLong. In previous versions, the values are type NumberInt.从MongoDB 4.2开始,返回的opccountersRepl.*值为NumberLong类型。在以前的版本中,值的类型为NumberInt。
New in version 5.0.在版本5.0中新增。
"readConcernCounters" : { "nonTransactionOps" : { "none" : NumberLong(<num>), "local" : NumberLong(<num>), "available" : NumberLong(<num>), "majority" : NumberLong(<num>), "snapshot" : { "withClusterTime" : NumberLong(<num>), "withoutClusterTime" : NumberLong(<num>) }, "linearizable" : NumberLong(<num>) }, "transactionOps" : { "none" : NumberLong(<num>), "local" : NumberLong(<num>), "majority" : NumberLong(<num>), "snapshot" : { "withClusterTime" : NumberLong(<num>), "withoutClusterTime" : NumberLong(<num>) } } },
readConcernCounters
A document that reports on the read concern level specified by query operations. 报告由查询操作指定的读取问题级别的文档。This document contains the 本文档包含readConcernCounters.nonTransactionOps
and readConcernCounters.transactionOps
documents.readConcernCounters.nonTransactionOps
和readConcernCounters.transactionOps
文档。
readConcernCounters.nonTransactionOps
A document that reports on the read concern level specified by non-transaction query operations performed after the database server last started.报告数据库服务器上次启动后执行的非事务查询操作所指定的读取问题级别的文档。
readConcernCounters.nonTransactionOps.none
Number of non-transaction query operations that did not specify a read concern level and instead used the default read concern level.未指定读取关注级别而使用默认读取关注级别的非事务查询操作数。
readConcernCounters.nonTransactionOps.local
Number of non-transaction query operations that specified the 指定"local"
read concern level."local"
读取关注级别的非事务查询操作数。
readConcernCounters.nonTransactionOps.available
Number of non-transaction query operations that specified the 指定"available"
read concern level."available"
读取问题级别的非事务查询操作数。
readConcernCounters.nonTransactionOps.majority
Number of non-transaction query operations that specified the 指定"majority"
read concern level."majority"
读取关注级别的非事务查询操作数。
readConcernCounters.nonTransactionOps.snapshot
Document containing non-transaction query operations that specified the 包含指定"snapshot"
read concern level."snapshot"
读取关注级别的非事务查询操作的文档。
readConcernCounters.nonTransactionOps.snapshot.withClusterTime
Number of non-transaction query operations that specified the 指定"snapshot"
read concern level and the cluster time, which specified a point in time."snapshot"
读取问题级别和群集时间(指定时间点)的非事务查询操作数。
readConcernCounters.nonTransactionOps.snapshot.withoutClusterTime
Number of non-transaction query operations that specified the 指定了"snapshot"
read concern level without the cluster time, which means a point in time was omitted and the server will read the most recently committed snapshot available to the node."snapshot"
读取关注级别而没有群集时间的非事务查询操作数,这意味着忽略了某个时间点,服务器将读取节点可用的最近提交的快照。
readConcernCounters.nonTransactionOps.linearizable
Number of non-transaction query operations that specified the 指定"linearizable"
read concern level."linearizable"
读取问题级别的非事务查询操作数。
readConcernCounters.transactionOps
A document that reports on the read concern level specified by transaction query operations performed after the database server last started.报告数据库服务器上次启动后执行的事务查询操作所指定的读取问题级别的文档。
readConcernCounters.transactionOps.none
Number of transaction query operations that did not specify a read concern level and instead used the default read concern level.未指定读取关注级别而使用默认读取关注级别的事务查询操作数。
readConcernCounters.transactionOps.local
Number of transaction query operations that specified the 指定"local"
read concern level."local"
读取关注级别的事务查询操作数。
readConcernCounters.transactionOps.available
Number of transaction query operations that specified the 指定"available"
read concern level."available"
读取问题级别的事务查询操作数。
readConcernCounters.transactionOps.majority
Number of transaction query operations that specified the 指定"majority"
read concern level."majority"
读取关注级别的事务查询操作数。
readConcernCounters.transactionOps.snapshot
Document containing transaction query operations that specified the 包含指定"snapshot"
read concern level."snapshot"
读取问题级别的事务查询操作的文档。
readConcernCounters.transactionOps.snapshot.withClusterTime
Number of transaction query operations that specified the 指定"snapshot"
read concern level and the cluster time, which specified a point in time."snapshot"
读取问题级别和群集时间(指定时间点)的事务查询操作数。
readConcernCounters.transactionOps.snapshot.withoutClusterTime
Number of transaction query operations that specified the 指定了"snapshot"
read concern level without the cluster time, which means a point in time was omitted and the server will read the most recently committed snapshot available to the node."snapshot"
读取关注级别而没有群集时间的事务查询操作数,这意味着忽略了某个时间点,服务器将读取节点可用的最近提交的快照。
"oplogTruncation" : { "totalTimeProcessingMicros" : NumberLong(<num>), "processingMethod" : <string>, "oplogMinRetentionHours" : <double> "totalTimeTruncatingMicros" : NumberLong(<num>), "truncateCount" : NumberLong(<num>) },
oplogTruncation
A document that reports on oplog truncations.报告oplog截断的文档。
The field only appears when the current instance is a member of a replica set and uses either the WiredTiger Storage Engine or In-Memory Storage Engine.仅当当前实例是副本集的成员并且使用WiredTiger存储引擎或内存存储引擎时,才会显示该字段。
New in version 4.2.1.在版本4.2.1中新增。 Available in the WiredTiger Storage Engine.WiredTiger存储引擎中提供。
oplogTruncation.totalTimeProcessingMicros
The total time taken, in microseconds, to scan or sample the oplog to determine the oplog truncation points.扫描或采样oplog以确定oplog截断点所用的总时间(以微秒为单位)。
totalTimeProcessingMicros
is only meaningful if the mongod
instance started on existing data files (i.e. not meaningful for In-Memory Storage Engine).totalTimeProcessingMicros
只有在mongod
实例在现有数据文件上启动时才有意义(即对内存存储引擎没有意义)。
See oplogTruncation.processingMethod
New in version 4.2.1.在版本4.2.1中新增。 Available in the WiredTiger Storage Engine.WiredTiger存储引擎中提供。
oplogTruncation.processingMethod
The method used at start up to determine the oplog truncation points. 启动时用于确定oplog截断点的方法。The value can be either 该值可以是"sampling"
or "scanning"
."sampling"
或"scanning"
。
processingMethod
is only meaningful if the mongod
instance started on existing data files (i.e. not meaningful for In-Memory Storage Engine).processingMethod
只有在mongod
实例在现有数据文件上启动时才有意义(即对内存存储引擎没有意义)。
Changed in version 4.4.在版本4.4中更改。
New in version 4.2.1.在版本4.2.1中新增。 Available in the WiredTiger Storage Engine.WiredTiger存储引擎中提供。
oplogTruncation.minRetentionHours
New in version 4.4.在版本4.4中新增。 The minimum retention period for the oplog in hours. oplog的最小保留期(小时)。If the oplog has exceeded the oplog size, the 如果oplog超过了oplog大小,mongod
only truncates oplog entries older than the configured retention value.mongod
只会截断比配置的保留值早的oplog条目。
Only visible if the 仅当mongod
is a member of a replica set and:mongod
是副本集的成员并且:
The mongod
was started with the --oplogMinRetentionHours
command line option or the storage.oplogMinRetentionHours
configuration file option,mongod
是使用--oplogMinRetentionHours
命令行选项或storage.oplogMinRetentionHours
配置文件选项启动的,
or
replSetResizeOplog
.replSetResizeOplog
配置了最小保留期。oplogTruncation.totalTimeTruncatingMicros
The cumulative time spent, in microseconds, performing oplog truncations.执行oplog截断所花费的累计时间(以微秒为单位)。
New in version 4.2.1.在版本4.2.1中新增。 Available in the WiredTiger Storage Engine.WiredTiger存储引擎中提供。
oplogTruncation.truncateCount
The cumulative number of oplog truncations.oplog截断的累积次数。
New in version 4.2.1.在版本4.2.1中新增。 Available in the WiredTiger Storage Engine.WiredTiger存储引擎中提供。
"repl" : { "hosts" : [ <string>, <string>, <string> ], "setName" : <string>, "setVersion" : <num>, "isWritablePrimary" : <boolean>, "secondary" : <boolean>, "primary" : <hostname>, "me" : <hostname>, "electionId" : ObjectId(""), "primaryOnlyServices": { "ReshardingRecipientService": { "state": <string>, "numInstances": <num> }, "RenameCollectionParticipantService": { "state": <string>, "numInstances": <num> }, "ShardingDDLCoordinator": { "state": <string>, "numInstances": <num> }, "ReshardingDonorService": { "state": <string>, "numInstances": <num> } }, "rbid" : <num>, "replicationProgress" : [ { "rid" : <ObjectId>, "optime" : { ts: <timestamp>, term: <num> }, "host" : <hostname>, "memberId" : <num> }, ... ] }
repl
A document that reports on the replica set configuration. 报告副本集配置的文档。repl
only appear when the current host is a replica set. repl
仅在当前主机是副本集时出现。See Replication for more information on replication.
repl.hosts
An array of the current replica set members' hostname and port information (当前副本集成员的主机名和端口信息的数组("host:port"
)."host:port"
)。
repl.setName
A string with the name of the current replica set. 包含当前副本集名称的字符串。This value reflects the 此值反映配置文件中的--replSet
command line argument, or replSetName
value in the configuration file.--replSet
命令行参数或replSetName
值。
repl.isWritablePrimary
A boolean that indicates whether the current node is the primary of the replica set.一个布尔值,指示当前节点是否是副本集的primary。
repl.secondary
A boolean that indicates whether the current node is a secondary member of the replica set.一个布尔值,指示当前节点是否是副本集的secondary成员。
repl.primary
The hostname and port information (副本集当前primary成员的主机名和端口信息("host:port"
) of the current primary member of the replica set."host:port"
)。
repl.me
The hostname and port information (副本集当前成员的主机名和端口信息("host:port"
) for the current member of the replica set."host:port"
)。
repl.primaryOnlyServices
Document that contains the number and status of instances of each primary service active on the server. 包含服务器上每个活动主服务实例的数量和状态的文档。Primary services can only start when a server is primary but can continue running to completion after the server changes state.主服务只能在服务器是主服务器时启动,但在服务器更改状态后可以继续运行直至完成。
New in version 5.0.在版本5.0中新增。
repl.primaryOnlyServices.ReshardingRecipientService
Document that contains the state and number of instances of the 包含ReshardingRecipientService
.ReshardingRecipientService
的状态和实例数的文档。
Recipients are the shards,that would own the chunks after as a result of the resharding operation, according to the new shard key and zones.接收方是分片,根据新的分片键和区域,在重新分配操作之后,它们将拥有分片。
The resharding coordinator instructs each donor and recipient shard primary, to rename the temporary sharded collection. 重新分配协调器指示每个捐赠者和接收者分片主对象重命名临时分片集合。The temporary collection becomes the new resharded collection.临时集合将成为新的重新保护集合。
New in version 5.0.在版本5.0中新增。
repl.primaryOnlyServices.RenameCollectionParticipantService
Document that contains the state and number of instances of the 包含RenameCollectionParticipantService
.RenameCollectionParticipantService
的状态和实例数的文档。
The RenameCollectionParticipantService
ensures that, after a shard receives a renameCollection request, the shard is able to resume the local rename in case of system failure.RenameCollectionParticipantService
确保在分片收到renameCollection
请求后,分片能够在系统故障时恢复本地重命名。
New in version 5.0.在版本5.0中新增。
repl.primaryOnlyServices.ShardingDDLCoordinator
Document that contains the state and number of instances of the 包含ShardingDDLCoordinator
.ShardingDDLCoordinator
的状态和实例数的文档。
The ShardingDDLCoordinator
service manages DDL operations for primary databases such as: create database, drop database, renameCollection.ShardingDDLCoordinator
服务管理primary数据库的DDL操作,例如:创建数据库、删除数据库、重命名集合。
The ShardingDDLCoordinator
ensures that one DDL operation for each database can happen at any one specific point in time within a sharded cluster.ShardingDDLCoordinator
确保每个数据库的一个DDL操作可以在分片集群内的任何一个特定时间点发生。
New in version 5.0.在版本5.0中新增。
repl.primaryOnlyServices.ReshardingDonorService
Document that contains the state and number of instances of the 包含ReshardingDonorService
.ReshardingDonorService
的状态和实例数的文档。
Donors are the shards that own chunks of the sharded collection before the rename operation completes.施主是在重命名操作完成之前拥有分片集合块的分片。
The resharding coordinator instructs each donor and recipient shard primary, to rename the temporary sharded collection. 重新分配协调器指示每个捐赠者和接收者分片主对象重命名临时分片集合。The temporary collection becomes the new resharded collection.临时集合将成为新的重新保护集合。
New in version 5.0.在版本5.0中新增。
repl.rbid
Rollback identifier. 回滚标识符。Used to determine if a rollback has happened for this 用于确定此mongod
instance.mongod
实例是否发生了回滚。
repl.replicationProgress
An array with one document for each member of the replica set that reports replication process to this member. 一个数组,副本集的每个成员都有一个文档,用于向该成员报告复制过程。Typically this is the primary, or secondaries if using chained replication.通常,如果使用链式复制,则这是主副本或辅助副本。
To include this output, you must pass the 要包含此输出,必须将repl
option to the serverStatus
, as in the following:repl
选项传递给serverStatus
,如下所示:
db.serverStatus({ "repl": 1 }) db.runCommand({ "serverStatus": 1, "repl": 1 })
The content of the repl.replicationProgress
section depends on the source of each member's replication. repl.replicationProgress
部分的内容取决于每个成员的复制源。This section supports internal operation and is for internal and diagnostic use only.本节支持内部操作,仅供内部和诊断使用。
repl.replicationProgress[n].rid
An ObjectId used as an ID for the members of the replica set. 用作副本集成员ID的ObjectId。For internal use only.仅供内部使用。
repl.replicationProgress[n].optime
Information regarding the last operation from the oplog that the member applied, as reported from this member.此成员报告的成员应用的oplog中最后一次操作的相关信息。
"security" : { "authentication" : { "saslSupportedMechsReceived" : <num>, "mechanisms" : { "MONGODB-X509" : { "speculativeAuthenticate" : { "received" : NumberLong(<num>), "successful" : NumberLong(<num>) }, "authenticate" : { "received" : NumberLong(<num>), "successful" : NumberLong(<num>) } }, "SCRAM-SHA-1" : { "speculativeAuthenticate" : { "received" : NumberLong(<num>), "successful" : NumberLong(<num>) }, "authenticate" : { "received" : NumberLong(<num>), "successful" : NumberLong(<num>) } }, "SCRAM-SHA-256" : { "speculativeAuthenticate" : { "received" : NumberLong(<num>), "successful" : NumberLong(<num>) }, "authenticate" : { "received" : NumberLong(<num>), "successful" : NumberLong(<num>) } } } }, "SSLServerSubjectName": <string>, "SSLServerHasCertificateAuthority": <boolean>, "SSLServerCertificateExpirationDate": <date> },
security
A document that reports on:报告以下内容的文档:
mongod
or mongos
instance. (New in MongoDB 4.4)mongod
或mongos
实例进行身份验证的次数。(MongoDB 4.4新增)mongod
/mongos
instance's TLS/SSL certificate. mongod
/mongos
实例的TLS/SSL证书。mongod
or mongos
instance with support for TLS)mongod
或mongos
实例)security.authentication.saslSupportedMechsReceived
New in version 5.0.在版本5.0中新增。
The number of times a hello
request includes a valid hello.saslSupportedMechs
field.hello
请求包含有效hello.saslSupportedMechs
字段的次数。
security.authentication.mechanisms
A document that reports on the number of times a given authentication mechanism has been used to authenticate against the 报告给定身份验证机制用于对mongod
or mongos
instance. mongod
或mongos
实例进行身份验证的次数的文档。The values in the document distinguish standard authentication and speculative authentication. 文档中的值区分标准身份验证和推测身份验证。[1]
New in version 4.4.在版本4.4中新增。
The fields in the mechanisms
document depend on the configuration of the authenticationMechanisms
parameter. mechanisms
文档中的字段取决于authenticationMechanisms
参数的配置。The 机制文档包含mechanisms
document includes a field for each authentication mechanism supported by your mongod
or mongos
instance.mongod
或mongos
实例支持的每个身份验证机制的字段。
The following example shows the shape of the 以下示例显示了仅支持x.509身份验证的部署的mechanisms
document for a deployment that only supports x.509 authentication.mechanisms
文档的形状。
security.authentication.mechanisms.MONGODB-X509
A document that reports on the number of times x.509 has been used to authenticate against the 一个报告x.509被用于对mongod
or mongos
instance.mongod
或mongos
实例进行身份验证次数的文档。
Includes total number of 包括x.509
authentication attempts and the subset of those attempts which were speculative. x.509
身份验证尝试的总数以及那些推测性尝试的子集。[1]
New in version 4.4.在版本4.4中新增。
security.authentication.mechanisms.MONGODB-X509.speculativeAuthenticate.received
Number of speculative authentication attempts received using x.509. 使用x.509接收的推测身份验证尝试数。Includes both successful and failed speculative authentication attempts.包括成功和失败的推测身份验证尝试。 [1]
New in version 4.4.在版本4.4中新增。
security.authentication.mechanisms.MONGODB-X509.speculativeAuthenticate.successful
Number of successful speculative authentication attempts received using x.509. 使用x.509接收的成功推测身份验证尝试数。[1]
New in version 4.4.在版本4.4中新增。
security.authentication.mechanisms.MONGODB-X509.authenticate.received
Number of successful and failed authentication attempts received using x.509. 使用x.509接收的成功和失败的身份验证尝试数。This value includes speculative authentication attempts received using x.509.此值包括使用x.509接收的推测性身份验证尝试。
New in version 4.4.在版本4.4中新增。
security.authentication.mechanisms.MONGODB-X509.authenticate.successful
Number of successful authentication attempts received using x.509. 使用x.509接收的成功身份验证尝试数。This value includes successful speculative authentication attempts which used x.509.此值包括使用x.509的成功推测身份验证尝试。
New in version 4.4.在版本4.4中新增。
[1] | (1, 2, 3, 4) |
security.SSLServerSubjectName
The subject name associated with the 与mongod
/mongos
instance's TLS/SSL certificate.mongod
/mongos
实例的TLS/SSL证书关联的主题名称。
When run on 当在mongos
, the command returns sharding information.mongos
上运行时,该命令返回分片信息。
Changed in version 3.6.在版本3.6中更改。
{ "configsvrConnectionString" : "csRS/cfg1.example.net:27019,cfg2.example.net:27019,cfg2.example.net:27019", "lastSeenConfigServerOpTime" : { "ts" : <timestamp>, "t" : NumberLong(<num>) }, "maxChunkSizeInBytes" : NumberLong(<num>) }
sharding
A document with data regarding the sharded cluster. 包含有关分片集群的数据的文档。The lastSeenConfigServerOpTime
is present only for a mongos
or a shard member, not for a config server.lastSeenConfigServerOpTime
仅适用于mongos
或shard成员,而不适用于配置服务器。
sharding.lastSeenConfigServerOpTime
The latest optime of the CSRS primary that the mongos
or the shard member has seen. The optime document includes:mongos
或shard成员所看到的CSRS主要的最新优化。optime文档包括:
ts
, the Timestamp of the operation.t
, the term
in which the operation was originally generated on the primary.The 只有当分片集群使用CSRS时,lastSeenConfigServerOpTime
is present only if the sharded cluster uses CSRS.lastSeenConfigServerOpTime
才会出现。
sharding.maxChunkSizeInBytes
The maximum size limit for a chunk. 块的最大大小限制。If the chunk size has been updated recently on the config server, the 如果最近在配置服务器上更新了块大小,则maxChunkSizeInBytes
may not reflect the most recent value.maxChunkSizeInBytes
可能不会反映最新的值。
New in version 4.0.在版本4.0中新增。
When run on a member of a shard:在分片的成员上运行时:
"shardingStatistics" : { "countStaleConfigErrors" : NumberLong(<num>), "countDonorMoveChunkStarted" : NumberLong(<num>), "totalDonorChunkCloneTimeMillis" : NumberLong(<num>), "totalCriticalSectionCommitTimeMillis" : NumberLong(<num>), "totalCriticalSectionTimeMillis" : NumberLong(<num>), "countDocsClonedOnRecipient" : NumberLong(<num>), "countDocsClonedOnDonor" : NumberLong(<num>), "countRecipientMoveChunkStarted" : NumberLong(<num>), "countDocsDeletedOnDonor" : NumberLong(<num>), "countDonorMoveChunkLockTimeout" : NumberLong(<num>), "unfinishedMigrationFromPreviousPrimary" : NumberLong(<num>), "catalogCache" : { "numDatabaseEntries" : NumberLong(<num>), "numCollectionEntries" : NumberLong(<num>), "countStaleConfigErrors" : NumberLong(<num>), "totalRefreshWaitTimeMicros" : NumberLong(<num>), "numActiveIncrementalRefreshes" : NumberLong(<num>), "countIncrementalRefreshesStarted" : NumberLong(<num>), "numActiveFullRefreshes" : NumberLong(<num>), "countFullRefreshesStarted" : NumberLong(<num>), "countFailedRefreshes" : NumberLong(<num>) }, "rangeDeleterTasks" : <num>, "resharding" : { "countReshardingOperations" : NumberLong(<num>), "countReshardingSuccessful" : NumberLong(<num>), "countReshardingFailures" : NumberLong(<num>), "countReshardingCanceled" : NumberLong(<num>), "totalOperationTimeElapsedMillis" : NumberLong(<num>), "remainingOperationTimeEstimatedMillis" : NumberLong(<num>), "approxDocumentsToCopy" : NumberLong(<num>), "documentsCopied" : NumberLong(<num>), "approxBytesToCopy" : NumberLong(<num>), "bytesCopied" : NumberLong(<num>), "totalCopyTimeElapsedMillis" : NumberLong(<num>), "oplogEntriesFetched" : NumberLong(<num>), "oplogEntriesApplied" : NumberLong(<num>), "totalApplyTimeElapsedMillis" : NumberLong(<num>), "countWritesDuringCriticalSection" : NumberLong(<num>), "totalCriticalSectionTimeElapsedMillis" : NumberLong(<num>), "donorState" : <num>, "recipientState" : <num>, "coordinatorState" : <num>, "opStatus" : <num>, "lastOpEndingChunkImbalance": NumberLong(<num>) } },
When run on a 在mongos
:mongos
上运行时:
"shardingStatistics" : { "numHostsTargeted": { "find" : { "allShards": NumberLong(<num>), "manyShards": NumberLong(<num>), "oneShard": NumberLong(<num>), "unsharded": NumberLong(<num>) }, "insert": { "allShards": NumberLong(<num>), "manyShards": NumberLong(<num>), "oneShard": NumberLong(<num>), "unsharded": NumberLong(<num>) }, "update": { "allShards": NumberLong(<num>), "manyShards": NumberLong(<num>), "oneShard": NumberLong(<num>), "unsharded": NumberLong(<num>) }, "delete": { "allShards": NumberLong(<num>), "manyShards": NumberLong(<num>), "oneShard": NumberLong(<num>), "unsharded": NumberLong(<num>) }, "aggregate": { "allShards": NumberLong(<num>), "manyShards": NumberLong(<num>), "oneShard": NumberLong(<num>), "unsharded": NumberLong(<num>) } } }, "catalogCache" : { "numDatabaseEntries" : NumberLong(<num>), "numCollectionEntries" : NumberLong(<num>), "countStaleConfigErrors" : NumberLong(<num>), "totalRefreshWaitTimeMicros" : NumberLong(<num>), "numActiveIncrementalRefreshes" : NumberLong(<num>), "countIncrementalRefreshesStarted" : NumberLong(<num>), "numActiveFullRefreshes" : NumberLong(<num>), "countFullRefreshesStarted" : NumberLong(<num>), "countFailedRefreshes" : NumberLong(<num>), "operationsBlockedByRefresh" : { "countAllOperations" : NumberLong(<num>), "countInserts" : NumberLong(<num>), "countQueries" : NumberLong(<num>), "countUpdates" : NumberLong(<num>), "countDeletes" : NumberLong(<num>), "countCommands" : NumberLong(<num>) } } },
shardingStatistics
A document which contains metrics on metadata refresh on sharded clusters.包含分片集群元数据刷新指标的文档。
shardingStatistics.countStaleConfigErrors
The total number of times that threads hit stale config exception. 线程遇到过时配置异常的总次数。Since a stale config exception triggers a refresh of the metadata, this number is roughly proportional to the number of metadata refreshes.由于过时的配置异常会触发元数据的刷新,因此这个数字与元数据刷新的次数大致成正比。
Only present when run on a shard.仅在分片上运行时出现。
shardingStatistics.countDonorMoveChunkStarted
The total number of times that the 作为块迁移过程的一部分,moveChunk
command has started on the shard, of which this node is a member, as part of a chunk migration process. moveChunk
命令在该节点所属的分片上启动的总次数。This increasing number does not consider whether the chunk migrations succeed or not.这个不断增加的数字并不考虑区块迁移是否成功。
Only present when run on a shard.仅在分片上运行时出现。
shardingStatistics.totalDonorChunkCloneTimeMillis
The cumulative time, in milliseconds, taken by the clone phase of the chunk migrations from this shard, of which this node is a member. 从该分片(该节点是该分片的成员)进行区块迁移的克隆阶段所用的累积时间(以毫秒为单位)。Specifically, for each migration from this shard, the tracked time starts with the 具体来说,对于从该分片进行的每次迁移,跟踪时间从moveChunk
command and ends before the destination shard enters a catch-up phase to apply changes that occurred during the chunk migrations.moveChunk
命令开始,在目标分片进入追赶阶段以应用块迁移期间发生的更改之前结束。
Only present when run on a shard.
shardingStatistics.totalCriticalSectionCommitTimeMillis
The cumulative time, in milliseconds, taken by the update metadata phase of the chunk migrations from this shard, of which this node is a member. 从该分片(该节点是该分片的成员)迁移块的更新元数据阶段所用的累积时间(以毫秒为单位)。During the update metadata phase, all operations on the collection are blocked.在更新元数据阶段,集合上的所有操作都被阻止。
Only present when run on a shard.仅在分片上运行时出现。
shardingStatistics.totalCriticalSectionTimeMillis
The cumulative time, in milliseconds, taken by the catch-up phase and the update metadata phase of the chunk migrations from this shard, of which this node is a member.从该分片(该节点是该分片的成员)迁移块的追赶阶段和更新元数据阶段所用的累积时间(以毫秒为单位)。
To calculate the duration of the catch-up phase, subtract 要计算追赶阶段的持续时间,请从totalCriticalSectionCommitTimeMillis
from totalCriticalSectionTimeMillis
:totalCriticalSectionTimeMillis
中减去totalCriticalSectionCommitTimeMillis
:
totalCriticalSectionTimeMillis - totalCriticalSectionCommitTimeMillis
Only present when run on a shard.仅在分片上运行时出现。
shardingStatistics.countDocsClonedOnRecipient
Cumulative, always-increasing count of documents that have been cloned on this member where it acted as the primary of the recipient shard.在该成员作为接收方分片的主要成员的位置上,已克隆的文档的累积计数始终在增加。
Only present when run on a shard.仅在分片上运行时出现。
New in version 4.2.在版本4.2中新增。
shardingStatistics.countDocsClonedOnDonor
Cumulative, always-increasing count of documents that haves been cloned on this member where it acted as the primary of the donor shard.累积的,总是不断增加的文档在这个成员上被克隆的数量,它作为供体分片的主要部分。
Only present when run on a shard.仅在分片上运行时出现。
New in version 4.2.在版本4.2中新增。
shardingStatistics.countRecipientMoveChunkStarted
Cumulative, always-increasing count of chunks this member, acting as the primary of the recipient shard, has started to receive (whether the move has succeeded or not).该成员作为接收方分片的主要成员,已开始接收的块的数量(无论移动是否成功)是累积的,总是递增的。
Only present when run on a shard.
New in version 4.2.在版本4.2中新增。
shardingStatistics.countDocsDeletedOnDonor
Cumulative, always-increasing count of documents that have been deleted on this member during chunk migration where the member acted as the primary of the donor shard.在区块迁移过程中,该成员作为施主分片的主要成员,因此该成员上已删除的文档数量一直在增加。
Only present when run on a shard.仅在分片上运行时出现。
New in version 4.2.在版本4.2中新增。
shardingStatistics.countDonorMoveChunkLockTimeout
Cumulative, always-increasing count of chunk migrations that were aborted due to lock acquisition timeouts, where the member acted as the primary of the donor shard.由于锁获取超时而中止的块迁移的累积计数始终在增加,其中成员充当施主分片的主要成员。
Only present when run on a shard.
New in version 4.2.在版本4.2中新增。
shardingStatistics.unfinishedMigrationFromPreviousPrimary
The number of unfinished migrations left by the previous primary after an election. 选举后前一次初选留下的未完成移民数量。This value is only updated after the newly-elected 该值仅在新当选的mongod
completes the transition to primary.mongod
完成向主节点的转换后更新。
Only present when run on a shard.仅在分片上运行时出现。
New in version 4.4.在版本4.4中新增。
shardingStatistics.catalogCache
A document with statistics about the cluster's routing information cache.包含有关群集路由信息缓存的统计信息的文档。
shardingStatistics.catalogCache.numDatabaseEntries
The total number of database entries that are currently in the catalog cache.当前在目录缓存中的数据库条目总数。
shardingStatistics.catalogCache.numCollectionEntries
The total number of collection entries (across all databases) that are currently in the catalog cache.当前在目录缓存中的集合项总数(跨所有数据库)。
shardingStatistics.catalogCache.countStaleConfigErrors
The total number of times that threads hit stale config exception. 线程遇到过时配置异常的总次数。A stale config exception triggers a refresh of the metadata.过时的配置异常会触发元数据的刷新。
shardingStatistics.catalogCache.totalRefreshWaitTimeMicros
The cumulative time, in microseconds, that threads had to wait for a refresh of the metadata.线程必须等待元数据刷新的累积时间(以微秒为单位)。
shardingStatistics.catalogCache.numActiveIncrementalRefreshes
The number of incremental catalog cache refreshes that are currently waiting to complete.当前等待完成的增量目录缓存刷新数。
shardingStatistics.countIncrementalRefreshesStarted
The cumulative number of incremental refreshes that have started.已开始的增量刷新的累积次数。
shardingStatistics.catalogCache.numActiveFullRefreshes
The number of full catalog cache refreshes that are currently waiting to complete.当前等待完成的完整目录缓存刷新数。
shardingStatistics.catalogCache.countFullRefreshesStarted
The cumulative number of full refreshes that have started.已开始的完整刷新的累积次数。
shardingStatistics.catalogCache.countFailedRefreshes
The cumulative number of full or incremental refreshes that have failed.失败的完整或增量刷新的累积次数。
shardingStatistics.rangeDeleterTasks
The current total of the queued chunk range deletion tasks that are ready to run or are running as part of the chunk migration process.已准备好运行或作为块迁移过程的一部分正在运行的队列块范围删除任务的当前总数。
Inspect the documents in the 检查config.rangeDeletions
collection for information about the chunk ranges pending deletion from a shard after a chunk migration.config.rangeDeletions
集合中的文档,以获取有关块迁移后从分片中删除的块范围的信息。
Only present when run on a shard member.仅在分片成员上运行时出现。
New in version 4.4.在版本4.4中新增。
shardingStatistics.catalogCache.operationsBlockedByRefresh
A document with statistics about operations blocked by catalog cache refresh activity on a 包含mongos
.mongos
上目录缓存刷新活动阻止的操作统计信息的文档。
Only present when run on a mongos
.
New in version 4.2.7.在版本4.2.7中新增。
shardingStatistics.catalogCache.operationsBlockedByRefresh.countAllOperations
The cumulative number of all operations ran on a 在mongos
that were blocked at any point in their lifetime by a refresh of the catalog cache. mongos
上运行的所有操作的累积数量,这些操作在其生命周期内的任何时间点都被目录缓存的刷新所阻止。This counter is the aggregate sum of all other 此计数器是下面跟踪的所有其他操作operationsBlockedByRefresh
metrics tracked below.operationsBlockedByRefresh
度量的总和。
Only present when run on a 只有在mongos
.mongos
上运行时才出现。
New in version 4.2.7.在版本4.2.7中新增。
shardingStatistics.catalogCache.operationsBlockedByRefresh.countInserts
The cumulative number of insert operations ran on a 在mongo上运行的插入操作的累积数量,这些操作在其生命周期内的任何时间点都被目录缓存的刷新所阻止。mongos
that were blocked at any point in their lifetime by a refresh of the catalog cache.
Only present when run on a 只有在mongos
.mongos
上运行时才出现。
New in version 4.2.7.在版本4.2.7中新增。
shardingStatistics.catalogCache.operationsBlockedByRefresh.countQueries
The cumulative number of query operations ran on a 在mongos
that were blocked at any point in their lifetime by a refresh of the catalog cache.mongos
上运行的查询操作的累积数量,这些操作在其生命周期的任何时间点都被目录缓存的刷新所阻止。
Only present when run on a 只有在mongos
.mongos
上运行时才出现。
New in version 4.2.7.在版本4.2.7中新增。
shardingStatistics.catalogCache.operationsBlockedByRefresh.countUpdates
The cumulative number of update operations ran on a 在mongos
that were blocked at any point in their lifetime by a refresh of the catalog cache.mongos
上运行的更新操作的累积数量,这些操作在其生命周期的任何时间点都被目录缓存的刷新所阻止。
Only present when run on a 只有在mongos
.mongos
上运行时才出现。
New in version 4.2.7.在版本4.2.7中新增。
shardingStatistics.catalogCache.operationsBlockedByRefresh.countDeletes
The cumulative number of delete operations ran on a 在mongos
that were blocked at any point in their lifetime by a refresh of the catalog cache.mongos
上运行的删除操作的累积数量,这些操作在其生命周期的任何时间点都被目录缓存的刷新所阻止。
Only present when run on a 只有在mongos
.mongos
上运行时才出现。
New in version 4.2.7.在版本4.2.7中新增。
shardingStatistics.catalogCache.operationsBlockedByRefresh.countCommands
The cumulative number of command operations ran on a 在mongos
that were blocked at any point in their lifetime by a refresh of the catalog cache.mongos
上运行的命令操作的累积数量,这些操作在其生命周期的任何时间点都被目录缓存的刷新所阻止。
Only present when run on a 只有在mongos
.mongos
上运行时才出现。
New in version 4.2.7.在版本4.2.7中新增。
shardingStatistics.resharding
A document with statistics about resharding operations.包含有关重新分片操作的统计信息的文档。
Each shard returns its own resharding operation statistics. 每个分片都返回自己的重新排序操作统计信息。If a shard is not involved in a resharding operation, then that shard will not contain statistics about the resharding operation.如果一个分片不参与重新分配操作,那么该分片将不包含有关重新分配操作的统计信息。
Only present when run on a shard or config server.仅在shard或config服务器上运行时出现。
New in version 5.0.在版本5.0中新增。
shardingStatistics.resharding.countReshardingOperations
The sum of countReshardingSuccessful
, countReshardingFailures
, and countReshardingCanceled
. countReshardingSuccessful
、countReshardingFailures
和countReshardingCanceled
的总和。The sum is further incremented by 如果重新分片操作已开始但尚未完成,则该总和将进一步增加1
if a resharding operation has started but has not yet completed. 1
。Sum is set to 0 when mongod
is started or restarted.mongod
启动或重新启动时,Sum设置为0。
Only present when run on a shard or config server.仅在shard或config服务器上运行时出现。
New in version 5.0.在版本5.0中新增。
shardingStatistics.resharding.countReshardingSuccessful
Number of successful resharding operations. 成功的重新分片操作数。Number is set to 0 when 当mongod
is started or restarted.mongod
启动或重新启动时,数字设置为0。
Only present when run on a shard or config server.只有在mongos
上运行时才出现。
New in version 5.0.在版本5.0中新增。
shardingStatistics.resharding.countReshardingFailures
Number of failed resharding operations. 失败的重新分片操作数。Number is set to 0 when 当mongod
is started or restarted.mongod
启动或重新启动时,数字设置为0。
Only present when run on a shard or config server.只有在mongos
上运行时才出现。
New in version 5.0.在版本5.0中新增。
shardingStatistics.resharding.countReshardingCanceled
Number of canceled resharding operations. 取消的重新分片操作数。Number is set to 0 when 当mongod
is started or restarted.mongod
启动或重新启动时,数字设置为0。
Only present when run on a shard or config server.只有在mongos
上运行时才出现。
New in version 5.0.在版本5.0中新增。
shardingStatistics.resharding.totalOperationTimeElapsedMillis
Total elapsed time, in milliseconds, for the current resharding operation. 当前重新分片操作的总运行时间(以毫秒为单位)。Time is set to 0 when a new resharding operation starts.新的重新发货操作开始时,时间设置为0。
Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。
New in version 5.0.在版本5.0中新增。
shardingStatistics.resharding.remainingOperationTimeEstimatedMillis
Estimated remaining time, in milliseconds, for the current resharding operation. 当前重新装载操作的估计剩余时间(毫秒)。Time is set to 0 when a new resharding operation starts.新的重新分片操作开始时,时间设置为0。
Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。
New in version 5.0.在版本5.0中新增。
shardingStatistics.resharding.approxDocumentsToCopy
Approximate number of documents to copy from donor shards to recipient shards for the current resharding operation. 当前重新分版操作中要从供体分片复制到接收方分片的文档的大致数量。Number is an estimate that is set when the resharding operation starts and the number is not updated as the operation progresses. 数字是重新发货操作开始时设置的估计值,并且随着操作的进行,数字不会更新。Number is set to 0 when a new resharding operation starts.新的重新发货操作开始时,编号设置为0。
Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。
New in version 5.0.在版本5.0中新增。
shardingStatistics.resharding.documentsCopied
Number of documents copied from donor shards to recipient shards for the current resharding operation. 为当前重新分片操作从供体分片复制到接收方分片的文档数。Number is set to 0 when a new resharding operation starts.新的重新发货操作开始时,编号设置为0。
Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。
New in version 5.0.在版本5.0中新增。
shardingStatistics.resharding.approxBytesToCopy
Approximate number of bytes to copy from donor shards to recipient shards for the current resharding operation. 对于当前重新分片操作,要从施主分片复制到接收方分片的大约字节数。Number is an estimate that is set when the resharding operation starts and the number is not updated as the operation progresses. 数字是重新发货操作开始时设置的估计值,并且随着操作的进行,数字不会更新。Number is set to 0 when a new resharding operation starts.新的重新发货操作开始时,编号设置为0。
Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。
New in version 5.0.在版本5.0中新增。
shardingStatistics.resharding.bytesCopied
Number of bytes copied from donor shards to recipient shards for the current resharding operation. 当前重新分版操作从施主分片复制到接收方分片的字节数。Number is set to 0 when a new resharding operation starts.新的重新发货操作开始时,编号设置为0。
Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。
New in version 5.0.在版本5.0中新增。
shardingStatistics.resharding.totalCopyTimeElapsedMillis
Total elapsed time, in milliseconds, for ongoing data copy tasks from donor shards to recipient shards for the current resharding operation. 当前重新分版操作中,从施主分片到接收方分片的持续数据复制任务的总运行时间(以毫秒为单位)。Time is set to 0 when a new resharding operation starts.新的重新发货操作开始时,时间设置为0。
Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。
New in version 5.0.在版本5.0中新增。
shardingStatistics.resharding.oplogEntriesFetched
Number of entries fetched from the oplog for the current resharding operation. 从oplog中为当前重新分片操作提取的条目数。Number is set to 0 when a new resharding operation starts.新的重新发货操作开始时,编号设置为0。
Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。
shardingStatistics.resharding.oplogEntriesApplied
Number of entries applied to the oplog for the current resharding operation. 应用于当前重新包装操作的oplog的条目数。Number is set to 0 when a new resharding operation starts.新的重新发货操作开始时,编号设置为0。
Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。
New in version 5.0.在版本5.0中新增。
shardingStatistics.resharding.totalApplyTimeElapsedMillis
Total elapsed time, in milliseconds, for the apply step of the current resharding operation. 当前重新分片操作的应用步骤的总运行时间(以毫秒为单位)。In the apply step, recipient shards modify their data based on new incoming writes from donor shards. 在应用步骤中,接收方分片根据来自施主分片的新传入写入修改其数据。Time is set to 0 when a new resharding operation starts.新的重新发货操作开始时,时间设置为0。
Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。
New in version 5.0.在版本5.0中新增。
shardingStatistics.resharding.countWritesDuringCriticalSection
Number of writes perfomed in the critical section for the current resharding operation. 当前重新分版操作的关键部分中执行的写入次数。The critical section prevents new incoming writes to the collection currently being resharded. 关键部分阻止对当前正在重新保护的集合进行新的传入写入。Number is set to 0 when a new resharding operation starts.新的重新发货操作开始时,编号设置为0。
Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。
New in version 5.0.在版本5.0中新增。
shardingStatistics.resharding.totalCriticalSectionTimeElapsedMillis
Total elapsed time, in milliseconds, for the critical section of the current resharding operation. 当前重新分片操作的关键部分的总运行时间(以毫秒为单位)。The critical section prevents new incoming writes to the collection currently being resharded. 关键部分阻止对当前正在重新保护的集合进行新的传入写入。Time is set to 0 when a new resharding operation starts.新的重新发货操作开始时,时间设置为0。
Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。
New in version 5.0.在版本5.0中新增。
shardingStatistics.resharding.donorState
State of the donor shard for the current resharding operation. 当前重新分版操作的施主分片的状态。Number is set to 0 when a new resharding operation starts.新的重新发货操作开始时,编号设置为0。
0 | unused | |
1 | preparing-to-donate | |
2 | donating-initial-data | |
3 | donating-oplog-entries | |
4 | preparing-to-block-writes | |
5 | error | |
6 | blocking-writes | |
7 | done |
Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。
New in version 5.0.在版本5.0中新增。
shardingStatistics.resharding.recipientState
State of the recipient shard for the current resharding operation. 当前重新分版操作的接收方分片的状态。Number is set to 0 when a new resharding operation starts.新的重新发货操作开始时,编号设置为0。
0 | unused | |
1 | awaiting-fetch-timestamp | |
2 | creating-collection | |
3 | cloning | |
4 | applying | |
5 | error | |
6 | strict-consistency | |
7 | done |
Only present when run on a shard or config server. 仅在shard或config服务器上运行时出现。Returns 0 on a config server.在配置服务器上返回0。
New in version 5.0.在版本5.0中新增。
shardingStatistics.numHostsTargeted
Indicates the number of shards targeted for 指示CRUD
operations and aggregation commands. CRUD
操作和聚合命令的目标分片数。When a 运行CRUD
operation or aggregation command is run, the following metrics will be incremented.CRUD
操作或聚合命令时,以下指标将递增。
allShards | |
manyShards | |
oneShard | |
unsharded |
Running the 在serverStatus
command on mongos
will provide insight into the CRUD and aggregation operations that run on a sharded cluster.mongos
上运行serverStatus
命令将深入了解在分片化集群上运行的CRUD和聚合操作。
Multi-shard operations can either be scatter-gather or shard specific. 多分片操作可以是分散聚集或分片特定的。Multi-shard scatter-gather operations can consume more resources. 多分片分散聚集操作可能会消耗更多资源。By using the 通过使用shardingStatistics.numHostsTargeted
metrics you can tune the aggregation queries that run on a sharded cluster.shardingStatistics.numHostsTargeted
度量,您可以调整在分片集群上运行的聚合查询。
shardingStatistics.resharding.coordinatorState
State of the resharding coordinator for the current resharding operation. 当前重新分片操作的重新发货协调员的状态。The resharding coordinator is a thread that runs on the config server primary. 重新分片协调器是在配置服务器主服务器上运行的线程。Number is set to 0 when a new resharding operation starts.新的重新发货操作开始时,编号设置为0。
0 | unused | |
1 | initializing | config.reshardingOperations and has added the reshardingFields to the config.collections entry for the original collection.config.reshardingOperations 中,并已将reshardingFields 添加到原始集合的config.collections 条目中。 |
2 | preparing-to-donate |
|
3 | cloning | |
4 | applying | |
5 | blocking-writes | |
6 | aborting | abortReshardCollection command (or the sh.abortReshardCollection() method) was run. abortReshardCollection 命令(或sh.abortReshardCollection() 方法)时发生不可恢复的错误。 |
6 | committing | config.collections entry for the temporary resharding collection. config.collections 条目。recipientFields to the source collection's entry. recipientFields 添加到源集合的条目中。 |
Only present when run on a shard or config server.仅在shard或config服务器上运行时出现。
New in version 5.0.在版本5.0中新增。
shardingStatistics.resharding.opStatus
Status for the current resharding operation.当前重新分片操作的状态。
-1 | |
0 | |
1 | |
2 |
Only present when run on a shard or config server.
New in version 5.0.在版本5.0中新增。
shardingStatistics.resharding.lastOpEndingChunkImbalance
This field contains the highest numeric difference for (此字段包含由最近重新分片操作处理的集合的所有区域中(maxNumChunksInShard - minNumChunksInShard
) among all zones for the collection that was processed by the most recent resharding operation.maxNumChunksInShard - minNumChunksInShard
)的最大数值差异。
See Chunk Size.请参见块大小。
Only updated on config servers.仅在配置服务器上更新。
New in version 5.0.在版本5.0中新增。
"shardedIndexConsistency" : { "numShardedCollectionsWithInconsistentIndexes" : NumberLong(<num>) },
shardedIndexConsistency
Available only on config server instances.仅在配置服务器实例上可用。
A document that returns results of index consistency checks for sharded collections.返回分片集合索引一致性检查结果的文档。
The returned metrics are meaningful only when run on the primary of the config server replica set for a version 4.4+ (and 4.2.6+) sharded cluster.只有在4.4+(和4.2.6+)版本分片化集群的配置服务器副本集的主副本上运行时,返回的度量才有意义。
enableShardedIndexConsistencyCheck
shardedIndexConsistencyCheckIntervalMS
New in version 4.4. (and 4.2.6)
shardedIndexConsistency.numShardedCollectionsWithInconsistentIndexes
Available only on config server instances.仅在配置服务器实例上可用。
Number of sharded collections whose indexes are inconsistent across the shards. 索引在分片中不一致的分片集合数。A sharded collection has an inconsistent index if the collection does not have the exact same indexes (including the index options) on each shard that contains chunks for the collection.如果分片集合在包含集合块的每个分片上没有完全相同的索引(包括索引选项),则分片集合具有不一致的索引。
To investigate if a sharded collection has inconsistent indexes, see Find Inconsistent Indexes across Shards.若要调查分片化集合是否具有不一致的索引,请参阅查找分片中的不一致索引。
The returned metrics are meaningful only when run on the primary of the config server replica set for a version 4.4+ (and 4.2.6+) sharded cluster.只有在4.4+(和4.2.6+)版本分片化集群的配置服务器副本集的主副本上运行时,返回的度量才有意义。
enableShardedIndexConsistencyCheck
shardedIndexConsistencyCheckIntervalMS
New in version 4.4. (and 4.2.6)
"storageEngine" : { "name" : <string>, "supportsCommittedReads" : <boolean>, "persistent" : <boolean> },
storageEngine.supportsCommittedReads
A boolean that indicates whether the storage engine supports 一个布尔值,指示存储引擎是否支持"majority"
read concern."majority"
读取关注。
storageEngine.persistent
A boolean that indicates whether the storage engine does or does not persist data to disk.一个布尔值,指示存储引擎是否将数据持久化到磁盘。
"transactions" : { "retriedCommandsCount" : NumberLong(<num>), "retriedStatementsCount" : NumberLong(<num>), "transactionsCollectionWriteCount" : NumberLong(<num>), "currentActive" : NumberLong(<num>), "currentInactive" : NumberLong(<num>), "currentOpen" : NumberLong(<num>), "totalAborted" : NumberLong(<num>), "totalCommitted" : NumberLong(<num>), "totalStarted" : NumberLong(<num>), "totalPrepared" : NumberLong(<num>), "totalPreparedThenCommitted" : NumberLong(<num>), "totalPreparedThenAborted" : NumberLong(<num>), "currentPrepared" : NumberLong(<num>), "lastCommittedTransaction" : <document> // Starting in 4.2.2 (and 4.0.9) },
New in version 4.2.
"transactions" : { "currentOpen" : NumberLong(<num>), // Starting in 4.2.1 "currentActive" : NumberLong(<num>), // Starting in 4.2.1 "currentInactive" : NumberLong(<num>), // Starting in 4.2.1 "totalStarted" : NumberLong(<num>), "totalCommitted" : NumberLong(<num>), "totalAborted" : NumberLong(<num>), "abortCause" : { <String1> : NumberLong(<num>), <String2>" : NumberLong(<num>), ... }, " totalContactedParticipants" : NumberLong(<num>), " totalParticipantsAtCommit" : NumberLong(<num>), " totalRequestsTargeted" : NumberLong(<num>), " commitTypes" : { " noShards" : { " initiated" : NumberLong(<num>), " successful" : NumberLong(<num>), " successfulDurationMicros" : NumberLong(<num>) }, " singleShard" : { " initiated" : NumberLong(<num>), " successful" : NumberLong(<num>), " successfulDurationMicros" : NumberLong(<num>) }, " singleWriteShard" : { " initiated" : NumberLong(<num>), " successful" : NumberLong(<num>), " successfulDurationMicros" : NumberLong(<num>) }, " readOnly" : { " initiated" : NumberLong(<num>), " successful" : NumberLong(<num>), " successfulDurationMicros" : NumberLong(<num>) }, " twoPhaseCommit" : { " initiated" : NumberLong(<num>), " successful" : NumberLong(<num>), " successfulDurationMicros" : NumberLong(<num>) }, " recoverWithToken" : { " initiated" : NumberLong(<num>), " successful" : NumberLong(<num>), " successfulDurationMicros" : NumberLong(<num>) } } },
transactions
Available on mongod in 3.6.3+ and on mongos in 4.2+.在3.6.3+版本的mongod
和4.2+版本的mongo上提供。
When run on a 在mongod
, a document with data about the retryable writes and transactions.mongod
上运行时,包含可重试写入和事务数据的文档。
When run on a 当在mongos
, a document with data about the transactions run on the instance.mongos
上运行时,包含事务数据的文档在实例上运行。
transactions.retriedCommandsCount
Available on mongod only.仅在mongod
上可用。
The total number of retry attempts that have been received after the corresponding retryable write command has already been committed. 已提交相应的可重试写入命令后收到的重试尝试总数。That is, a retryable write is attempted even though the write has previously succeeded and has an associated record for the transaction and session in the 也就是说,即使写入之前已成功,并且在config.transactions
collection, such as when the initial write response to the client is lost.config.transactions
集合中具有事务和会话的关联记录,例如当对客户端的初始写入响应丢失时,也会尝试可重试的写入。
MongoDB does not re-execute the committed writes.MongoDB不会重新执行提交的写入。
The total is across all sessions.所有会话的总数。
The total does not include any retryable writes that may happen internally as part of a chunk migration.总数不包括作为块迁移的一部分可能在内部发生的任何可重试写入。
transactions.retriedStatementsCount
Available on mongod only.仅在mongod
上可用。
The total number of write statements associated with the retried commands in 与transactions.retriedCommandsCount
.transactions.retriedCommandsCount
中重试的命令关联的写入语句总数。
MongoDB does not re-execute the committed writes.MongoDB不会重新执行提交的写入。
The total does not include any retryable writes that may happen internally as part of a chunk migration.总数不包括作为块迁移的一部分可能在内部发生的任何可重试写入。
transactions.transactionsCollectionWriteCount
Available on mongod only.仅在mongod
上可用。
The total number of writes to the 提交新的可重试写入语句时触发的对config.transactions
collection, triggered when a new retryable write statement is committed.config.transactions
集合的写入总数。
For update and delete commands, since only single document operations are retryable, there is one write per statement.对于update和delete命令,由于只能重试单个文档操作,因此每个语句只有一次写入。
For insert operations, there is one write per batch of documents inserted, except when a failure leads to each document being inserted separately.对于插入操作,每插入一批文档就有一次写入,除非失败导致每个文档被单独插入。
The total includes writes to a server's 总数包括作为迁移的一部分发生的对服务器的config.transactions
collection that occur as part of a migration.config.transactions
集合的写入。
transactions.currentActive
Available on mongod in 4.0.2+ and mongos in 4.2.1+在mongod
4.0.2+和mongos
4.2.1中提供+
The total number of open transactions currently executing a command.当前执行命令的打开事务总数。
transactions.currentInactive
Available on mongod in 4.0.2+ and mongos in 4.2.1+在mongod
4.0.2+和mongos
4.2.1中提供+
The total number of open transactions that are not currently executing a command.当前未执行命令的打开事务的总数。
transactions.currentOpen
Available on mongod in 4.0.2+ and mongos in 4.2.1+在mongod
4.0.2+和mongos
4.2.1中提供+
The total number of open transactions. 未结事务的总数。A transaction is opened when the first command is run as a part of that transaction, and stays open until the transaction either commits or aborts.当第一个命令作为事务的一部分运行时,事务被打开,并保持打开状态,直到事务提交或中止。
transactions.totalAborted
Available on mongod in 4.0.2+ and mongos in 4.2+.在mongod
4.0.2+版本和mongos
4.2+版本中提供。
For the 对于mongod
, the total number of transactions aborted on this instance since its last startup.mongod
,此实例自上次启动以来中止的事务总数。
For the 对于mongos
, the total number of transactions aborted through this instance since its last startup.mongos
,自上次启动以来通过该实例中止的事务总数。
transactions.totalCommitted
Available on mongod in 4.0.2+ and mongos in 4.2+.在mongod
4.0.2+版本和mongos
4.2+版本中提供。
For the 对于mongod
, the total number of transactions committed on the instance since its last startup.mongod
,是自上次启动以来在实例上提交的事务总数。
For the 对于mongos
,the total number of transactions committed through this instance since its last startup.mongos
,自上次启动以来通过该实例提交的事务总数。
transactions.totalStarted
Available on mongod in 4.0.2+ and mongos in 4.2+.在mongod
4.0.2+版本和mongos
4.2+版本中提供。
For the 对于mongod
, the total number of transactions started on this instance since its last startup.mongod
,此实例自上次启动以来启动的事务总数。
For the 对于mongos
, the total number of transactions started on this instance since its last startup.mongos
,自上次启动以来,在该实例上启动的事务总数。
transactions.abortCause
Available on mongos only.仅在mongos
上可用。
Breakdown of the transactions.totalAborted
by cause. transactions.totalAborted
按原因中止。If a client issues an explicit 如果客户端发出明确的abortTransaction
, the cause is listed as abort
.abortTransaction
,则原因列为abort
。
For example:例如:
"totalAborted" : NumberLong(5), "abortCause" : { "abort" : NumberLong(1), "DuplicateKey" : NumberLong(1), "StaleConfig" : NumberLong(3), "SnapshotTooOld" : NumberLong(1) },
New in version 4.2.在版本4.2中新增。
transactions.totalContactedParticipants
Available on mongos only.仅在mongos
上可用。
The total number of shards contacted for all transactions started through this 自上次启动以来,通过此mongos
since its last startup.mongos
启动的所有事务所接触的分片总数。
The number of shards contacted during the transaction processes can include those shards that may not be included as part of the commit.在事务处理过程中接触的分片数量可以包括那些可能不包含在提交中的分片。
New in version 4.2.在版本4.2中新增。
transactions.totalParticipantsAtCommit
Available on mongos only.仅在mongos
上可用。
Total number of shards involved in the commit for all transactions started through this 自上次启动以来,通过此mongos
since its last startup.mongos
启动的所有事务的提交所涉及的分片总数。
New in version 4.2.在版本4.2中新增。
transactions.totalRequestsTargeted
Available on mongos only.仅在mongos
上可用。
Total number of network requests targeted by the mongos
as part of its transactions.mongos
作为其事务的一部分所针对的网络请求总数。
New in version 4.2.在版本4.2中新增。
transactions.commitTypes
Available on mongos only.仅在mongos
上可用。
Breakdown of the commits by types. 按类型细分提交。For example:例如:
"noShards" : { "initiated" : NumberLong(0), "successful" : NumberLong(0), "successfulDurationMicros" : NumberLong(0) }, "singleShard" : { "initiated" : NumberLong(5), "successful" : NumberLong(5), "successfulDurationMicros" : NumberLong(203118) }, "singleWriteShard" : { "initiated" : NumberLong(0), "successful" : NumberLong(0), "successfulDurationMicros" : NumberLong(0) }, "readOnly" : { "initiated" : NumberLong(0), "successful" : NumberLong(0), "successfulDurationMicros" : NumberLong(0) }, "twoPhaseCommit" : { "initiated" : NumberLong(1), "successful" : NumberLong(1), "successfulDurationMicros" : NumberLong(179616) }, "recoverWithToken" : { "initiated" : NumberLong(0), "successful" : NumberLong(0), "successfulDurationMicros" : NumberLong(0) }
The types of commit are:提交的类型包括:
noShards | |
singleShard | |
singleWriteShard | |
readOnly | |
twoPhaseCommit | |
recoverWithToken |
For each commit type, the command returns the following metrics:对于每种提交类型,该命令返回以下度量:
Metrics | |
---|---|
initiated | |
successful | |
successfulDurationMicros |
New in version 4.2.在版本4.2中新增。
transactions.totalPrepared
Available on mongod only.仅在mongod
上可用。
The total number of transactions in prepared state on this server since the 自mongod
process's last startup.mongod
进程上次启动以来,此服务器上处于准备状态的事务总数。
New in version 4.2.在版本4.2中新增。
transactions.totalPreparedThenCommitted
Available on mongod only.仅在mongod
上可用。
The total number of transactions that were prepared and committed on this server since the 自mongod
process's last startup.mongod
进程上次启动以来,在此服务器上准备并提交的事务总数。
New in version 4.2.在版本4.2中新增。
transactions.totalPreparedThenAborted
Available on mongod only.仅在mongod
上可用。
The total number of transactions that were prepared and aborted on this server since the 自mongod
process's last startup.mongod
进程上次启动以来,在此服务器上准备和中止的事务总数。
New in version 4.2.在版本4.2中新增。
transactions.currentPrepared
Available on mongod only.仅在mongod
上可用。
The current number of transactions in prepared state on this server.此服务器上处于准备状态的当前事务数。
New in version 4.2.在版本4.2中新增。
transactions.lastCommittedTransaction
Available on mongod only.仅在mongod
上可用。
The details of the last transaction committed when the 当mongod
is primary.mongod
为主时提交的最后一个事务的详细信息。
When returned from a secondary, 当从次要事务返回时,lastCommittedTransaction
returns the details of the last transaction committed when that secondary was a primary.lastCommittedTransaction
返回该次要事务是主要事务时提交的最后一个事务的详细信息。
"lastCommittedTransaction" : { "operationCount" : NumberLong(1), "oplogOperationBytes" : NumberLong(211), "writeConcern" : { "w" : "majority", "wtimeout" : 0 } }
Metrics | |
---|---|
operationCount | |
oplogOperationBytes | |
writeConcern |
New in version 4.2.2.在版本4.2.2中新增。 (Also available in 4.0.9)
[2] | |
New in version 4.0.2.在版本4.0.2中新增。 (Also available in 3.6.7+ and 3.4.17+)
"transportSecurity" : { "1.0" : NumberLong(<num>), "1.1" : NumberLong(<num>), "1.2" : NumberLong(<num>), "1.3" : NumberLong(<num>), "unknown" : NumberLong(<num>) },
wiredTiger
information only appears if using the WiredTiger storage engine. Some of the statistics roll up for the server.wiredTiger
信息仅在使用WiredTiger存储引擎时显示。一些统计信息汇总到服务器上。
{ "uri" : "statistics:", "async" : { "current work queue length" : <num>, "maximum work queue length" : <num>, "number of allocation state races" : <num>, "number of flush calls" : <num>, "number of operation slots viewed for allocation" : <num>, "number of times operation allocation failed" : <num>, "number of times worker found no work" : <num>, "total allocations" : <num>, "total compact calls" : <num>, "total insert calls" : <num>, "total remove calls" : <num>, "total search calls" : <num>, "total update calls" : <num> }, "block-manager" : { "blocks pre-loaded" : <num>, "blocks read" : <num>, "blocks written" : <num>, "bytes read" : <num>, "bytes written" : <num>, "bytes written for checkpoint" : <num>, "mapped blocks read" : <num>, "mapped bytes read" : <num> }, "cache" : { "application threads page read from disk to cache count" : <num>, "application threads page read from disk to cache time (usecs)" : <num>, "application threads page write from cache to disk count" : <num>, "application threads page write from cache to disk time (usecs)" : <num>, "bytes belonging to page images in the cache" : <num>, "bytes belonging to the cache overflow table in the cache" : <num>, "bytes currently in the cache" : <num>, "bytes dirty in the cache cumulative" : <num>, "bytes not belonging to page images in the cache" : <num>, "bytes read into cache" : <num>, "bytes written from cache" : <num>, "cache overflow cursor application thread wait time (usecs)" : <num>, "cache overflow cursor internal thread wait time (usecs)" : <num>, "cache overflow score" : <num>, "cache overflow table entries" : <num>, "cache overflow table insert calls" : <num>, "cache overflow table max on-disk size" : <num>, "cache overflow table on-disk size" : <num>, "cache overflow table remove calls" : <num>, "checkpoint blocked page eviction" : <num>, "eviction calls to get a page" : <num>, "eviction calls to get a page found queue empty" : <num>, "eviction calls to get a page found queue empty after locking" : <num>, "eviction currently operating in aggressive mode" : <num>, "eviction empty score" : <num>, "eviction passes of a file" : <num>, "eviction server candidate queue empty when topping up" : <num>, "eviction server candidate queue not empty when topping up" : <num>, "eviction server evicting pages" : <num>, "eviction server slept, because we did not make progress with eviction" : <num>, "eviction server unable to reach eviction goal" : <num>, "eviction server waiting for a leaf page" : <num>, "eviction server waiting for an internal page sleep (usec)" : <num>, "eviction server waiting for an internal page yields" : <num>, "eviction state" : <num>, "eviction walk target pages histogram - 0-9" : <num>, "eviction walk target pages histogram - 10-31" : <num>, "eviction walk target pages histogram - 128 and higher" : <num>, "eviction walk target pages histogram - 32-63" : <num>, "eviction walk target pages histogram - 64-128" : <num>, "eviction walks abandoned" : <num>, "eviction walks gave up because they restarted their walk twice" : <num>, "eviction walks gave up because they saw too many pages and found no candidates" : <num>, "eviction walks gave up because they saw too many pages and found too few candidates" : <num>, "eviction walks reached end of tree" : <num>, "eviction walks started from root of tree" : <num>, "eviction walks started from saved location in tree" : <num>, "eviction worker thread active" : <num>, "eviction worker thread created" : <num>, "eviction worker thread evicting pages" : <num>, "eviction worker thread removed" : <num>, "eviction worker thread stable number" : <num>, "files with active eviction walks" : <num>, "files with new eviction walks started" : <num>, "force re-tuning of eviction workers once in a while" : <num>, "forced eviction - pages evicted that were clean count" : <num>, "forced eviction - pages evicted that were clean time (usecs)" : <num>, "forced eviction - pages evicted that were dirty count" : <num>, "forced eviction - pages evicted that were dirty time (usecs)" : <num>, "forced eviction - pages selected because of too many deleted items count" : <num>, "forced eviction - pages selected count" : <num>, "forced eviction - pages selected unable to be evicted count" : <num>, "forced eviction - pages selected unable to be evicted time" : <num>, "hazard pointer blocked page eviction" : <num>, "hazard pointer check calls" : <num>, "hazard pointer check entries walked" : <num>, "hazard pointer maximum array length" : <num>, "in-memory page passed criteria to be split" : <num>, "in-memory page splits" : <num>, "internal pages evicted" : <num>, "internal pages split during eviction" : <num>, "leaf pages split during eviction" : <num>, "maximum bytes configured" : <num>, "maximum page size at eviction" : <num>, "modified pages evicted" : <num>, "modified pages evicted by application threads" : <num>, "operations timed out waiting for space in cache" : <num>, "overflow pages read into cache" : <num>, "page split during eviction deepened the tree" : <num>, "page written requiring cache overflow records" : <num>, "pages currently held in the cache" : <num>, "pages evicted by application threads" : <num>, "pages queued for eviction" : <num>, "pages queued for eviction post lru sorting" : <num>, "pages queued for urgent eviction" : <num>, "pages queued for urgent eviction during walk" : <num>, "pages read into cache" : <num>, "pages read into cache after truncate" : <num>, "pages read into cache after truncate in prepare state" : <num>, "pages read into cache requiring cache overflow entries" : <num>, "pages read into cache requiring cache overflow for checkpoint" : <num>, "pages read into cache skipping older cache overflow entries" : <num>, "pages read into cache with skipped cache overflow entries needed later" : <num>, "pages read into cache with skipped cache overflow entries needed later by checkpoint" : <num>, "pages requested from the cache" : <num>, "pages seen by eviction walk" : <num>, "pages selected for eviction unable to be evicted" : <num>, "pages walked for eviction" : <num>, "pages written from cache" : <num>, "pages written requiring in-memory restoration" : <num>, "percentage overhead" : <num>, "tracked bytes belonging to internal pages in the cache" : <num>, "tracked bytes belonging to leaf pages in the cache" : <num>, "tracked dirty bytes in the cache" : <num>, "tracked dirty pages in the cache" : <num>, "unmodified pages evicted" : <num> }, "capacity" : { "background fsync file handles considered" : <num>, "background fsync file handles synced" : <num>, "background fsync time (msecs)" : <num>, "bytes read" : <num>, "bytes written for checkpoint" : <num>, "bytes written for eviction" : <num>, "bytes written for log" : <num>, "bytes written total" : <num>, "threshold to call fsync" : <num>, "time waiting due to total capacity (usecs)" : <num>, "time waiting during checkpoint (usecs)" : <num>, "time waiting during eviction (usecs)" : <num>, "time waiting during logging (usecs)" : <num>, "time waiting during read (usecs)" : <num> }, "connection" : { "auto adjusting condition resets" : <num>, "auto adjusting condition wait calls" : <num>, "detected system time went backwards" : <num>, "files currently open" : <num>, "memory allocations" : <num>, "memory frees" : <num>, "memory re-allocations" : <num>, "pthread mutex condition wait calls" : <num>, "pthread mutex shared lock read-lock calls" : <num>, "pthread mutex shared lock write-lock calls" : <num>, "total fsync I/Os" : <num>, "total read I/Os" : <num>, "total write I/Os" : <num> }, "cursor" : { "cached cursor count" : <num>, "cursor bulk loaded cursor insert calls" : <num>, "cursor close calls that result in cache" : <num>, "cursor create calls" : <num>, "cursor insert calls" : <num>, "cursor insert key and value bytes" : <num>, "cursor modify calls" : <num>, "cursor modify key and value bytes affected" : <num>, "cursor modify value bytes modified" : <num>, "cursor next calls" : <num>, "cursor operation restarted" : <num>, "cursor prev calls" : <num>, "cursor remove calls" : <num>, "cursor remove key bytes removed" : <num>, "cursor reserve calls" : <num>, "cursor reset calls" : <num>, "cursor search calls" : <num>, "cursor search near calls" : <num>, "cursor sweep buckets" : <num>, "cursor sweep cursors closed" : <num>, "cursor sweep cursors examined" : <num>, "cursor sweeps" : <num>, "cursor truncate calls" : <num>, "cursor update calls" : <num>, "cursor update key and value bytes" : <num>, "cursor update value size change" : <num>, "cursors reused from cache" : <num>, "open cursor count" : <num> }, "data-handle" : { "connection data handle size" : <num>, "connection data handles currently active" : <num>, "connection sweep candidate became referenced" : <num>, "connection sweep dhandles closed" : <num>, "connection sweep dhandles removed from hash list" : <num>, "connection sweep time-of-death sets" : <num>, "connection sweeps" : <num>, "session dhandles swept" : <num>, "session sweep attempts" : <num> }, "lock" : { "checkpoint lock acquisitions" : <num>, "checkpoint lock application thread wait time (usecs)" : <num>, "checkpoint lock internal thread wait time (usecs)" : <num>, "dhandle lock application thread time waiting (usecs)" : <num>, "dhandle lock internal thread time waiting (usecs)" : <num>, "dhandle read lock acquisitions" : <num>, "dhandle write lock acquisitions" : <num>, "durable timestamp queue lock application thread time waiting (usecs)" : <num>, "durable timestamp queue lock internal thread time waiting (usecs)" : <num>, "durable timestamp queue read lock acquisitions" : <num>, "durable timestamp queue write lock acquisitions" : <num>, "metadata lock acquisitions" : <num>, "metadata lock application thread wait time (usecs)" : <num>, "metadata lock internal thread wait time (usecs)" : <num>, "read timestamp queue lock application thread time waiting (usecs)" : <num>, "read timestamp queue lock internal thread time waiting (usecs)" : <num>, "read timestamp queue read lock acquisitions" : <num>, "read timestamp queue write lock acquisitions" : <num>, "schema lock acquisitions" : <num>, "schema lock application thread wait time (usecs)" : <num>, "schema lock internal thread wait time (usecs)" : <num>, "table lock application thread time waiting for the table lock (usecs)" : <num>, "table lock internal thread time waiting for the table lock (usecs)" : <num>, "table read lock acquisitions" : <num>, "table write lock acquisitions" : <num>, "txn global lock application thread time waiting (usecs)" : <num>, "txn global lock internal thread time waiting (usecs)" : <num>, "txn global read lock acquisitions" : <num>, "txn global write lock acquisitions" : <num> }, "log" : { "busy returns attempting to switch slots" : <num>, "force archive time sleeping (usecs)" : <num>, "log bytes of payload data" : <num>, "log bytes written" : <num>, "log files manually zero-filled" : <num>, "log flush operations" : <num>, "log force write operations" : <num>, "log force write operations skipped" : <num>, "log records compressed" : <num>, "log records not compressed" : <num>, "log records too small to compress" : <num>, "log release advances write LSN" : <num>, "log scan operations" : <num>, "log scan records requiring two reads" : <num>, "log server thread advances write LSN" : <num>, "log server thread write LSN walk skipped" : <num>, "log sync operations" : <num>, "log sync time duration (usecs)" : <num>, "log sync_dir operations" : <num>, "log sync_dir time duration (usecs)" : <num>, "log write operations" : <num>, "logging bytes consolidated" : <num>, "maximum log file size" : <num>, "number of pre-allocated log files to create" : <num>, "pre-allocated log files not ready and missed" : <num>, "pre-allocated log files prepared" : <num>, "pre-allocated log files used" : <num>, "records processed by log scan" : <num>, "slot close lost race" : <num>, "slot close unbuffered waits" : <num>, "slot closures" : <num>, "slot join atomic update races" : <num>, "slot join calls atomic updates raced" : <num>, "slot join calls did not yield" : <num>, "slot join calls found active slot closed" : <num>, "slot join calls slept" : <num>, "slot join calls yielded" : <num>, "slot join found active slot closed" : <num>, "slot joins yield time (usecs)" : <num>, "slot transitions unable to find free slot" : <num>, "slot unbuffered writes" : <num>, "total in-memory size of compressed records" : <num>, "total log buffer size" : <num>, "total size of compressed records" : <num>, "written slots coalesced" : <num>, "yields waiting for previous log file close" : <num> }, "perf" : { "file system read latency histogram (bucket 1) - 10-49ms" : <num>, "file system read latency histogram (bucket 2) - 50-99ms" : <num>, "file system read latency histogram (bucket 3) - 100-249ms" : <num>, "file system read latency histogram (bucket 4) - 250-499ms" : <num>, "file system read latency histogram (bucket 5) - 500-999ms" : <num>, "file system read latency histogram (bucket 6) - 1000ms+" : <num>, "file system write latency histogram (bucket 1) - 10-49ms" : <num>, "file system write latency histogram (bucket 2) - 50-99ms" : <num>, "file system write latency histogram (bucket 3) - 100-249ms" : <num>, "file system write latency histogram (bucket 4) - 250-499ms" : <num>, "file system write latency histogram (bucket 5) - 500-999ms" : <num>, "file system write latency histogram (bucket 6) - 1000ms+" : <num>, "operation read latency histogram (bucket 1) - 100-249us" : <num>, "operation read latency histogram (bucket 2) - 250-499us" : <num>, "operation read latency histogram (bucket 3) - 500-999us" : <num>, "operation read latency histogram (bucket 4) - 1000-9999us" : <num>, "operation read latency histogram (bucket 5) - 10000us+" : <num>, "operation write latency histogram (bucket 1) - 100-249us" : <num>, "operation write latency histogram (bucket 2) - 250-499us" : <num>, "operation write latency histogram (bucket 3) - 500-999us" : <num>, "operation write latency histogram (bucket 4) - 1000-9999us" : <num>, "operation write latency histogram (bucket 5) - 10000us+" : <num> }, "reconciliation" : { "fast-path pages deleted" : <num>, "page reconciliation calls" : <num>, "page reconciliation calls for eviction" : <num>, "pages deleted" : <num>, "split bytes currently awaiting free" : <num>, "split objects currently awaiting free" : <num> }, "session" : { "open session count" : <num>, "session query timestamp calls" : <num>, "table alter failed calls" : <num>, "table alter successful calls" : <num>, "table alter unchanged and skipped" : <num>, "table compact failed calls" : <num>, "table compact successful calls" : <num>, "table create failed calls" : <num>, "table create successful calls" : <num>, "table drop failed calls" : <num>, "table drop successful calls" : <num>, "table import failed calls" : <num>, "table import successful calls" : <num>, "table rebalance failed calls" : <num>, "table rebalance successful calls" : <num>, "table rename failed calls" : <num>, "table rename successful calls" : <num>, "table salvage failed calls" : <num>, "table salvage successful calls" : <num>, "table truncate failed calls" : <num>, "table truncate successful calls" : <num>, "table verify failed calls" : <num>, "table verify successful calls" : <num> }, "thread-state" : { "active filesystem fsync calls" : <num>, "active filesystem read calls" : <num>, "active filesystem write calls" : <num> }, "thread-yield" : { "application thread time evicting (usecs)" : <num>, "application thread time waiting for cache (usecs)" : <num>, "connection close blocked waiting for transaction state stabilization" : <num>, "connection close yielded for lsm manager shutdown" : <num>, "data handle lock yielded" : <num>, "get reference for page index and slot time sleeping (usecs)" : <num>, "log server sync yielded for log write" : <num>, "page access yielded due to prepare state change" : <num>, "page acquire busy blocked" : <num>, "page acquire eviction blocked" : <num>, "page acquire locked blocked" : <num>, "page acquire read blocked" : <num>, "page acquire time sleeping (usecs)" : <num>, "page delete rollback time sleeping for state change (usecs)" : <num>, "page reconciliation yielded due to child modification" : <num> }, "transaction" : { "Number of prepared updates" : <num>, "Number of prepared updates added to cache overflow" : <num>, "Number of prepared updates resolved" : <num>, "durable timestamp queue entries walked" : <num>, "durable timestamp queue insert to empty" : <num>, "durable timestamp queue inserts to head" : <num>, "durable timestamp queue inserts total" : <num>, "durable timestamp queue length" : <num>, "number of named snapshots created" : <num>, "number of named snapshots dropped" : <num>, "prepared transactions" : <num>, "prepared transactions committed" : <num>, "prepared transactions currently active" : <num>, "prepared transactions rolled back" : <num>, "query timestamp calls" : <num>, "read timestamp queue entries walked" : <num>, "read timestamp queue insert to empty" : <num>, "read timestamp queue inserts to head" : <num>, "read timestamp queue inserts total" : <num>, "read timestamp queue length" : <num>, "rollback to stable calls" : <num>, "rollback to stable updates aborted" : <num>, "rollback to stable updates removed from cache overflow" : <num>, "set timestamp calls" : <num>, "set timestamp durable calls" : <num>, "set timestamp durable updates" : <num>, "set timestamp oldest calls" : <num>, "set timestamp oldest updates" : <num>, "set timestamp stable calls" : <num>, "set timestamp stable updates" : <num>, "transaction begins" : <num>, "transaction checkpoint currently running" : <num>, "transaction checkpoint generation" : <num>, "transaction checkpoint max time (msecs)" : <num>, "transaction checkpoint min time (msecs)" : <num>, "transaction checkpoint most recent time (msecs)" : <num>, "transaction checkpoint scrub dirty target" : <num>, "transaction checkpoint scrub time (msecs)" : <num>, "transaction checkpoint total time (msecs)" : <num>, "transaction checkpoints" : <num>, "transaction checkpoints skipped because database was clean" : <num>, "transaction failures due to cache overflow" : <num>, "transaction fsync calls for checkpoint after allocating the transaction ID" : <num>, "transaction fsync duration for checkpoint after allocating the transaction ID (usecs)" : <num>, "transaction range of IDs currently pinned" : <num>, "transaction range of IDs currently pinned by a checkpoint" : <num>, "transaction range of IDs currently pinned by named snapshots" : <num>, "transaction range of timestamps currently pinned" : <num>, "transaction range of timestamps pinned by a checkpoint" : <num>, "transaction range of timestamps pinned by the oldest active read timestamp" : <num>, "transaction range of timestamps pinned by the oldest timestamp" : <num>, "transaction read timestamp of the oldest active reader" : <num>, "transaction sync calls" : <num>, "transactions committed" : <num>, "transactions rolled back" : <num>, "update conflicts" : <num> }, "concurrentTransactions" : { "write" : { "out" : <num>, "available" : <num>, "totalTickets" : <num> }, "read" : { "out" : <num>, "available" : <num>, "totalTickets" : <num> } }, "snapshot-window-settings" : { "total number of SnapshotTooOld errors" : <num>, "max target available snapshots window size in seconds" : <num>, "target available snapshots window size in seconds" : <num>, "current available snapshots window size in seconds" : <num>, "latest majority snapshot timestamp available" : <string>, "oldest majority snapshot timestamp available" : <string> } }
The following is not an exhaustive list.以下并非详尽列表。
wiredTiger.async
A document that returns statistics related to the asynchronous operations API. 返回与异步操作API相关的统计信息的文档。This is unused by MongoDB.这是MongoDB未使用的。
wiredTiger.block-manager
A document that returns statistics on the block manager operations.返回块管理器操作统计信息的文档。
wiredTiger.cache
A document that returns statistics on the cache and page evictions from the cache.返回缓存统计信息和从缓存中删除页面的文档。
The following describes some of the key 下面介绍了一些关键的wiredTiger.cache
statistics:wiredTiger.cache
统计信息:
wiredTiger.cache.bytes currently in the cache
Size in byte of the data currently in cache. 缓存中当前数据的字节大小。This value should not be greater than the 此值不应大于配置的字节上限值。maximum bytes configured
value.
wiredTiger.cache.tracked dirty bytes in the cache
Size in bytes of the dirty data in the cache. 缓存中脏数据的字节大小。This value should be less than the 此值应小于缓存值中当前的字节数。bytes currently in the cache
value.
wiredTiger.cache.pages read into cache
Number of pages read into the cache. 读取缓存的页数。使用从缓存中写入的wiredTiger.cache.pages read into cache
with the wiredTiger.cache.pages written from cache
can provide an overview of the I/O activity.wiredTiger.cache.pages
将wiredTiger.cache.pages
读取到缓存中,可以提供I/O活动的概述。
wiredTiger.cache.pages written from cache
Number of pages written from the cache. 从缓存写入的页数。从缓存中写入的wiredTiger.cache.pages written from cache
with the wiredTiger.cache.pages read into cache
can provide an overview of the I/O activity.wiredTiger.cache.pages
和读取到缓存中的wiredTiger.cache.pages
可以提供I/O活动的概述。
To adjust the size of the WiredTiger internal cache, see 要调整WiredTiger内部缓存的大小,请参阅storage.wiredTiger.engineConfig.cacheSizeGB
and --wiredTigerCacheSizeGB
. storage.wiredTiger.engineConfig.cacheSizeGB
和--wiredTigerCacheSizeGB
。Avoid increasing the WiredTiger internal cache size above its default value.避免将WiredTiger内部缓存大小增加到其默认值以上。
wiredTiger.connection
A document that returns statistics related to WiredTiger connections.返回与WiredTiger连接相关的统计信息的文档。
wiredTiger.data-handle
A document that returns statistics on the data handles and sweeps.返回数据句柄和扫描统计信息的文档。
wiredTiger.log
A document that returns statistics on WiredTiger's write ahead log (i.e. the journal).返回WiredTiger预写日志(即日志)统计数据的文档。
wiredTiger.reconciliation
A document that returns statistics on the reconciliation process.返回对账过程统计信息的文档。
wiredTiger.session
A document that returns the open cursor count and open session count for the session.返回会话的打开游标计数和打开会话计数的文档。
wiredTiger.thread-yield
A document that returns statistics on yields during page acquisitions.返回页面获取期间产量统计数据的文档。
wiredTiger.transaction
A document that returns statistics on transaction checkpoints and operations.返回事务检查点和操作统计信息的文档。
wiredTiger.concurrentTransactions
A document that returns information on the number of concurrent of read and write transactions allowed into the WiredTiger storage engine. 返回WiredTiger存储引擎中允许的读写事务并发数信息的文档。These settings are MongoDB-specific.这些设置是MongoDB特定的。
To change the settings for concurrent reads and write transactions, see 要更改并发读写事务的设置,请参阅wiredTigerConcurrentReadTransactions
and wiredTigerConcurrentWriteTransactions
.wiredTigerConcurrentReadTransactions
和wiredTigerConcurrentWriteTransactions
。
"writeBacksQueued" : <boolean>,
writeBacksQueued
A boolean that indicates whether there are operations from a 一个布尔值,指示是否有来自mongos
instance queued for retrying. mongos
实例的操作排队等待重试。Typically, this value is false. 通常,该值为false
。See also writeBacks.另请参见writeBacks
。
"mem" : { "bits" : <int>, "resident" : <int>, "virtual" : <int>, "supported" : <boolean> },
mem
A document that reports on the system architecture of the 报告mongod
and current memory use.mongod
系统架构和当前内存使用情况的文档。
mem.bits
A number, either 一个数字,64
or 32
, that indicates whether the MongoDB instance is compiled for 64-bit or 32-bit architecture.64
或32
,表示MongoDB实例是针对64位还是32位体系结构编译的。
mem.resident
The value of mem.resident
is roughly equivalent to the amount of RAM, in mebibyte (MiB), currently used by the database process. mem.resident
的值大致相当于数据库进程当前使用的RAM量,单位为mebibyte(MiB)。During normal use, this value tends to grow. In dedicated database servers, this number tends to approach the total amount of system memory.在正常使用过程中,该值趋于增长。在专用数据库服务器中,这个数字往往接近系统内存的总量。
mem.virtual
mem.virtual
displays the quantity, in mebibyte (MiB), of virtual memory used by the mongod
process.mem.virtual
显示mongod
进程使用的虚拟内存的数量,单位为mebibyte(MiB)。
mem.supported
A boolean that indicates whether the underlying system supports extended memory information. 指示基础系统是否支持扩展内存信息的布尔值。If this value is false and the system does not support extended memory information, then other 如果该值为mem
values may not be accessible to the database server.false
,并且系统不支持扩展内存信息,则数据库服务器可能无法访问其他mem
值。
mem.note
The field 如果mem.note
appears if mem.supported
is false.mem.supported
为false
,则显示mem.note
字段。
The mem.note
field contains the text: mem.note
字段包含文本:"not all mem info support on this platform"
.
"metrics" : { "apiVersions": { "<appName1>": <string>, "<appName2>": <string>, "<appName3>": <string> }, "aggStageCounters" : { "<aggregation stage>" : NumberLong(<num>) }, "commands": { "<command>": { "failed": NumberLong(<num>), "total": NumberLong(<num>) } }, "cursor" : { "moreThanOneBatch" : NumberLong(<num>), "timedOut" : NumberLong(<num>), "totalOpened" : NumberLong(<num>), "lifespan" : { "greaterThanOrEqual10Minutes" : NumberLong(<num>), "lessThan10Minutes" : NumberLong(<num>), "lessThan15Seconds" : NumberLong(<num>), "lessThan1Minute" : NumberLong(<num>), "lessThan1Second" : NumberLong(<num>), "lessThan30Seconds" : NumberLong(<num>), "lessThan5Seconds" : NumberLong(<num>) }, "open" : { "noTimeout" : NumberLong(<num>), "pinned" : NumberLong(<num>), "multiTarget" : NumberLong(<num>), "singleTarget" : NumberLong(<num>), "total" : NumberLong(<num>) } }, "document" : { "deleted" : NumberLong(<num>), "inserted" : NumberLong(<num>), "returned" : NumberLong(<num>), "updated" : NumberLong(<num>) }, "dotsAndDollarsFields" : { "inserts" : Long("0"), "updates" : Long("0") }, "getLastError" : { "wtime" : { "num" : <num>, "totalMillis" : <num> }, "wtimeouts" : NumberLong(<num>), "default" : { "unsatisfiable" : NumberLong(<num>), "wtimeouts" : NumberLong(<num>) } }, "mongos" : { "cursor" : { "moreThanOneBatch" : NumberLong(<num>), "totalOpened" : NumberLong(<num>) } }, "operation" : { "scanAndOrder" : NumberLong(<num>), "writeConflicts" : NumberLong(<num>) }, "operatorCounters" : { "expressions" : { "<command>" : Long(<num>) }, "match" : { "<command>" : Long(<num>) } }, "queryExecutor": { "scanned" : NumberLong(<num>), "scannedObjects" : NumberLong(<num>), "collectionScans" : { "nonTailable" : NumbeLong(<num>), "total" : NumberLong(<num>) } }, "record" : { "moves" : NumberLong(<num>) }, "repl" : { "executor" : { "pool" : { "inProgressCount" : <num> }, "queues" : { "networkInProgress" : <num>, "sleepers" : <num> }, "unsignaledEvents" : <num>, "shuttingDown" : <boolean>, "networkInterface" : <string> }, "apply" : { "attemptsToBecomeSecondary" : NumberLong(<num>), "batches" : { "num" : <num>, "totalMillis" : <num> }, "ops" : NumberLong(<num>) }, "buffer" : { "count" : NumberLong(<num>), "maxSizeBytes" : NumberLong(<num>), "sizeBytes" : NumberLong(<num>) }, "initialSync" : { "completed" : NumberLong(<num>), "failedAttempts" : NumberLong(<num>), "failures" : NumberLong(<num>) }, "network" : { "bytes" : NumberLong(<num>), "getmores" : { "num" : <num>, "totalMillis" : <num> }, "notPrimaryLegacyUnacknowledgedWrites" : NumberLong(<num>), "notPrimaryUnacknowledgedWrites" : NumberLong(<num>), "oplogGetMoresProcessed" : { "num" : <num>, "totalMillis" : <num> }, "ops" : NumberLong(<num>), "readersCreated" : NumberLong(<num>), "replSetUpdatePosition" : { "num" : NumberLong(<num>) } }, "reconfig" : { "numAutoReconfigsForRemovalOfNewlyAddedFields" : NumberLong(<num>) }, "stepDown" : { "userOperationsKilled" : NumberLong(<num>), "userOperationsRunning" : NumberLong(<num>) }, "syncSource" : { "numSelections" : NumberLong(<num>), "numTimesChoseSame" : NumberLong(<num>), "numTimesChoseDifferent" : NumberLong(<num>), "numTimesCouldNotFind" : NumberLong(<num>) } }, "storage" : { "freelist" : { "search" : { "bucketExhausted" : <num>, "requests" : <num>, "scanned" : <num> } } }, "ttl" : { "deletedDocuments" : NumberLong(<num>), "passes" : NumberLong(<num>) } },
metrics
A document that returns various statistics that reflect the current use and state of a running 返回各种统计信息的文档,这些统计信息反映了正在运行的mongod
instance.mongod
实例的当前使用情况和状态。
metrics.aggStageCounters
A document that reports on the use of aggregation pipeline stages. 报告聚合管道阶段使用情况的文档。The fields in metrics.aggStageCounters
are the names of aggregation pipeline stages. metrics.aggStageCounters
中的字段是聚合管道阶段的名称。For each pipeline stage, 对于每个管道阶段,serverStatus
reports the number of times that stage has been executed.serverStatus
报告该阶段已执行的次数。
New in version 4.4 (4.2.6 and 4.0.19).Updated in version 5.2 (and 5.0.6).4.4版(4.2.6和4.0.19)中的新增功能在5.2版(和5.0.6)中更新。
metrics.apiVersions
A document with client applications and the version of Stable API which they are configured with. 包含客户端应用程序及其配置的稳定API版本的文档。Consider the following when viewing 查看metrics.apiVersions
:metrics.apiVersions
时请考虑以下事项:
appname
are default
or 1
.appname
唯一可能返回的值是default
或1
。appname
and API version will be removed from the metrics. appname
和API版本将从度量中删除。default
API version metric.default
API版本度量。appname
when connecting to a MongoDB instance by specifying the appname
in the connection URI. appname
来设置appname
。?appName=ZZZ
appname
to ZZZZ
.appname
设置为ZZZZ
。appname
.appname
。appname
is configured, a default value will be automatically populated based on the product. appname
,将根据产品自动填充默认值。appname
in the URI, the metric returns: 'MongoDB Compass': [ 'default' ]
.appname
的MongoDB Compass连接,度量返回:'MongoDB Compass': [ 'default' ]
。New in version 5.0..在版本5.0.中新增。
metrics.operatorCounters
A document that reports on the use of aggregation pipeline operators and expressions.报告聚合管道运算符和表达式使用情况的文档。
metrics.operatorCounters.expressions
A document with a number that indicates how often Expression Operators ran.一个带有数字的文档,该数字指示表达式运算符的运行频率。
To get metrics for a specific operator, such as the greater-than operator (要获取特定运算符(如大于运算符($gt
), append the operator to the command:$gt
))的度量,请将运算符附加到命令:
db.runCommand( { serverStatus: 1 } ).metrics.operatorCounters.expressions.$gt
New in version 5.0.在版本5.0中新增。
metrics.operatorCounters.match
A document with a number that indicates how often match expressions ran.带有数字的文档,该数字指示匹配表达式的运行频率。
Match expression operators also increment as part of an aggregation pipeline 匹配表达式运算符也作为聚合管道$match
stage. $match
阶段的一部分递增。If the 如果$match
stage uses the $expr
operator, the counter for $expr
increments, but the component counters do not increment.$match
阶段使用$expr
运算符,则$expr
的计数器递增,但组件计数器不递增。
Consider the following query:考虑以下查询:
db.matchCount.aggregate( [ { $match: { $expr: { $gt: [ "$_id", 0 ] } } } ] )
The counter for $expr
increments when the query runs. $expr
的计数器在查询运行时递增。The counter for $gt
does not.$gt
的计数器没有。
New in version 5.1.在版本5.1中新增。
metrics.commands
A document that reports on the use of database commands. 报告数据库命令使用情况的文档。The fields in metrics.commands
are the names of database commands. metrics.commands
中的字段是数据库命令的名称。For each command, the 对于每个命令,serverStatus
reports the total number of executions and the number of failed executions.serverStatus
报告执行总数和失败的执行数。
Starting in MongoDB 4.0.13 and 4.2.1, 从MongoDB 4.0.13和4.2.1开始,metrics.commands
include replSetStepDownWithForce
(i.e. the replSetStepDown
command with force: true
) as well as the overall replSetStepDown
. metrics.commands
包括replSetStepDownWithForce
(即具有force:true
的replSetStepDown
命令)以及整个replSetStepDown
。In earlier versions, the command reported only overall 在早期版本中,该命令仅报告总体replSetStepDown
metrics.replSetStepDown
度量。
metrics.commands.<command>.failed
The number of times <command>
failed on this mongod
.<command>
在此mongod
上失败的次数。
metrics.commands.<command>.total
The number of times 在此<command>
executed on this mongod
.mongod
上执行<command>
的次数。
metrics.commands.update.pipeline
The number of times an aggregation pipeline was used to update documents on this 聚合管道用于更新此mongod
. mongod
上的文档的次数。Subtract this value from the total number of updates to get the number of updates made with document syntax.从更新总数中减去此值,以获得使用文档语法进行的更新数。
The pipeline
counter is only available for update
and findAndModify
operations.pipeline
计数器仅可用于update
和findAndModify
操作。
metrics.commands.findAndModify.pipeline
The number of times 在聚合管道中使用findAndModify()
was used in an aggregation pipeline to update documents on this mongod
.findAndModify()
更新此mongod
上的文档的次数。
The pipeline
counter is only available for update
and findAndModify
operations.pipeline
计数器仅可用于update
和findAndModify
操作。
metrics.commands.update.arrayFilters
The number of times an arrayFilter was used to update documents on this mongod
.arrayFilter
用于更新此mongod
上的文档的次数。
The arrayFilters
counter is only available for update
and findAndModify
operations.arrayFilters
计数器仅可用于update
和findAndModify
操作。
metrics.commands.findAndModify.arrayFilters
The number of times an arrayFilter was used with findAndModify()
to update documents on this mongod
.arrayFilter
与findAndModify()
一起用于更新此mongod
上的文档的次数。
The arrayFilters
counter is only available for update
and findAndModify
operations.arrayFilters
计数器仅可用于update
和findAndModify
操作。
metrics.document
A document that reflects document access and modification patterns. 反映文档访问和修改模式的文档。Compare these values to the data in the 将这些值与跟踪操作总数的opcounters
document, which track total number of operations.opcounters
文档中的数据进行比较。
metrics.dotsAndDollarsFields
A document with a number that indicates how often insert or update operations ran using a dollar (带有数字的文档,该数字指示使用美元($
) prefixed name. $
)前缀名称运行插入或更新操作的频率。The value does not report the exact number of operations.该值不报告操作的确切数量。
When an upsert operation creates a new document, it is considered to be an 当upsert操作创建新文档时,它被视为insert
rather than an update
.insert
而不是update
。
New in version 5.0.在版本5.0中新增。
metrics.executor
A document that reports on various statistics for the replication executor.报告复制执行器的各种统计信息的文档。
metrics.getLastError
A document that reports on write concern use.报告写入关注使用情况的文档。
metrics.getLastError.wtime
A document that reports write concern operation counts with a 报告写入关注操作的文档的w
argument greater than 1
.w
参数大于1
。
metrics.getLastError.wtime.num
The total number of operations with a specified write concern (i.e. 具有指定写入问题(即w
) that wait for one or more members of a replica set to acknowledge the write operation (i.e. a w
value greater than 1
.)w
)的操作总数,这些操作等待副本集的一个或多个成员确认写入操作(即w
值大于1
)
metrics.getLastError.wtime.totalMillis
The total amount of time in milliseconds that the mongod
has spent performing write concern operations with a write concern (i.e. w
) that waits for one or more members of a replica set to acknowledge the write operation (i.e. a w
value greater than 1
.)mongod
用写关注点(即w
)执行写关注点操作所花费的总时间(以毫秒为单位),该写关注点等待副本集的一个或多个成员确认写操作(即w
值大于1)
metrics.getLastError.wtimeouts
The number of times that write concern operations have timed out as a result of the 写入关注操作由于wtimeout
threshold. wtimeout
阈值而超时的次数。This number increments for both default and non-default write concern specifications.对于默认和非默认写问题规范,此数字都会增加。
metrics.getLastError.default
A document that reports on when a default write concern was used (meaning, a non-报告何时使用默认写入关注(即非clientSupplied
write concern). clientSupplied
写入关注)的文档。The possible origins of a default write concern are:默认写入问题的可能来源是:
implicitDefault
customDefault
getLastErrorDefaults
Refer to the following table for information on each possible write concern origin, or 请参阅下表,了解每个可能的书面问题来源或provenance
:provenance
的信息:
Provenance | |
---|---|
clientSupplied | |
customDefault | setDefaultRWConcern . setDefaultRWConcern 。 |
getLastErrorDefaults | settings.getLastErrorDefaults field. settings.getLastErrorDefaults 字段。 |
implicitDefault |
metrics.getLastError.default.unsatisfiable
Number of times that a non-非clientSupplied
write concern returned the UnsatisfiableWriteConcern
error code.clientSupplied
写入关注返回UnsatisiableWriteConcern
错误代码的次数。
metrics.getLastError.default.wtimeouts
Number of times a non-非clientSupplied
write concern timed out.clientSupplied
写入问题超时的次数。
metrics.mongos
A document that contains metrics about 包含mongos
.mongos
指标的文档。
metrics.mongos.cursor
A document that contains metrics for cursors used by 包含mongos
.mongos
使用的游标指标的文档。
metrics.mongos.cursor.moreThanOneBatch
The total number of cursors that have returned more than one batch since 自mongos
started. mongos
启动以来已返回多个批的游标总数。Additional batches are retrieved using the 使用getMore
command.getMore
命令检索其他批次。
New in version 5.0.在版本5.0中新增。
metrics.mongos.cursor.totalOpened
The total number of cursors that have been opened since 自mongos
started, including cursors currently open. mongos
启动以来已打开的游标总数,包括当前打开的游标。Differs from 与metrics.cursor.open.total
, which is the number of currently open cursors only.metrics.cursor.open.total
不同,后者仅为当前打开的游标数。
New in version 5.0.在版本5.0中新增。
metrics.operation
A document that holds counters for several types of update and query operations that MongoDB handles using special operation types.一个文档,包含MongoDB使用特殊操作类型处理的几种更新和查询操作的计数器。
metrics.operation.scanAndOrder
The total number of queries that return sorted numbers that cannot perform the sort operation using an index.返回无法使用索引执行排序操作的排序数字的查询总数。
metrics.operation.writeConflicts
The total number of queries that encountered write conflicts.遇到写入冲突的查询总数。
metrics.queryExecutor
A document that reports data from the query execution system.报告来自查询执行系统的数据的文档。
metrics.queryExecutor.scanned
The total number of index items scanned during queries and query-plan evaluation. 在查询和查询计划评估期间扫描的索引项总数。This counter is the same as 此计数器与totalKeysExamined
in the output of explain()
.explain()
输出中的totalKeysExamined
相同。
metrics.queryExecutor.scannedObjects
The total number of documents scanned during queries and query-plan evaluation. 在查询和查询计划评估期间扫描的文档总数。This counter is the same as 此计数器与totalDocsExamined
in the output of explain()
.explain()
输出中的totalDocsExamined
相同。
metrics.queryExecutor.collectionScans
A document that reports on the number of queries that performed a collection scan.报告执行集合扫描的查询数的文档。
New in version 4.4.在版本4.4中新增。
metrics.queryExecutor.collectionScans.nonTailable
The number of queries that performed a collection scan that did not use a tailable cursor.执行不使用可跟踪游标的集合扫描的查询数。
New in version 4.4.在版本4.4中新增。
metrics.queryExecutor.collectionScans.total
The total number queries that performed a collection scan. 执行集合扫描的查询总数。The total consists of queries that did and did not use a tailable cursor.总数包括使用和不使用可跟踪游标的查询。
New in version 4.4.在版本4.4中新增。
metrics.record
A document that reports on data related to record allocation in the on-disk memory files.报告与磁盘内存文件中记录分配相关的数据的文档。
metrics.repl
A document that reports metrics related to the replication process. 报告与复制过程相关的度量的文档。metrics.repl
document appears on all mongod
instances, even those that aren't members of replica sets.metrics.repl
文档出现在所有mongod
实例上,即使是那些不是副本集成员的实例。
metrics.repl.apply
A document that reports on the application of operations from the replication oplog.报告复制oplog中操作应用程序的文档。
metrics.repl.apply.batchSize
New in version 4.0.6.在版本4.0.6中新增。 (Also available in 3.6.11+)(3.6.11+中也提供)
The total number of oplog operations applied. 应用的oplog操作总数。The metrics.repl.apply.batchSize
is incremented with the number of operations in a batch at the batch boundaries instead of being incremented by one after each operation.metrics.repl.apply.batchSize
在批次边界处随批次中的操作数递增,而不是在每次操作后递增一。
For finer granularity, see 有关更精细的粒度,请参阅metrics.repl.apply.ops
.metrics.repl.apply.ops
。
metrics.repl.apply.batches
metrics.repl.apply.batches
reports on the oplog application process on secondaries members of replica sets. metrics.repl.apply.batches
报告副本集的secondary成员上的oplog应用程序进程。See Multithreaded Replication for more information on the oplog application processes.有关oplog应用程序进程的更多信息,请参阅多线程复制。
metrics.repl.apply.batches.num
The total number of batches applied across all databases.应用于所有数据库的批处理总数。
metrics.repl.apply.batches.totalMillis
The total amount of time in milliseconds the mongod
has spent applying operations from the oplog.mongod
从oplog应用操作所花费的总时间(毫秒)。
metrics.repl.apply.ops
The total number of oplog operations applied. 应用的oplog操作总数。metrics.repl.apply.ops
is incremented after each operation.在每次操作后递增。
metrics.repl.buffer
MongoDB buffers oplog operations from the replication sync source buffer before applying oplog entries in a batch. MongoDB在批处理中应用oplog条目之前,从复制同步源缓冲区缓冲oplog操作。metrics.repl.buffer
provides a way to track the oplog buffer. 提供了跟踪oplog缓冲区的方法。See Multithreaded Replication for more information on the oplog application process.有关oplog应用程序进程的更多信息,请参阅多线程复制。
metrics.repl.buffer.maxSizeBytes
The maximum size of the buffer. 缓冲区的最大大小。This value is a constant setting in the 该值是mongod
, and is not configurable.mongod
中的常量设置,不可配置。
metrics.repl.network
metrics.repl.network
reports network use by the replication process.报告复制进程的网络使用情况。
metrics.repl.network.bytes
metrics.repl.network.bytes
reports the total amount of data read from the replication sync source.报告从复制同步源读取的数据总量。
metrics.repl.network.getmores
metrics.repl.network.getmores
reports on the 报告getmore
operations, which are requests for additional results from the oplog cursor as part of the oplog replication process.getmore
操作,这些操作是作为oplog复制过程的一部分从oplog游标请求附加结果。
metrics.repl.network.getmores.num
metrics.repl.network.getmores.num
reports the total number of 报告getmore
operations, which are operations that request an additional set of operations from the replication sync source.getmore
操作的总数,这些操作请求来自复制同步源的附加操作集。
metrics.repl.network.getmores.totalMillis
metrics.repl.network.getmores.totalMillis
reports the total amount of time required to collect data from 报告从getmore
operations.getmore
操作集合数据所需的总时间。
This number can be quite large, as MongoDB will wait for more data even if the 这个数字可能非常大,因为即使getmore
operation does not initial return data.getmore
操作没有初始返回数据,MongoDB也会等待更多数据。
metrics.repl.network.getmores.numEmptyBatches
The number of empty 辅助设备从其同步源接收的空oplog
batches a secondary receives from its sync source. oplog
批数。A secondary receives an empty batch if it is fully synced with its source and either:如果辅助设备与其源设备完全同步,并且:
getmore
times out waiting for more data, orgetmore
超时等待更多数据,或For a primary, if the instance was previously a secondary, the number reports on the empty batches received when it was a secondary. 对于主实例,如果该实例以前是辅助实例,则该数字报告在它是辅助实例时收到的空批次。Otherwise, for a primary, this number is 否则,对于主系统,此数字为0。0
.
New in version 4.4.在版本4.4中新增。
metrics.repl.network.notPrimaryLegacyUnacknowledgedWrites
The number of unacknowledged (由于当前w: 0
) legacy write operations (see Opcodes) that failed because the current mongod
is not in PRIMARY
state.mongod
未处于PRIMARY
状态而失败的未确认(w:0
)遗留写入操作(请参阅Opcodes)的数量。
New in version 4.2.在版本4.2中新增。
metrics.repl.network.notPrimaryUnacknowledgedWrites
The number of unacknowledged (由于当前w: 0
) write operations that failed because the current mongod
is not in PRIMARY
state.mongod
未处于PRIMARY
状态而失败的未确认(w:0
)写入操作数。
New in version 4.2.在版本4.2中新增。
metrics.repl.network.oplogGetMoresProcessed
A document that reports the number of 报告获取节点作为同步源处理的oplog的getMore
commands to fetch the oplog that a node processed as a sync source.getMore
命令数的文档。
New in version 4.4.在版本4.4中新增。
metrics.repl.network.oplogGetMoresProcessed.num
The number of 获取节点作为同步源处理的oplog的getMore
commands to fetch the oplog that a node processed as a sync source.getMore
命令数。
New in version 4.4.在版本4.4中新增。
metrics.repl.network.oplogGetMoresProcessed.totalMillis
The time, in milliseconds, that a node spent processing the 节点处理getMore
commands counted in metrics.repl.network.oplogGetMoresProcessed.num
.getMore
命令所花费的时间(以毫秒为单位),以metrics.repl.network.oplogGetMoresProcessed.num
为单位。
New in version 4.4.在版本4.4中新增。
metrics.repl.network.ops
The total number of operations read from the replication source.从复制源读取的操作总数。
metrics.repl.network.readersCreated
The total number of oplog query processes created. MongoDB will create a new oplog query any time an error occurs in the connection, including a timeout, or a network operation. 创建的oplog查询进程总数。MongoDB将在连接中发生错误(包括超时或网络操作)时创建新的oplog查询。Furthermore, 此外,每次MongoDB选择新的复制源时,metrics.repl.network.readersCreated
will increment every time MongoDB selects a new source for replication.metrics.repl.network.readersCreated
都会增加。
metrics.repl.network.replSetUpdatePosition
A document that reports the number of 报告节点发送到其同步源的replSetUpdatePosition
commands a node sent to its sync source.replSetUpdatePosition
命令数的文档。
New in version 4.4.在版本4.4中新增。
metrics.repl.network.replSetUpdatePosition.num
The number of 节点发送到其同步源的replSetUpdatePosition
commands a node sent to its sync source. replSetUpdatePosition
命令数。replSetUpdatePosition
commands are internal replication commands that communicate replication progress from nodes to their sync sources.命令是将复制进度从节点传递到其同步源的内部复制命令。
New in version 4.4.在版本4.4中新增。
metrics.repl.reconfig
A document containing the number of times that member 包含成员newlyAdded
fields were automatically removed by the primary. newAdded
字段被主字段自动删除的次数的文档。When a member is first added to the replica set, the member's 当成员首次添加到副本集时,成员的newlyAdded
field is set to true
.newAdded
字段设置为true
。
New in version 5.0.在版本5.0中新增。
metrics.repl.reconfig.numAutoReconfigsForRemovalOfNewlyAddedFields
The number of times that newlyAdded
member fields were automatically removed by the primary. newlyAdded
成员字段被主要成员自动删除的次数。When a member is first added to the replica set, the member's 当成员首次添加到副本集时,成员的newlyAdded
field is set to true
. newlyAdded
字段设置为true
。After the primary receives the member's heartbeat response indicating the member state is 在主服务器接收到成员的心跳响应(指示成员状态为SECONDARY
, RECOVERING
, or ROLLBACK
, the primary automatically removes the member's newlyAdded
field. SECONDARY
、RECOVERING
或RECOVERING
)后,主服务器会自动删除成员的newlyAdded
字段。The newlyAdded
fields are stored in the local.system.replset
collection.newlyAdded
字段存储在local.system.replset
集合中。
New in version 5.0.在版本5.0中新增。
metrics.repl.stepDown
Information on user operations that were running when the 有关mongod
stepped down.mongod
下台时正在运行的用户操作的信息。
New in version 4.2.在版本4.2中新增。
metrics.repl.stepDown.userOperationsKilled
The number of user operations killed when the 当mongod
stepped down.mongod
下台时,用户操作被杀死的数量。
New in version 4.2.在版本4.2中新增。
metrics.repl.stepDown.userOperationsRunning
The number of user operations that remained running when the mongod
stepped down.mongod
关闭时仍在运行的用户操作数。
New in version 4.2.在版本4.2中新增。
metrics.repl.syncSource
Information on a replica set node's sync source selection process.有关副本集节点的同步源选择过程的信息。
New in version 4.4.在版本4.4中新增。
metrics.repl.syncSource.numSelections
Number of times a node attempted to choose a node to sync from among the available sync source options. 节点尝试从可用的同步源选项中选择要同步的节点的次数。A node attempts to choose a node to sync from if, for example, the sync source is re-evaluated or the node receives an error from its current sync source.例如,如果重新评估同步源或节点从其当前同步源收到错误,则节点尝试选择要同步的节点。
New in version 4.4.在版本4.4中新增。
metrics.repl.syncSource.numTimesChoseSame
Number of times a node kept its original sync source after re-evaluating if its current sync source was optimal.节点在重新评估其当前同步源是否最佳后保留其原始同步源的次数。
New in version 4.4.在版本4.4中新增。
metrics.repl.syncSource.numTimesChoseDifferent
Number of times a node chose a new sync source after re-evaluating if its current sync source was optimal.节点在重新评估其当前同步源是否最佳后选择新同步源的次数。
New in version 4.4.在版本4.4中新增。
metrics.repl.syncSource.numTimesCouldNotFind
Number of times a node could not find an available sync source when attempting to choose a node to sync from.尝试选择要同步的节点时,节点找不到可用同步源的次数。
New in version 4.4.在版本4.4中新增。
metrics.storage.freelist.search.bucketExhausted
The number of times that mongod
has examined the free list without finding a large record allocation.mongod
在没有找到大量记录分配的情况下检查免费列表的次数。
metrics.storage.freelist.search.requests
The number of times mongod
has searched for available record allocations.mongod
搜索可用记录分配的次数。
metrics.storage.freelist.search.scanned
The number of available record allocations 已搜索的可用记录分配数。mongod
has searched.
metrics.ttl
A document that reports on the operation of the resource use of the ttl index process.报告ttl索引进程资源使用操作的文档。
metrics.ttl.deletedDocuments
The total number of documents deleted from collections with a ttl index.从具有ttl索引的集合中删除的文档总数。
metrics.ttl.passes
The number of times the background process removes documents from collections with a ttl index.后台进程从具有ttl索引的集合中删除文档的次数。
metrics.cursor.moreThanOneBatch
The total number of cursors that have returned more than one batch since the server process started. 自服务器进程启动以来返回多个批处理的游标总数。Additional batches are retrieved using the 使用getMore
command.getMore
命令检索其他批次。
New in version 5.0.在版本5.0中新增。
metrics.cursor.timedOut
The total number of cursors that have timed out since the server process started. 自服务器进程启动以来超时的游标总数。If this number is large or growing at a regular rate, this may indicate an application error.如果这个数字很大或以正常速度增长,这可能表明应用程序错误。
metrics.cursor.totalOpened
The total number of cursors that have been opened since the server process started, including cursors currently open. 自服务器进程启动以来已打开的游标总数,包括当前打开的游标。Differs from 与metrics.cursor.open.total
, which is the number of currently open cursors only.metrics.cursor.open.total
不同,后者仅为当前打开的游标数。
New in version 5.0.在版本5.0中新增。
metrics.cursor.lifespan
A document that reports the number of cursors that have lifespans within specified time periods. 报告在指定时间段内具有寿命的游标数的文档。The cursor lifespan is the time period from when the cursor is created to when the cursor is killed using the 游标寿命是从创建游标到使用killCursors
command or the cursor has no remaining objects in the batch.killCursors
命令终止游标或游标在批处理中没有剩余对象的时间段。
The lifespan time periods are:使用期限为:
New in version 5.0.在版本5.0中新增。
metrics.cursor.lifespan.greaterThanOrEqual10Minutes
The number of cursors with a lifespan >= 10 minutes.寿命大于等于10分钟的游标数。
New in version 5.0.在版本5.0中新增。
metrics.cursor.lifespan.lessThan10Minutes
The number of cursors with a lifespan >= 1 minute to < 10 minutes.寿命大于等于1分钟到小于10分钟的游标数。
New in version 5.0.在版本5.0中新增。
metrics.cursor.lifespan.lessThan15Seconds
The number of cursors with a lifespan >= 5 seconds to < 15 seconds.寿命大于等于5秒到小于15秒的游标数。
New in version 5.0.在版本5.0中新增。
metrics.cursor.lifespan.lessThan1Minute
The number of cursors with a lifespan >= 30 seconds to < 1 minute.寿命>=30秒至<1分钟的游标数。
New in version 5.0.在版本5.0中新增。
metrics.cursor.lifespan.lessThan1Second
The number of cursors with a lifespan < 1 second.寿命小于1秒的游标数。
New in version 5.0.在版本5.0中新增。
metrics.cursor.lifespan.lessThan30Seconds
The number of cursors with a lifespan >= 15 seconds to < 30 seconds.寿命大于等于15秒到小于30秒的游标数。
New in version 5.0.在版本5.0中新增。
metrics.cursor.lifespan.lessThan5Seconds
The number of cursors with a lifespan >= 1 second to < 5 seconds.寿命大于等于1秒到小于5秒的游标数。
New in version 5.0.在版本5.0中新增。
metrics.cursor.open.noTimeout
The number of open cursors with the option 设置选项DBQuery.Option.noTimeout
set to prevent timeout after a period of inactivity.DBQuery.Option.noTimeout
以防止在一段时间不活动后超时的打开游标数。
metrics.cursor.open.total
The number of cursors that MongoDB is maintaining for clients. MongoDB为客户端维护的游标数。Because MongoDB exhausts unused cursors, typically this value small or zero. 因为MongoDB会耗尽未使用的游标,通常该值很小或为零。However, if there is a queue, or stale tailable cursors, or a large number of operations this value may increase.但是,如果存在队列、过时的可跟踪游标或大量操作,则此值可能会增加。
metrics.cursor.open.singleTarget
The total number of cursors that only target a single shard. 仅针对单个分片的游标总数。Only 只有mongos
instances report metrics.cursor.open.singleTarget
values.mongos
实例报告metrics.cursor.open.singleTarget
值。
metrics.cursor.open.multiTarget
The total number of cursors that only target more than one shard. 仅针对多个分片的游标总数。Only 只有mongos
instances report metrics.cursor.open.multiTarget
values.mongos
实例报告metrics.cursor.open.multiTarget
值。
"watchdog" : { "checkGeneration" : NumberLong(<num>), "monitorGeneration" : NumberLong(<num>), "monitorPeriod" : <num> }
The 只有在启用了存储节点监视器时,watchdog
section is only present if the Storage Node Watchdog is enabled.watchdog
部分才会出现。
watchdog
A document reporting the status of the Storage Node Watchdog.报告存储节点监视器状态的文档。
watchdog.checkGeneration
The number of times the directories have been checked since startup. 自启动以来检查目录的次数。Directories are checked multiple times every 每个monitoringPeriod
.monitoringPeriod
检查目录多次。
watchdog.monitorGeneration
The number of times the status of all filesystems used by mongod
has been examined. mongod
使用的所有文件系统的状态被检查的次数。This is incremented once every 每个monitoringPeriod
.monitoringPeriod
递增一次。
watchdog.monitorPeriod
The value set by watchdogPeriodSeconds
. watchdogPeriodSeconds
设置的值。This is the period between status checks.这是状态检查之间的间隔时间。