Skip to content

Commit fbcd607

Browse files
authored
DOCSP-21627 Consistent Syntax Examples G-K (#1454)
* DOCSP-21627 Consistent Syntax Examples G-K * updates comment-related include * internal review feedback * internal review feedback
1 parent 061ca14 commit fbcd607

22 files changed

+721
-628
lines changed

source/includes/extracts-dbcommands.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
ref: comment-content
22
content: |
3-
Optional. A user-provided comment to attach to this command.
4-
Once set, this comment appears alongside records of this command
5-
in the following locations:
3+
Optional.
4+
5+
A user-provided comment to attach to this command. Once set, this
6+
comment appears alongside records of this command in the following
7+
locations:
68
79
- :ref:`mongod log messages <log-messages-ref>`, in the
810
``attr.command.cursor.comment`` field.

source/reference/command/getAuditConfig.txt

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,18 @@ Definition
2121
retrieves audit configurations from :binary:`~bin.mongod` and
2222
:binary:`~bin.mongos` server instances.
2323

24-
Use the
25-
:method:`db.adminCommand( { command } )<db.adminCommand()>` method
26-
to run :dbcommand:`getAuditConfig` against the ``admin`` database.
24+
Syntax
25+
------
2726

28-
.. code-block:: javascript
27+
The command has the following syntax:
28+
29+
.. code-block:: javascript
2930

30-
db.adminCommand( { getAuditConfig: 1 } )
31+
db.adminCommand(
32+
{
33+
getAuditConfig: 1
34+
}
35+
)
3136

3237
Behavior
3338
--------

source/reference/command/getClusterParameter.txt

Lines changed: 37 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ getClusterParameter
1010
:depth: 1
1111
:class: singlecol
1212

13+
Definition
14+
----------
15+
1316
.. dbcommand:: getClusterParameter
1417

1518
:dbcommand:`getClusterParameter` is an administrative command for
@@ -19,40 +22,43 @@ getClusterParameter
1922
To run ``getClusterParameter``, use the ``db.adminCommand( { command } )``
2023
method.
2124

22-
Syntax
23-
------
25+
Syntax
26+
------
2427

25-
The ``getClusterParameter`` command has the following syntax:
26-
27-
.. code-block:: javascript
28-
29-
{ getClusterParameter: <parameter> | [<parameter>, <parameter>] | "'*'" }
30-
31-
The command takes the following fields:
28+
The command has the following syntax:
3229

33-
.. list-table::
34-
:header-rows: 1
35-
:widths: 20 20 80
36-
37-
* - Field
38-
39-
- Type
40-
41-
- Description
42-
43-
* - ``<parameter>``
44-
45-
- String or array of strings
30+
.. code-block:: javascript
4631

47-
- You can specify one of the following:
48-
49-
- The name of the parameter you want to retrieve.
50-
51-
- An array with the names of multiple parameters.
52-
53-
- ``'*'``, to return values for all parameters available to
54-
``getClusterParameter``.
55-
32+
db.adminCommand(
33+
{
34+
getClusterParameter: <parameter> | [<parameter>, <parameter>] | "'*'"
35+
}
36+
)
37+
38+
Command Fields
39+
--------------
40+
41+
The command takes the following fields:
42+
43+
.. list-table::
44+
:header-rows: 1
45+
:widths: 20 20 80
46+
47+
* - Field
48+
- Type
49+
- Description
50+
51+
* - ``<parameter>``
52+
- String or array of strings
53+
- You can specify one of the following:
54+
55+
- The name of the parameter you want to retrieve.
56+
57+
- An array with the names of multiple parameters.
58+
59+
- ``'*'``, to return values for all parameters available to
60+
``getClusterParameter``.
61+
5662
Behavior
5763
--------
5864

source/reference/command/getCmdLineOpts.txt

Lines changed: 57 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -10,53 +10,68 @@ getCmdLineOpts
1010
:depth: 1
1111
:class: singlecol
1212

13+
Definition
14+
----------
15+
1316
.. dbcommand:: getCmdLineOpts
1417

1518
The :dbcommand:`getCmdLineOpts` command returns a document
1619
containing command line options used to start the given
1720
:binary:`~bin.mongod` or :binary:`~bin.mongos`. Run
1821
:dbcommand:`getCmdLineOpts` in the ``admin`` database.
1922

20-
.. code-block:: javascript
21-
22-
db.adminCommand( { getCmdLineOpts: 1 } )
23-
24-
This command returns a document with two fields, ``argv`` and
25-
``parsed``. The ``argv`` field contains an array with each item from
26-
the command string used to invoke :binary:`~bin.mongod` or
27-
:binary:`~bin.mongos`. The document in the ``parsed`` field includes all
28-
runtime options, including those parsed from the command line and
29-
those specified in the configuration file, if specified.
30-
31-
Consider the following example output of
32-
:dbcommand:`getCmdLineOpts`:
33-
34-
.. code-block:: javascript
35-
36-
{
37-
"argv" : [
38-
"/usr/bin/mongod",
39-
"--config",
40-
"/etc/mongod.conf"
41-
],
42-
"parsed" : {
43-
"config" : "/etc/mongod.conf",
44-
"net" : {
45-
"bindIp" : "127.0.0.1",
46-
"port" : 27017
47-
},
48-
"processManagement" : {
49-
"fork" : true
50-
},
51-
"storage" : {
52-
"dbPath" : "/data/db"
53-
},
54-
"systemLog" : {
55-
"destination" : "file",
56-
"logAppend" : true,
57-
"path" : "/var/log/mongodb/mongod.log"
58-
}
59-
},
60-
"ok" : 1
61-
}
23+
Syntax
24+
------
25+
26+
The command has the following syntax:
27+
28+
.. code-block:: javascript
29+
30+
db.adminCommand(
31+
{
32+
getCmdLineOpts: 1
33+
}
34+
)
35+
36+
Output
37+
------
6238

39+
This command returns a document with two fields, ``argv`` and
40+
``parsed``. The ``argv`` field contains an array with each item from
41+
the command string used to invoke :binary:`~bin.mongod` or
42+
:binary:`~bin.mongos`. The document in the ``parsed`` field includes all
43+
runtime options, including those parsed from the command line and
44+
those specified in the configuration file, if specified.
45+
46+
Consider the following example output of
47+
:dbcommand:`getCmdLineOpts`:
48+
49+
.. code-block:: javascript
50+
51+
{
52+
"argv" : [
53+
"/usr/bin/mongod",
54+
"--config",
55+
"/etc/mongod.conf"
56+
],
57+
"parsed" : {
58+
"config" : "/etc/mongod.conf",
59+
"net" : {
60+
"bindIp" : "127.0.0.1",
61+
"port" : 27017
62+
},
63+
"processManagement" : {
64+
"fork" : true
65+
},
66+
"storage" : {
67+
"dbPath" : "/data/db"
68+
},
69+
"systemLog" : {
70+
"destination" : "file",
71+
"logAppend" : true,
72+
"path" : "/var/log/mongodb/mongod.log"
73+
}
74+
},
75+
"ok" : 1
76+
}
77+

0 commit comments

Comments
 (0)