Skip to content

Commit 4cecd64

Browse files
DOCSP-34783 Atlas Support for Diagnostics Commands (#5750) (#9464)
* DOCSP-34783 Atlas Support for Diagnostics Commands (#5750) * Fixes build error * Fixes additional whitespace issues --------- Co-authored-by: pierwill <[email protected]>
1 parent 81f1351 commit 4cecd64

20 files changed

+773
-473
lines changed

source/reference/command/buildInfo.txt

+42-29
Original file line numberDiff line numberDiff line change
@@ -15,40 +15,53 @@ buildInfo
1515
The :dbcommand:`buildInfo` command returns a build summary for the current
1616
:binary:`~bin.mongod`.
1717

18-
.. code-block:: javascript
18+
Compatibility
19+
-------------
20+
21+
This command is available in deployments hosted in the following environments:
22+
23+
.. include:: /includes/fact-environments-atlas-only.rst
24+
25+
.. include:: /includes/fact-environments-atlas-support-all.rst
26+
27+
.. include:: /includes/fact-environments-onprem-only.rst
28+
29+
Syntax
30+
------
31+
32+
The command has the following syntax:
33+
34+
.. code-block:: javascript
35+
36+
db.runCommand(
37+
{
38+
buildInfo: 1
39+
}
40+
)
1941

20-
{ buildInfo: 1 }
42+
.. example::
2143

22-
In :binary:`~bin.mongosh`, call :dbcommand:`buildInfo` in the
23-
following form:
44+
The output document of :dbcommand:`buildInfo` has the following
45+
form:
2446

2547
.. code-block:: javascript
2648

27-
db.runCommand( { buildInfo: 1 } )
28-
29-
.. example::
30-
31-
The output document of :dbcommand:`buildInfo` has the following
32-
form:
33-
34-
.. code-block:: javascript
35-
36-
{
37-
"version" : "<string>",
38-
"gitVersion" : "<string>",
39-
"sysInfo" : "<string>",
40-
"loaderFlags" : "<string>",
41-
"compilerFlags" : "<string>",
42-
"allocator" : "<string>",
43-
"versionArray" : [ <num>, <num>, <...> ],
44-
"openssl" : <document>,
45-
"javascriptEngine" : "<string>",
46-
"bits" : <num>,
47-
"debug" : <boolean>,
48-
"maxBsonObjectSize" : <num>,
49-
"storageEngines" : [ "<string>", "<string>", "<...>" ],
50-
"ok" : <num>
51-
}
49+
{
50+
"version" : "<string>",
51+
"gitVersion" : "<string>",
52+
"sysInfo" : "<string>",
53+
"loaderFlags" : "<string>",
54+
"compilerFlags" : "<string>",
55+
"allocator" : "<string>",
56+
"versionArray" : [ <num>, <num>, <...> ],
57+
"openssl" : <document>,
58+
"javascriptEngine" : "<string>",
59+
"bits" : <num>,
60+
"debug" : <boolean>,
61+
"maxBsonObjectSize" : <num>,
62+
"storageEngines" : [ "<string>", "<string>", "<...>" ],
63+
"ok" : <num>
64+
}
5265

5366
Output
5467
------

source/reference/command/collStats.txt

+62-45
Original file line numberDiff line numberDiff line change
@@ -34,56 +34,73 @@ Definition
3434

3535
.. include:: /includes/fact-dbcommand.rst
3636

37-
The :dbcommand:`collStats` command has the following syntax:
37+
Compatibility
38+
-------------
3839

39-
.. code-block:: javascript
40+
This command is available in deployments hosted in the following environments:
4041

41-
{
42-
collStats: <string>,
43-
scale: <int>
44-
}
42+
.. include:: /includes/fact-environments-atlas-only.rst
4543

46-
The command takes the following fields:
44+
.. include:: /includes/fact-environments-atlas-support-all.rst
4745

46+
.. include:: /includes/fact-environments-onprem-only.rst
4847

49-
.. list-table::
50-
:header-rows: 1
51-
:widths: 20 20 80
52-
53-
* - Field
54-
55-
- Type
56-
57-
- Description
58-
59-
* - ``collStats``
60-
61-
- string
62-
63-
- The name of the target collection.
64-
65-
* - ``scale``
66-
67-
- int
68-
69-
- Optional. The scale factor for the various size data (with the exception of
70-
those sizes that specify the unit of measurement in the field name). The
71-
value defaults to 1 to return size data in bytes. To display
72-
kilobytes rather than bytes, specify a ``scale`` value of ``1024``.
73-
74-
If you specify a non-integer scale factor, MongoDB uses the integer
75-
part of the specified factor. For example, if you specify a scale
76-
factor of ``1023.999``, MongoDB uses ``1023`` as the scale factor.
77-
78-
The scale factor rounds the affected size values to whole numbers.
79-
80-
.. include:: /includes/extracts/4.2-changes-stats-scaleFactor.rst
81-
82-
.. note::
83-
84-
Starting in version 4.2, MongoDB removes the MMAPv1 storage
85-
engine. In conjunction with this change, MongoDB removes the
86-
MMAPv1 specific :dbcommand:`collStats` option ``verbose``.
48+
Syntax
49+
------
50+
51+
The command has the following syntax:
52+
53+
.. code-block:: javascript
54+
55+
{
56+
collStats: <string>,
57+
scale: <int>
58+
}
59+
60+
Command Fields
61+
~~~~~~~~~~~~~~
62+
63+
The command takes the following fields:
64+
65+
66+
.. list-table::
67+
:header-rows: 1
68+
:widths: 20 20 80
69+
70+
* - Field
71+
72+
- Type
73+
74+
- Description
75+
76+
* - ``collStats``
77+
78+
- string
79+
80+
- The name of the target collection.
81+
82+
* - ``scale``
83+
84+
- int
85+
86+
- Optional. The scale factor for the various size data (with the exception of
87+
those sizes that specify the unit of measurement in the field name). The
88+
value defaults to 1 to return size data in bytes. To display
89+
kilobytes rather than bytes, specify a ``scale`` value of ``1024``.
90+
91+
If you specify a non-integer scale factor, MongoDB uses the integer
92+
part of the specified factor. For example, if you specify a scale
93+
factor of ``1023.999``, MongoDB uses ``1023`` as the scale factor.
94+
95+
The scale factor rounds the affected size values to whole numbers.
96+
97+
.. include:: /includes/extracts/4.2-changes-stats-scaleFactor.rst
98+
99+
.. note::
100+
101+
Starting in version 4.2, MongoDB removes the MMAPv1 storage
102+
engine. In conjunction with this change, MongoDB removes the
103+
MMAPv1 specific :dbcommand:`collStats` option ``verbose``.
87104

88105
Behavior
89106
--------

source/reference/command/connPoolStats.txt

+19-5
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,28 @@ Definition
2626

2727
.. include:: /includes/note-conn-pool-stats.rst
2828

29-
The command takes the following form:
29+
Compatibility
30+
-------------
3031

31-
.. code-block:: javascript
32+
This command is available in deployments hosted in the following environments:
3233

33-
db.runCommand( { "connPoolStats" : 1 } )
34+
.. include:: /includes/fact-environments-atlas-only.rst
3435

35-
The value of the argument (i.e. ``1`` ) does not affect the
36-
output of the command.
36+
.. include:: /includes/fact-environments-atlas-support-all.rst
37+
38+
.. include:: /includes/fact-environments-onprem-only.rst
39+
40+
Syntax
41+
------
42+
43+
The command has the following syntax:
44+
45+
.. code-block:: javascript
46+
47+
db.runCommand( { "connPoolStats" : 1 } )
48+
49+
The value of the argument (i.e. ``1`` ) does not affect the
50+
output of the command.
3751

3852
Behavior
3953
--------

source/reference/command/connectionStatus.txt

+52-28
Original file line numberDiff line numberDiff line change
@@ -18,37 +18,61 @@ Definition
1818
Returns information about the current connection, specifically the
1919
state of authenticated users and their available permissions.
2020

21-
.. code-block:: javascript
21+
Compatibility
22+
-------------
2223

23-
{ connectionStatus: 1, showPrivileges: <boolean> }
24+
This command is available in deployments hosted in the following environments:
2425

25-
:dbcommand:`connectionStatus` supports the following optional
26-
field:
27-
26+
.. include:: /includes/fact-environments-atlas-only.rst
27+
28+
.. include:: /includes/fact-environments-atlas-support-all.rst
29+
30+
.. include:: /includes/fact-environments-onprem-only.rst
31+
32+
Syntax
33+
------
34+
35+
The command has the following syntax:
36+
37+
.. code-block:: javascript
38+
39+
db.runCommand(
40+
{
41+
connectionStatus: 1,
42+
showPrivileges: <boolean>
43+
}
44+
)
45+
46+
47+
Command Fields
48+
~~~~~~~~~~~~~~
49+
50+
:dbcommand:`connectionStatus` supports the following optional
51+
field:
52+
53+
.. list-table::
54+
:header-rows: 1
55+
:widths: 20 20 80
56+
57+
* - Field
58+
59+
- Type
60+
61+
- Description
62+
63+
* - ``showPrivileges``
64+
65+
- boolean
66+
67+
- Optional. Set ``showPrivileges`` to true to instruct
68+
:dbcommand:`connectionStatus` to return the full set of
69+
:doc:`privileges </reference/privilege-actions>` that
70+
currently-authenticated users possess.
71+
72+
By default, this field is ``false``.
73+
74+
2875

29-
.. list-table::
30-
:header-rows: 1
31-
:widths: 20 20 80
32-
33-
* - Field
34-
35-
- Type
36-
37-
- Description
38-
39-
* - ``showPrivileges``
40-
41-
- boolean
42-
43-
- Optional. Set ``showPrivileges`` to true to instruct
44-
:dbcommand:`connectionStatus` to return the full set of
45-
:doc:`privileges </reference/privilege-actions>` that
46-
currently-authenticated users possess.
47-
48-
By default, this field is ``false``.
49-
50-
51-
5276

5377

5478
Example

0 commit comments

Comments
 (0)