Skip to content

Commit 407d9fb

Browse files
jason-price-mongodbandf-mongodb
authored andcommitted
DOCS-14144-report-histogram-data-on-cursors-drain
1 parent a31c154 commit 407d9fb

File tree

2 files changed

+82
-0
lines changed

2 files changed

+82
-0
lines changed

source/reference/command/serverStatus.txt

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4594,6 +4594,15 @@ metrics
45944594
"moreThanOneBatch" : NumberLong(<num>),
45954595
"timedOut" : NumberLong(<num>),
45964596
"totalOpened" : NumberLong(<num>),
4597+
"lifespan" : {
4598+
"greaterThanOrEqual10Minutes" : NumberLong(<num>),
4599+
"lessThan10Minutes" : NumberLong(<num>),
4600+
"lessThan15Seconds" : NumberLong(<num>),
4601+
"lessThan1Minute" : NumberLong(<num>),
4602+
"lessThan1Second" : NumberLong(<num>),
4603+
"lessThan30Seconds" : NumberLong(<num>),
4604+
"lessThan5Seconds" : NumberLong(<num>)
4605+
},
45974606
"open" : {
45984607
"noTimeout" : NumberLong(<num>),
45994608
"pinned" : NumberLong(<num>),
@@ -5314,6 +5323,76 @@ metrics
53145323

53155324
.. versionadded:: 5.0
53165325

5326+
.. _server-status-metrics-cursor-lifespan:
5327+
5328+
.. serverstatus:: metrics.cursor.lifespan
5329+
5330+
A document that reports the number of cursors that have lifespans
5331+
within specified time periods. The cursor lifespan is the time period
5332+
from when the cursor is created to when the cursor is killed using
5333+
the :dbcommand:`killCursors` command or the cursor has no remaining
5334+
objects in the :ref:`batch <cursor-batches>`.
5335+
5336+
The lifespan time periods are:
5337+
5338+
- < 1 second
5339+
5340+
- >= 1 second to < 5 seconds
5341+
5342+
- >= 5 seconds to < 15 seconds
5343+
5344+
- >= 15 seconds to < 30 seconds
5345+
5346+
- >= 30 seconds to < 1 minute
5347+
5348+
- >= 1 minute to < 10 minutes
5349+
5350+
- >= 10 minutes
5351+
5352+
.. versionadded:: 5.0
5353+
5354+
.. serverstatus:: metrics.cursor.lifespan.greaterThanOrEqual10Minutes
5355+
5356+
The number of cursors with a lifespan >= 10 minutes.
5357+
5358+
.. versionadded:: 5.0
5359+
5360+
.. serverstatus:: metrics.cursor.lifespan.lessThan10Minutes
5361+
5362+
The number of cursors with a lifespan >= 1 minute to < 10 minutes.
5363+
5364+
.. versionadded:: 5.0
5365+
5366+
.. serverstatus:: metrics.cursor.lifespan.lessThan15Seconds
5367+
5368+
The number of cursors with a lifespan >= 5 seconds to < 15 seconds.
5369+
5370+
.. versionadded:: 5.0
5371+
5372+
.. serverstatus:: metrics.cursor.lifespan.lessThan1Minute
5373+
5374+
The number of cursors with a lifespan >= 30 seconds to < 1 minute.
5375+
5376+
.. versionadded:: 5.0
5377+
5378+
.. serverstatus:: metrics.cursor.lifespan.lessThan1Second
5379+
5380+
The number of cursors with a lifespan < 1 second.
5381+
5382+
.. versionadded:: 5.0
5383+
5384+
.. serverstatus:: metrics.cursor.lifespan.lessThan30Seconds
5385+
5386+
The number of cursors with a lifespan >= 15 seconds to < 30 seconds.
5387+
5388+
.. versionadded:: 5.0
5389+
5390+
.. serverstatus:: metrics.cursor.lifespan.lessThan5Seconds
5391+
5392+
The number of cursors with a lifespan >= 1 second to < 5 seconds.
5393+
5394+
.. versionadded:: 5.0
5395+
53175396
.. serverstatus:: metrics.cursor.open
53185397

53195398
A document that contains data regarding open cursors.

source/release-notes/5.0.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,9 @@ output:
382382
report the total number of cursors that have been opened
383383
on :binary:`~bin.mongod` and :binary:`~bin.mongos`
384384
respectively
385+
| :serverstatus:`metrics.cursor.lifespan`, which reports
386+
the number of cursors that have lifespans within
387+
specified time periods
385388

386389
.. _5.0-rel-notes-shell:
387390

0 commit comments

Comments
 (0)