@@ -20,19 +20,24 @@ Definition
2020 applications can run this command at a regular interval to
2121 collect statistics about the instance.
2222
23- .. code-block:: javascript
23+ Syntax
24+ ------
25+
26+ The command has the following syntax:
2427
25- db.runCommand( { serverStatus: 1 } )
28+ .. code-block:: javascript
29+
30+ db.runCommand( { serverStatus: 1 } )
2631
27- The value (i.e. ``1`` above) does not affect the operation of the
28- command. The :binary:`~bin.mongo` shell provides the
29- :method:`db.serverStatus()` wrapper for the command.
32+ The value specified ( ``1`` above) does not affect the operation of the
33+ command. The :binary:`~bin.mongo` shell provides the
34+ :method:`db.serverStatus()` wrapper for the command.
3035
31- .. seealso::
36+ .. seealso::
3237
33- Much of the output of :dbcommand:`serverStatus` is also displayed
34- dynamically by :binary:`~bin.mongostat`. See the
35- :doc:`/reference/program/mongostat` command for more information.
38+ Much of the output of :dbcommand:`serverStatus` is also displayed
39+ dynamically by :binary:`~bin.mongostat`. See the
40+ :doc:`/reference/program/mongostat` command for more information.
3641
3742Behavior
3843--------
@@ -822,9 +827,15 @@ logicalSessionRecordCache
822827 "transactionReaperJobCount" : <num>,
823828 "lastTransactionReaperJobDurationMillis" : <num>,
824829 "lastTransactionReaperJobTimestamp" : <Date>,
825- "lastTransactionReaperJobEntriesCleanedUp" : <num>
830+ "lastTransactionReaperJobEntriesCleanedUp" : <num>,
831+ "sessionCatalogSize" : <num> // Starting in MongoDB 4.0.22
826832 },
827833
834+ .. serverstatus:: logicalSessionRecordCache
835+
836+ Provides metrics for caching of :doc:`server sessions
837+ </reference/server-sessions/>`.
838+
828839.. serverstatus:: logicalSessionRecordCache.activeSessionsCount
829840
830841 The number of all active local sessions cached in memory by the
@@ -884,6 +895,21 @@ logicalSessionRecordCache
884895 The number of entries in the :data:`config.transactions` collection
885896 that were deleted during the last transaction record cleanup.
886897
898+ .. serverstatus:: logicalSessionRecordCache.sessionCatalogSize
899+
900+ - For a :binary:`~bin.mongod` instance:
901+ The size of its in-memory cache of the `config.transactions`
902+ entries. This corresponds to retryable writes
903+ or transactions whose sessions have not expired within the
904+ :parameter:`localLogicalSessionTimeoutMinutes`.
905+
906+ - For a :binary:`~bin.mongos` instance:
907+ The number of the in-memory cache of its sessions that have had
908+ transactions within the most recent
909+ :parameter:`localLogicalSessionTimeoutMinutes` interval.
910+
911+ .. versionadded:: 4.0.22
912+
887913.. _locks:
888914.. _server-status-locks:
889915
0 commit comments