-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathserverStatus.txt
More file actions
7084 lines (5030 loc) · 227 KB
/
Copy pathserverStatus.txt
File metadata and controls
7084 lines (5030 loc) · 227 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
============
serverStatus
============
.. default-domain:: mongodb
.. facet::
:name: programming_language
:values: shell
.. facet::
:name: genre
:values: reference
.. contents:: On this page
:local:
:backlinks: none
:depth: 2
:class: singlecol
.. |mongod-only| replace:: *Available on mongod only.*
.. |mongos-only| replace:: *Available on mongos only.*
.. |both| replace:: *Available on both mongod and mongos.*
Definition
----------
.. dbcommand:: serverStatus
The :dbcommand:`serverStatus` command returns a document that
provides an overview of the database's state. Monitoring
applications can run this command at a regular interval to
collect statistics about the instance.
Compatibility
-------------
This command is available in deployments hosted in the following environments:
.. include:: /includes/fact-environments-atlas-only.rst
.. include:: /includes/fact-environments-atlas-support-all.rst
.. include:: /includes/fact-environments-onprem-only.rst
Syntax
------
The command has the following syntax:
.. code-block:: javascript
db.runCommand(
{
serverStatus: 1
}
)
The value (i.e. ``1`` above) does not affect the operation of the
command. The ``db.serverStatus()`` command returns a large amount of
data. To return a specific object or field from the output append the
object or field name to the command.
For example:
.. code-block:: javascript
db.runCommand({ serverStatus: 1}).metrics
db.runCommand({ serverStatus: 1}).metrics.commands
db.runCommand({ serverStatus: 1}).metrics.commands.update
:binary:`~bin.mongosh` provides the :method:`db.serverStatus()`
wrapper for the :dbcommand:`serverStatus` command.
.. seealso::
Much of the output of :dbcommand:`serverStatus` is also displayed
dynamically by :binary:`~bin.mongostat`. See the
:binary:`~bin.mongostat` command for more information.
Behavior
--------
.. include:: /includes/extracts/serverStatus-command-projection.rst
For example, the following operation excludes the ``repl``,
``metrics`` and ``locks`` information in the output.
.. code-block:: javascript
db.runCommand( { serverStatus: 1, repl: 0, metrics: 0, locks: 0 } )
For example, the following operation excludes the embedded ``histogram``
field in the output.
.. code-block:: javascript
db.runCommand( { serverStatus: 1, metrics: { query: { multiPlanner: { histograms: false } } } } )
The following example includes
all :ref:`server-status-repl` information in the output:
.. code-block:: javascript
db.runCommand( { serverStatus: 1, repl: 1 } )
Initialization
~~~~~~~~~~~~~~
The statistics reported by :dbcommand:`serverStatus` are reset when the
:binary:`~bin.mongod` server is restarted.
This command will always return a value, even on a fresh database. The
related command :method:`db.serverStatus()` does not always return a
value unless a counter has started to increment for a particular
metric.
After you run an update query, ``db.serverStatus()`` and
``db.runCommand({ serverStatus: 1})`` both return the same values.
.. code-block:: javascript
:copyable: false
{
arrayFilters : Long("0"),
failed : Long("0"),
pipeline : Long("0"),
total : Long("1")
}
Include ``mirroredReads``
~~~~~~~~~~~~~~~~~~~~~~~~~
By default, the :serverstatus:`mirroredReads` information is not included in
the output. To return :serverstatus:`mirroredReads` information, you must
explicitly specify the inclusion:
.. code-block:: javascript
db.runCommand( { serverStatus: 1, mirroredReads: 1 } )
.. _server-status-output:
Output
------
.. note::
The output fields vary depending on the version of MongoDB,
underlying operating system platform, the storage engine, and the
kind of node, including :binary:`~bin.mongos`, :binary:`~bin.mongod` or
:term:`replica set` member.
For the :dbcommand:`serverStatus` output specific to the version of
your MongoDB, refer to the appropriate version of the MongoDB Manual.
.. _server-status-asserts:
asserts
~~~~~~~
.. code-block:: javascript
asserts : {
regular : <num>,
warning : <num>,
msg : <num>,
user : <num>,
rollovers : <num>
},
.. serverstatus:: asserts
A document that reports on the number of assertions raised since the
MongoDB process started. Assertions are internal checks for errors that
occur while the database is operating and can help diagnose issues with the
MongoDB server. Non-zero asserts values indicate assertion errors, which are
uncommon and not an immediate cause for concern. Errors that generate asserts
can be recorded in the log file or returned directly to a client application
for more information.
.. serverstatus:: asserts.regular
The number of regular assertions raised since the MongoDB process
started. Examine the MongoDB log for more information.
.. serverstatus:: asserts.warning
This field always returns zero ``0``.
.. serverstatus:: asserts.msg
The number of message assertions raised since the MongoDB process
started. Examine the log file for more information about these
messages.
.. serverstatus:: asserts.user
The number of "user asserts" that have occurred since the last time
the MongoDB process started. 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 log file for more information about these
messages.
.. serverstatus:: asserts.rollovers
The number of times that the assert counters have rolled over
since the last time the MongoDB process started. The counters will
roll over to zero after 2\ :superscript:`30` assertions. Use this
value to provide context to the other values in the
:serverstatus:`asserts` data structure.
.. _server-status-bucketcatalog:
bucketCatalog
~~~~~~~~~~~~~
.. code-block:: javascript
bucketCatalog : {
numBuckets : <num>,
numOpenBuckets : <num>,
numIdleBuckets : <num>,
memoryUsage : <num>
}
.. versionadded:: 5.0
A document that reports metrics related to the internal storage of
time series collections.
The ``bucketCatalog`` returns the following metrics:
.. list-table::
:header-rows: 1
:widths: 30 70
* - Metric
- Description
* - ``numBuckets``
- The number of buckets that store time series data internally.
* - ``numOpenBuckets``
- The number of active, uncommitted writes to buckets.
* - ``numIdleBuckets``
- The number of buckets that are not full and can store incoming
time series data.
* - ``memoryUsage``
- The number of bytes used by internal bucketing data structures.
.. _server-status-catalogStats:
catalogStats
~~~~~~~~~~~~
.. versionadded:: 5.1
.. code-block:: javascript
catalogStats: {
collections: <num>,
capped: <num>,
views: <num>,
timeseries: <num>,
internalCollections: <num>,
internalViews: <num>
}
.. serverstatus:: catalogStats
A document that reports statistics on collection usage via collection counts.
.. serverstatus:: catalogStats.collections
The total number of user collections (not including system
collections).
.. serverstatus:: catalogStats.capped
The total number of capped user collections.
.. serverstatus:: catalogStats.views
The total number of user views.
.. serverstatus:: catalogStats.timeseries
The total number of time series collections.
.. serverstatus:: catalogStats.internalCollections
The total number of system collections (collections on the
``config``, ``admin``, or ``local`` databases).
.. serverstatus:: catalogStats.internalViews
The total number of views of system collections (collections on the
``config``, ``admin``, or ``local`` databases).
.. _server-status-changeStreamPreImages:
changeStreamPreImages
~~~~~~~~~~~~~~~~~~~~~
.. versionadded:: 5.0
.. code-block:: javascript
changeStreamPreImages : {
purgingJob : {
totalPass : <num>,
docsDeleted : <num>,
bytesDeleted : <num>,
scannedCollections : <num>,
scannedInternalCollections : <num>,
maxStartWallTimeMillis : <num>,
timeElapsedMillis : <num>,
},
expireAfterSeconds : <num>
}
A document that reports metrics related to
:ref:`change stream pre-images <change-stream-pre-post-images>`.
.. serverstatus:: changeStreamPreImages.purgingJob
.. versionadded:: 7.1
A document that reports metrics related to the purging jobs for
change stream pre-images. Purging jobs are background processes
that the system uses to remove pre-images asynchronously.
The ``changeStreamPreImages.purgingJob`` field returns the
following metrics:
.. list-table::
:header-rows: 1
:widths: 30 70
* - Metric
- Description
* - ``totalPass``
- Total number of deletion passes completed by the purging job.
* - ``docsDeleted``
- Cumulative number of pre-image documents deleted by the purging job.
* - ``bytesDeleted``
- Cumulative size in bytes of all deleted documents from all
pre-image collections by the purging job.
* - ``scannedCollections``
- Cumulative number of pre-image collections scanned by the purging job.
.. note::
In single-tenant environments, this number is the same as
``totalPass`` since each tenant has one pre-image collection.
* - ``scannedInternalCollections``
- Cumulative number of internal pre-image collections scanned by the
purging job. Internal collections are the collections within the pre-image
collections stored in ``config.system.preimages``.
* - ``maxStartWallTimeMillis``
- Maximum wall time in milliseconds from the first document of each
pre-image collection.
* - ``timeElapsedMillis``
- Cumulative time in milliseconds of all deletion passes by the
purging job.
.. serverstatus:: changeStreamPreImages.expireAfterSeconds
.. versionadded:: 7.1
Amount of time in seconds that MongoDB retains pre-images. If
:parameter:`~changeStreamOptions.preAndPostImages.expireAfterSeconds`
is not defined, this metric does not appear in the ``serverStatus``
output.
.. _server-status-connections:
connections
~~~~~~~~~~~
.. code-block:: javascript
connections : {
current : <num>,
available : <num>,
totalCreated : <num>,
rejected : <num>, // Added in MongoDB 6.3
active : <num>,
threaded : <num>,
exhaustIsMaster : <num>,
exhaustHello : <num>,
awaitingTopologyChanges : <num>,
loadBalanced : <num>
},
.. serverstatus:: 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.
.. serverstatus:: connections.current
The number of incoming connections from clients to the database
server. This number includes the current shell session. Consider
the value of :serverstatus:`connections.available` to add more
context to this datum.
The value will include all incoming connections including any shell
connections or connections from other servers, such as
:term:`replica set` members or :binary:`~bin.mongos` instances.
.. serverstatus:: connections.available
The number of unused incoming connections available. Consider this
value in combination with the value of
:serverstatus:`connections.current` to understand the connection
load on the database, and the :doc:`/reference/ulimit` document for
more information about system thresholds on available connections.
.. serverstatus:: connections.totalCreated
Count of **all** incoming connections created to the server. This
number includes connections that have since closed.
.. serverstatus:: connections.rejected
.. versionadded:: 6.3
The number of incoming connections the server rejected because the
server doesn't have the capacity to accept additional connections or
the :setting:`net.maxIncomingConnections` setting is reached.
.. serverstatus:: connections.active
The number of active client connections to the server. Active client
connections refers to client connections that currently have
operations in progress.
.. serverstatus:: connections.threaded
The number of incoming connections from clients that are assigned
to threads that service client requests.
.. versionadded:: 5.0
.. serverstatus:: connections.exhaustIsMaster
The number of connections whose last request was an
``isMaster`` request with :ref:`exhaustAllowed <wire-msg-flags>`.
.. note::
If you are running MongoDB 5.0 or later, do not use the
``isMaster`` command. Instead, use :dbcommand:`hello`.
.. serverstatus:: connections.exhaustHello
The number of connections whose last request was a :dbcommand:`hello`
request with :ref:`exhaustAllowed <wire-msg-flags>`.
.. versionadded:: 5.0
.. serverstatus:: connections.awaitingTopologyChanges
The number of clients currently waiting in a :dbcommand:`hello` or
``isMaster`` request for a topology change.
.. note::
If you are running MongoDB 5.0 or later, do not use the
``isMaster`` command. Instead, use :dbcommand:`hello`.
.. serverstatus:: connections.loadBalanced
.. versionadded:: 5.3
The current number of incoming connections received through the
load balancer.
.. _server-status-defaultRWConcern:
defaultRWConcern
~~~~~~~~~~~~~~~~
The ``defaultRWConcern`` section provides information on the local copy
of the global default read or write concern settings. The data may be
stale or out of date. See :dbcommand:`getDefaultRWConcern` for more
information.
.. code-block:: javascript
defaultRWConcern : {
defaultReadConcern : {
level : <string>
},
defaultWriteConcern : {
w : <string> | <int>,
wtimeout : <int>,
j : <bool>
},
defaultWriteConcernSource: <string>,
defaultReadConcernSource: <string>,
updateOpTime : Timestamp,
updateWallClockTime : Date,
localUpdateWallClockTime : Date
}
.. serverstatus:: defaultRWConcern
The last known global default read or write concern settings.
.. serverstatus:: defaultRWConcern.defaultReadConcern
The last known global default :ref:`read concern <read-concern>`
setting.
If :dbcommand:`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:: defaultRWConcern.defaultReadConcern.level
The last known global default :ref:`read concern level
<read-concern-levels>` setting.
If :dbcommand:`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:: defaultRWConcern.defaultWriteConcern
The last known global default :ref:`write concern <write-concern>`
setting.
If :dbcommand:`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:: defaultRWConcern.defaultWriteConcern.w
The last known global default :ref:`w <wc-w>` setting.
If :dbcommand:`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:: defaultRWConcern.defaultWriteConcern.wtimeout
The last known global default :ref:`wtimeout <wc-wtimeout>` setting.
If :dbcommand:`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:: defaultRWConcern.defaultWriteConcernSource
.. include:: /includes/fact-defaultWriteConcernSource-possible-values.rst
.. versionadded:: 5.0
.. serverstatus:: defaultRWConcern.defaultReadConcernSource
.. include:: /includes/fact-defaultReadConcernSource-possible-values.rst
.. versionadded:: 5.0
.. serverstatus:: defaultRWConcern.updateOpTime
The timestamp when the instance last updated its copy of any global
read or write concern settings. If the
:serverstatus:`defaultRWConcern.defaultReadConcern` and
:serverstatus:`defaultRWConcern.defaultWriteConcern` fields are
absent, this field indicates the timestamp when the defaults were
last unset.
.. serverstatus:: defaultRWConcern.updateWallClockTime
The wall clock time when the instance last updated its copy of any
global read or write concern settings. If the
:serverstatus:`defaultRWConcern.defaultReadConcern` and
:serverstatus:`defaultRWConcern.defaultWriteConcern` fields are
absent, this field indicates the time when the defaults were last
unset.
.. serverstatus:: 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 :serverstatus:`defaultRWConcern`, the instance
has never had knowledge of a global default read or write concern
setting.
.. _server-status-electionMetrics:
electionMetrics
~~~~~~~~~~~~~~~
The ``electionMetrics`` section provides information on elections
called by this :binary:`~bin.mongod` instance in a bid to become the
primary:
.. code-block:: javascript
electionMetrics : {
stepUpCmd : {
called : Long("<num>"),
successful : Long("<num>")
},
priorityTakeover : {
called : Long("<num>"),
successful : Long("<num>")
},
catchUpTakeover : {
called : Long("<num>"),
successful : Long("<num>")
},
electionTimeout : {
called : Long("<num>"),
successful : Long("<num>")
},
freezeTimeout : {
called : Long("<num>"),
successful : Long("<num>")
},
numStepDownsCausedByHigherTerm : Long("<num>"),
numCatchUps : Long("<num>"),
numCatchUpsSucceeded : Long("<num>"),
numCatchUpsAlreadyCaughtUp : Long("<num>"),
numCatchUpsSkipped : Long("<num>"),
numCatchUpsTimedOut : Long("<num>"),
numCatchUpsFailedWithError : Long("<num>"),
numCatchUpsFailedWithNewTerm : Long("<num>"),
numCatchUpsFailedWithReplSetAbortPrimaryCatchUpCmd : Long("<num>"),
averageCatchUpOps : <double>
}
.. serverstatus:: electionMetrics.stepUpCmd
Metrics on elections that were called by the :binary:`~bin.mongod`
instance as part of an election handoff when the primary stepped down.
The :serverstatus:`~electionMetrics.stepUpCmd` includes both the number of elections
called and the number of elections that succeeded.
.. serverstatus:: electionMetrics.priorityTakeover
Metrics on elections that were called by the :binary:`~bin.mongod`
instance because its :rsconf:`~members[n].priority` is higher
than the primary's.
The :serverstatus:`electionMetrics.priorityTakeover` includes both the number of
elections called and the number of elections that succeeded.
.. serverstatus:: electionMetrics.catchUpTakeover
Metrics on elections called by the :binary:`~bin.mongod` instance
because it is more current than the primary.
The :serverstatus:`~electionMetrics.catchUpTakeover` includes both the number of
elections called and the number of elections that succeeded.
.. seealso::
:rsconf:`settings.catchUpTakeoverDelayMillis`
.. serverstatus:: electionMetrics.electionTimeout
Metrics on elections called by the :binary:`~bin.mongod` instance
because it has not been able to reach the primary within
:rsconf:`settings.electionTimeoutMillis`.
The :serverstatus:`~electionMetrics.electionTimeout` includes both the number of
elections called and the number of elections that succeeded.
.. seealso::
:rsconf:`settings.electionTimeoutMillis`
.. serverstatus:: electionMetrics.freezeTimeout
Metrics on elections called by the :binary:`~bin.mongod` instance
after its :dbcommand:`freeze period <replSetFreeze>` (during which the
member cannot seek an election) has expired.
The :serverstatus:`electionMetrics.freezeTimeout` includes both the number of
elections called and the number of elections that succeeded.
.. serverstatus:: electionMetrics.numStepDownsCausedByHigherTerm
Number of times the :binary:`~bin.mongod` instance stepped down
because it saw a higher term (specifically, other member(s)
participated in additional elections).
.. serverstatus:: electionMetrics.numCatchUps
Number of elections where the :binary:`~bin.mongod` instance as the
newly-elected primary had to catch up to the highest known oplog
entry.
.. serverstatus:: electionMetrics.numCatchUpsSucceeded
Number of times the :binary:`~bin.mongod` instance as the
newly-elected primary successfully caught up to the highest known
oplog entry.
.. serverstatus:: electionMetrics.numCatchUpsAlreadyCaughtUp
Number of times the :binary:`~bin.mongod` instance as the
newly-elected primary concluded its catchup process because it was
already caught up when elected.
.. serverstatus:: electionMetrics.numCatchUpsSkipped
Number of times the :binary:`~bin.mongod` instance as the
newly-elected primary skipped the catchup process.
.. serverstatus:: electionMetrics.numCatchUpsTimedOut
Number of times the :binary:`~bin.mongod` instance as the
newly-elected primary concluded its catchup process because of the
:rsconf:`settings.catchUpTimeoutMillis` limit.
.. serverstatus:: electionMetrics.numCatchUpsFailedWithError
Number of times the newly-elected primary's catchup process failed
with an error.
.. serverstatus:: 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).
.. serverstatus:: electionMetrics.numCatchUpsFailedWithReplSetAbortPrimaryCatchUpCmd
Number of times the newly-elected primary's catchup process
concluded because the :binary:`~bin.mongod` received the
:dbcommand:`replSetAbortPrimaryCatchUp` command.
.. serverstatus:: electionMetrics.averageCatchUpOps
Average number of operations applied during the newly-elected
primary's catchup processes.
.. _server-status-extra-info:
.. _server-status-extra_info:
.. _server-status-extrainfo:
extra_info
~~~~~~~~~~
.. code-block:: javascript
extra_info : {
note : 'fields vary by platform',
page_faults : <num>
},
.. serverstatus:: extra_info
A document that provides additional information about the underlying
system.
.. serverstatus:: extra_info.note
A string with the text ``'fields vary by platform'``
.. serverstatus:: extra_info.page_faults
The total number of page faults. The
:serverstatus:`extra_info.page_faults` counter may increase
dramatically during moments of poor performance and may correlate
with limited memory environments and larger data sets. 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. MongoDB
counts both hard and soft page faults in this statistic.
.. _server-status-flowControl:
flowControl
~~~~~~~~~~~
.. code-block:: javascript
flowControl : {
enabled : <boolean>,
targetRateLimit : <int>,
timeAcquiringMicros : Long("<num>"),
locksPerKiloOp : <double>,
sustainerRate : <int>,
isLagged : <boolean>,
isLaggedCount : <int>,
isLaggedTimeMicros : Long("<num>")
},
.. serverstatus:: flowControl
A document that returns statistics on the :ref:`flow-control`. With
flow control enabled, as the :data:`majority commit
<replSetGetStatus.optimes.lastCommittedOpTime>` point lag grows
close to the :parameter:`flowControlTargetLagSeconds`, writes on the
primary must obtain tickets before taking locks. As such, the
metrics returned are meaningful when run on the primary.
.. serverstatus:: flowControl.enabled
A boolean that indicates whether :ref:`flow-control` is
enabled (``true``) or disabled (``false``).
See also :parameter:`enableFlowControl`.
.. serverstatus:: 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.
.. serverstatus:: 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.
.. serverstatus:: flowControl.locksPerKiloOp
When run on the primary, an approximation of the number of locks
taken per 1000 operations.
When run on a secondary, the returned number is a placeholder.
.. serverstatus:: 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.
.. serverstatus:: 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
:parameter:`flowControlTargetLagSeconds`.
Replication lag can occur without engaging flow control.
An unresponsive :term:`secondary` might lag without the replica set
receiving sufficient load to engage flow control, leaving
the :serverstatus:`flowControl.isLagged` value at ``false``.
For additional information, see :ref:`Flow Control <flow-control>`.
.. serverstatus:: 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
:parameter:`flowControlTargetLagSeconds`.
When run on a secondary, the returned number is a placeholder.
.. serverstatus:: 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
:parameter:`flowControlTargetLagSeconds`.
When run on a secondary, the returned number is a placeholder.
.. _globalLock:
.. _globallock:
.. _global-lock:
.. _server-status-globallock:
.. _server-status-global-lock:
globalLock
~~~~~~~~~~
.. code-block:: javascript
globalLock : {
totalTime : Long("<num>"),
currentQueue : {
total : <num>,
readers : <num>,
writers : <num>
},
activeClients : {
total : <num>,
readers : <num>,
writers : <num>
}
},
.. serverstatus:: globalLock
A document that reports on the database's lock state.
Generally, the :ref:`locks <locks>` document provides more detailed
data on lock uses.
.. serverstatus:: globalLock.totalTime
The time, in microseconds, since the database last started and
created the :serverstatus:`globalLock`. This is approximately
equivalent to the total server uptime.
.. serverstatus:: globalLock.currentQueue
A document that provides information concerning the number of
operations queued because of a lock.
.. serverstatus:: globalLock.currentQueue.total
The total number of operations queued waiting for the lock (i.e.,
the sum of :serverstatus:`globalLock.currentQueue.readers` and
:serverstatus:`globalLock.currentQueue.writers`).
A consistently small queue, particularly of shorter operations,
should cause no concern. The
:serverstatus:`globalLock.activeClients` readers and writers
information provides context for this data.
.. serverstatus:: 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.
.. serverstatus:: 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.
.. serverstatus:: 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
:serverstatus:`globalLock.currentQueue` data.
.. serverstatus:: 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.
.. serverstatus:: globalLock.activeClients.readers
The number of the active client connections performing read
operations.
.. serverstatus:: globalLock.activeClients.writers
The number of active client connections performing write operations.
.. _server-status-hedgingMetrics:
hedgingMetrics
~~~~~~~~~~~~~~
.. important::
.. include:: /includes/hedged-reads-deprecated.rst
For :binary:`~bin.mongos` instances only.
.. code-block:: javascript
hedgingMetrics : {
numTotalOperations : <num>,
numTotalHedgedOperations : <num>,
numAdvantageouslyHedgedOperations : <num>