@@ -20,19 +20,24 @@ Definition
20
20
applications can run this command at a regular interval to
21
21
collect statistics about the instance.
22
22
23
- .. code-block:: javascript
23
+ Syntax
24
+ ------
25
+
26
+ The command has the following syntax:
24
27
25
- db.runCommand( { serverStatus: 1 } )
28
+ .. code-block:: javascript
29
+
30
+ db.runCommand( { serverStatus: 1 } )
26
31
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.
30
35
31
- .. seealso::
36
+ .. seealso::
32
37
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.
36
41
37
42
Behavior
38
43
--------
@@ -822,9 +827,15 @@ logicalSessionRecordCache
822
827
"transactionReaperJobCount" : <num>,
823
828
"lastTransactionReaperJobDurationMillis" : <num>,
824
829
"lastTransactionReaperJobTimestamp" : <Date>,
825
- "lastTransactionReaperJobEntriesCleanedUp" : <num>
830
+ "lastTransactionReaperJobEntriesCleanedUp" : <num>,
831
+ "sessionCatalogSize" : <num> // Starting in MongoDB 4.0.22
826
832
},
827
833
834
+ .. serverstatus:: logicalSessionRecordCache
835
+
836
+ Provides metrics for caching of :doc:`server sessions
837
+ </reference/server-sessions/>`.
838
+
828
839
.. serverstatus:: logicalSessionRecordCache.activeSessionsCount
829
840
830
841
The number of all active local sessions cached in memory by the
@@ -884,6 +895,21 @@ logicalSessionRecordCache
884
895
The number of entries in the :data:`config.transactions` collection
885
896
that were deleted during the last transaction record cleanup.
886
897
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
+
887
913
.. _locks:
888
914
.. _server-status-locks:
889
915
0 commit comments