forked from mongodb/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverStatus.txt
5750 lines (4039 loc) · 184 KB
/
serverStatus.txt
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
.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: singlecol
.. |mongod-only| replace:: *Available on mongod only.*
.. |mongos-only| replace:: *Available on mongos only.*
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.
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 suppresses the ``repl``,
``metrics`` and ``locks`` information in the output.
.. code-block:: javascript
db.runCommand( { serverStatus: 1, repl: 0, metrics: 0, locks: 0 } )
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" : NumberLong(0),
"failed" : NumberLong(0),
"pipeline" : NumberLong(0),
"total" : NumberLong(1)
}
Include ``mirroredReads``
~~~~~~~~~~~~~~~~~~~~~~~~~
By default, the :serverstatus:`mirroredReads` information (available
starting in version 4.4) 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 } )
Include ``latchAnalysis``
~~~~~~~~~~~~~~~~~~~~~~~~~
By default, the :serverstatus:`latchAnalysis` information (available
starting in version 4.4) is not included in the output. To return
:serverstatus:`latchAnalysis` information, you must explicitly specify
the inclusion:
.. code-block:: javascript
db.runCommand( { serverStatus: 1, latchAnalysis: 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-instance-information:
Instance Information
~~~~~~~~~~~~~~~~~~~~
.. code-block:: javascript
"host" : <string>,
"advisoryHostFQDNs" : <array>,
"version" : <string>,
"process" : <"mongod"|"mongos">,
"pid" : NumberLong(<num>),
"uptime" : <num>,
"uptimeMillis" : NumberLong(<num>),
"uptimeEstimate" : NumberLong(<num>),
"localTime" : ISODate(""),
.. serverstatus:: host
The system's hostname. In Unix/Linux systems, this should be the
same as the output of the ``hostname`` command.
.. serverstatus:: advisoryHostFQDNs
.. versionadded:: 3.2
An array of the system's fully qualified domain names (FQDNs).
.. serverstatus:: version
The MongoDB version of the current MongoDB process.
.. serverstatus:: process
The current MongoDB process. Possible values are: :binary:`~bin.mongos` or
:binary:`~bin.mongod`.
.. serverstatus:: pid
The process id number.
.. serverstatus:: uptime
The number of seconds that the current MongoDB process has been
active.
.. serverstatus:: uptimeMillis
The number of milliseconds that the current MongoDB process has been
active.
.. serverstatus:: uptimeEstimate
The uptime in seconds as calculated from MongoDB's internal
course-grained time keeping system.
.. serverstatus:: localTime
The ISODate representing the current time, according to the server,
in UTC.
.. _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. While assert errors are typically uncommon,
if there are non-zero values for the :serverstatus:`asserts`, you
should examine the log file for more information. In many cases,
these errors are trivial, but are worth investigating.
.. serverstatus:: asserts.regular
The number of regular assertions raised since the MongoDB process
started. Examine the log file for more information about these
messages.
.. serverstatus:: asserts.warning
.. versionchanged:: 4.0
Starting in MongoDB 4.0, the field returns zero ``0``.
In earlier versions, the field returns the number of warnings raised
since the MongoDB process started.
.. 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 MongoDB log for more information.
.. serverstatus:: asserts.rollovers
The number of times that the rollover counters have rolled over
since the last time the MongoDB process started. The counters will
rollover 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.
.. versionadded:: 5.0
.. _server-status-connections:
connections
~~~~~~~~~~~
.. code-block:: javascript
"connections" : {
"current" : <num>,
"available" : <num>,
"totalCreated" : <num>,
"active" : <num>,
"threaded" : <num>,
"exhaustIsMaster" : <num>,
"exhaustHello" : <num>,
"awaitingTopologyChanges" : <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.active
The number of active client connections to the server. Active client
connections refers to client connections that currently have
operations in progress.
.. versionadded:: 4.0.7
.. 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`.
.. versionadded:: 4.4
.. serverstatus:: connections.exhaustHello
The number of connections whose last request was a :dbcommand:`hello`
request with :ref:`exhaustAllowed <wire-msg-flags>`.
.. versionadded:: 5.0 (and 4.4.2)
.. 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`.
.. versionadded:: 4.4
.. _server-status-defaultRWConcern:
defaultRWConcern
~~~~~~~~~~~~~~~~
*Available starting in 4.4*
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.
.. versionadded:: 4.4
.. 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.
.. versionadded:: 4.4
.. 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.
.. versionadded:: 4.4
.. 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.
.. versionadded:: 4.4
.. 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.
.. versionadded:: 4.4
.. 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.
.. versionadded:: 4.4
.. 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.
.. versionadded:: 4.4
.. 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.
.. versionadded:: 4.4
.. 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.
.. versionadded:: 4.4
.. _server-status-electionMetrics:
electionMetrics
~~~~~~~~~~~~~~~
*Available starting in 4.2.1 (and 4.0.13)*
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" : 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>
}
.. serverstatus:: electionMetrics.stepUpCmd
Metrics on elections that were called by the :binary:`~bin.mongod`
instance as part of an :parameter:`election handoff
<enableElectionHandoff>` when the primary stepped down.
The :serverstatus:`~electionMetrics.stepUpCmd` includes both the number of elections
called and the number of elections that succeeded.
*Available starting in 4.2.1 (and 4.0.13)*
.. 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.
*Available starting in 4.2.1 (and 4.0.13)*
.. 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`
*Available starting in 4.2.1 (and 4.0.13)*
.. 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`
*Available starting in 4.2.1 (and 4.0.13)*
.. 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.
*Available starting in 4.2.1 (and 4.0.13)*
.. 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).
*Available starting in 4.2.1 (and 4.0.13)*
.. 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.
*Available starting in 4.2.1 (and 4.0.13)*
.. 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.
*Available starting in 4.2.1 (and 4.0.13)*
.. 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.
*Available starting in 4.2.1 (and 4.0.13)*
.. serverstatus:: electionMetrics.numCatchUpsSkipped
Number of times the :binary:`~bin.mongod` instance as the
newly-elected primary skipped the catchup process.
*Available starting in 4.2.1 (and 4.0.13)*
.. 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.
*Available starting in 4.2.1 (and 4.0.13)*
.. serverstatus:: 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)*
.. 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).
*Available starting in 4.2.1 (and 4.0.13)*
.. serverstatus:: electionMetrics.numCatchUpsFailedWithReplSetAbortPrimaryCatchUpCmd
Number of times the newly-elected primary's catchup process
concluded because the :binary:`~bin.mongod` received the
:dbcommand:`replSetAbortPrimaryCatchUp` command.
*Available starting in 4.2.1 (and 4.0.13)*
.. serverstatus:: electionMetrics.averageCatchUpOps
Average number of operations applied during the newly-elected
primary's catchup processes.
*Available starting in 4.2.1*
.. _server-status-extra-info:
.. _server-status-extra_info:
.. _server-status-extrainfo:
extra_info
~~~~~~~~~~
.. code-block:: javascript
"extra_info" : {
"note" : "fields vary by platform.",
"heap_usage_bytes" : <num>,
"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.heap_usage_bytes
The total size in bytes of heap space used by the database process.
Available on Unix/Linux systems only.
.. 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
~~~~~~~~~~~
.. versionadded:: 4.2
.. code-block:: javascript
"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>)
},
.. 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.
.. versionadded:: 4.2
.. serverstatus:: flowControl.enabled
A boolean that indicates whether :ref:`flow-control` is
enabled (``true``) or disabled (``false``).
See also :parameter:`enableFlowControl`.
.. versionadded:: 4.2
.. 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.
.. versionadded:: 4.2
.. 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.
.. versionadded:: 4.2
.. serverstatus:: flowControl.locksPerKiloOp
.. note:: Starting in MongoDB 4.4
:serverstatus:`~flowControl.locksPerKiloOp` replaces
:serverstatus:`~flowControl.locksPerOp` field.
:serverstatus:`~flowControl.locksPerOp` field is available only
on version 4.2.
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.
.. versionadded:: 4.4
.. serverstatus:: flowControl.locksPerOp
.. note:: Available on MongoDB 4.2 only
MongoDB 4.4 replaces :serverstatus:`~flowControl.locksPerOp` with
:serverstatus:`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.
.. versionadded:: 4.2
.. 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.
.. versionadded:: 4.2
.. 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`.
When run on a secondary, the returned boolean is a placeholder.
.. versionadded:: 4.2
.. 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.
.. versionadded:: 4.2
.. 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.
.. versionadded:: 4.2
.. _server-status-freeMonitoring:
freeMonitoring
~~~~~~~~~~~~~~
.. code-block:: javascript
"freeMonitoring" : {
"state" : <string>,
"retryIntervalSecs" : NumberLong(<num>),
"lastRunTime" : <string>,
"registerErrors" : NumberLong(<num>),
"metricsErrors" : NumberLong(<num>)
},
.. serverstatus:: freeMonitoring
A document that reports on the :doc:`free Cloud monitoring
</administration/free-monitoring>`.
.. serverstatus:: freeMonitoring.state
The enablement state of free monitoring. The values can be one of
the following:
- "enabled"
- "disabled"
- "pending" if the enable free monitoring encountered a registeration error.
.. serverstatus:: freeMonitoring.retryIntervalSecs
The frequency, in seconds, at which data is uploaded.
.. serverstatus:: freeMonitoring.lastRunTime
The date and time of the last run of the metrics upload.
.. serverstatus:: freeMonitoring.registerErrors
The number of registration errors, incremented on unexpected HTTP
status or network errors.
.. serverstatus:: freeMonitoring.metricsErrors
The number of errors encountered when uploading metrics.
.. _globalLock:
.. _globallock:
.. _global-lock:
.. _server-status-globallock:
.. _server-status-global-lock:
globalLock
~~~~~~~~~~
.. code-block:: javascript
"globalLock" : {
"totalTime" : NumberLong(<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