Skip to content

Commit 53c31b2

Browse files
author
Kay Kim
committed
DOCS-11252: 4.2 currentOp output baseline
1 parent a1111a2 commit 53c31b2

File tree

2 files changed

+298
-89
lines changed

2 files changed

+298
-89
lines changed
Lines changed: 298 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,300 @@
1-
.. versionchanged:: 4.2
1+
.. tabs::
22

3-
.. code-block:: javascript
3+
tabs:
4+
5+
- id: standalone
6+
name: Standalone
7+
content: |
48

5-
{
6-
"inprog": [
7-
{
8-
"type" : <string>,
9-
"host" : <string>,
10-
"desc" : <string>,
11-
"connectionId" : <number>,
12-
"client" : <string>,
13-
"appName" : <string>,
14-
"clientMetadata" : <document>,
15-
"active" : <boolean>,
16-
"currentOpTime" : <string>,
17-
"opid" : <number>,
18-
"secs_running" : <NumberLong()>,
19-
"microsecs_running" : <number>,
20-
"op" : <string>,
21-
"ns" : <string>,
22-
"command" : <document>,
23-
"planSummary": <string>,
24-
"cursor" : { // only for getMore operations
25-
"cursorId" : <NumberLong()>,
26-
"createdDate" : <ISODate()>,
27-
"lastAccessDate" : <ISODate()>,
28-
"nDocsReturned" : <NumberLong()>,
29-
"nBatchesReturned" : <NumberLong()>,
30-
"noCursorTimeout" : <boolean>,
31-
"tailable" : <boolean>,
32-
"awaitData" : <boolean>,
33-
"originatingCommand" : <document>,
34-
"planSummary" : <string>,
35-
"operationUsingCursorId" : <NumberLong()>
36-
},
37-
"msg": <string>,
38-
"progress" : {
39-
"done" : <number>,
40-
"total" : <number>
41-
},
42-
"killPending" : <boolean>,
43-
"numYields" : <number>,
44-
"locks" : {
45-
"Global" : <string>,
46-
"Database" : <string>,
47-
"Collection" : <string>,
48-
"Metadata" : <string>,
49-
"oplog" : <string>
50-
},
51-
"waitingForLock" : <boolean>,
52-
"lockStats" : {
53-
"Global": {
54-
"acquireCount": {
55-
"r": <NumberLong>,
56-
"w": <NumberLong>,
57-
"R": <NumberLong>,
58-
"W": <NumberLong>
59-
},
60-
"acquireWaitCount": {
61-
"r": <NumberLong>,
62-
"w": <NumberLong>,
63-
"R": <NumberLong>,
64-
"W": <NumberLong>
65-
},
66-
"timeAcquiringMicros" : {
67-
"r" : NumberLong(0),
68-
"w" : NumberLong(0),
69-
"R" : NumberLong(0),
70-
"W" : NumberLong(0)
71-
},
72-
"deadlockCount" : {
73-
"r" : NumberLong(0),
74-
"w" : NumberLong(0),
75-
"R" : NumberLong(0),
76-
"W" : NumberLong(0)
77-
}
78-
},
79-
"Database" : {
80-
...
81-
},
82-
...
83-
}
84-
},
85-
...
86-
],
87-
"fsyncLock": <boolean>,
88-
"info": <string>
89-
}
9+
The following is a prototype of the :dbcommand:`currentOp`
10+
output when run on a standalone:
11+
12+
.. versionchanged:: 4.2
13+
14+
.. code-block:: javascript
15+
16+
{
17+
"inprog": [
18+
{
19+
"type" : <string>,
20+
"host" : <string>,
21+
"desc" : <string>,
22+
"connectionId" : <number>,
23+
"client" : <string>,
24+
"appName" : <string>,
25+
"clientMetadata" : <document>,
26+
"active" : <boolean>,
27+
"currentOpTime" : <string>,
28+
"opid" : <number>,
29+
"secs_running" : <NumberLong()>,
30+
"microsecs_running" : <number>,
31+
"op" : <string>,
32+
"ns" : <string>,
33+
"command" : <document>,
34+
"planSummary": <string>,
35+
"cursor" : { // only for getMore operations
36+
"cursorId" : <NumberLong()>,
37+
"createdDate" : <ISODate()>,
38+
"lastAccessDate" : <ISODate()>,
39+
"nDocsReturned" : <NumberLong()>,
40+
"nBatchesReturned" : <NumberLong()>,
41+
"noCursorTimeout" : <boolean>,
42+
"tailable" : <boolean>,
43+
"awaitData" : <boolean>,
44+
"originatingCommand" : <document>,
45+
"planSummary" : <string>,
46+
"operationUsingCursorId" : <NumberLong()>
47+
},
48+
"msg": <string>,
49+
"progress" : {
50+
"done" : <number>,
51+
"total" : <number>
52+
},
53+
"killPending" : <boolean>,
54+
"numYields" : <number>,
55+
"locks" : {
56+
"Global" : <string>,
57+
"Database" : <string>,
58+
"Collection" : <string>,
59+
"Metadata" : <string>,
60+
"oplog" : <string>
61+
},
62+
"waitingForLock" : <boolean>,
63+
"lockStats" : {
64+
"Global": {
65+
"acquireCount": {
66+
"r": <NumberLong>,
67+
"w": <NumberLong>,
68+
"R": <NumberLong>,
69+
"W": <NumberLong>
70+
},
71+
"acquireWaitCount": {
72+
"r": <NumberLong>,
73+
"w": <NumberLong>,
74+
"R": <NumberLong>,
75+
"W": <NumberLong>
76+
},
77+
"timeAcquiringMicros" : {
78+
"r" : NumberLong(0),
79+
"w" : NumberLong(0),
80+
"R" : NumberLong(0),
81+
"W" : NumberLong(0)
82+
},
83+
"deadlockCount" : {
84+
"r" : NumberLong(0),
85+
"w" : NumberLong(0),
86+
"R" : NumberLong(0),
87+
"W" : NumberLong(0)
88+
}
89+
},
90+
"Database" : {
91+
...
92+
},
93+
...
94+
}
95+
},
96+
...
97+
],
98+
"fsyncLock": <boolean>,
99+
"info": <string>,
100+
"ok": <num>
101+
}
102+
- id: repl
103+
name: Replica Set (Primary)
104+
content: |
105+
106+
The following is a prototype of the :dbcommand:`currentOp`
107+
output when run on a primary of a replica set:
108+
109+
.. versionchanged:: 4.2
110+
111+
.. code-block:: javascript
112+
113+
{
114+
"inprog": [
115+
{
116+
"type" : <string>,
117+
"host" : <string>,
118+
"desc" : <string>,
119+
"connectionId" : <number>,
120+
"client" : <string>,
121+
"appName" : <string>,
122+
"clientMetadata" : <document>,
123+
"active" : <boolean>,
124+
"currentOpTime" : <string>,
125+
"opid" : <number>,
126+
"secs_running" : <NumberLong()>,
127+
"microsecs_running" : <number>,
128+
"op" : <string>,
129+
"ns" : <string>,
130+
"command" : <document>,
131+
"planSummary": <string>,
132+
"cursor" : { // only for getMore operations
133+
"cursorId" : <NumberLong()>,
134+
"createdDate" : <ISODate()>,
135+
"lastAccessDate" : <ISODate()>,
136+
"nDocsReturned" : <NumberLong()>,
137+
"nBatchesReturned" : <NumberLong()>,
138+
"noCursorTimeout" : <boolean>,
139+
"tailable" : <boolean>,
140+
"awaitData" : <boolean>,
141+
"originatingCommand" : <document>,
142+
"planSummary" : <string>,
143+
"operationUsingCursorId" : <NumberLong()>
144+
},
145+
"msg": <string>,
146+
"progress" : {
147+
"done" : <number>,
148+
"total" : <number>
149+
},
150+
"killPending" : <boolean>,
151+
"numYields" : <number>,
152+
"locks" : {
153+
"Global" : <string>,
154+
"Database" : <string>,
155+
"Collection" : <string>,
156+
"Metadata" : <string>,
157+
"oplog" : <string>
158+
},
159+
"waitingForLock" : <boolean>,
160+
"lockStats" : {
161+
"Global": {
162+
"acquireCount": {
163+
"r": <NumberLong>,
164+
"w": <NumberLong>,
165+
"R": <NumberLong>,
166+
"W": <NumberLong>
167+
},
168+
"acquireWaitCount": {
169+
"r": <NumberLong>,
170+
"w": <NumberLong>,
171+
"R": <NumberLong>,
172+
"W": <NumberLong>
173+
},
174+
"timeAcquiringMicros" : {
175+
"r" : NumberLong(0),
176+
"w" : NumberLong(0),
177+
"R" : NumberLong(0),
178+
"W" : NumberLong(0)
179+
},
180+
"deadlockCount" : {
181+
"r" : NumberLong(0),
182+
"w" : NumberLong(0),
183+
"R" : NumberLong(0),
184+
"W" : NumberLong(0)
185+
}
186+
},
187+
"Database" : {
188+
...
189+
},
190+
...
191+
}
192+
},
193+
...
194+
],
195+
"fsyncLock": <boolean>,
196+
"info": <string>,
197+
"ok": <num>,
198+
"operationTime": <timestamp>,
199+
"$clusterTime": <document>
200+
}
201+
202+
- id: shardedcluster
203+
name: Sharded Cluster (mongos)
204+
content: |
205+
206+
The following is a prototype of the :dbcommand:`currentOp`
207+
output when run on a :binary:`~bin.mongos` of a sharded
208+
cluster:
209+
210+
.. versionchanged:: 4.2
211+
212+
.. code-block:: javascript
213+
214+
{
215+
"inprog": [
216+
{
217+
"shard": <string>,
218+
"type" : <string>,
219+
"host" : <string>,
220+
"desc" : <string>,
221+
"connectionId" : <number>,
222+
"client_s" : <string>,
223+
"appName" : <string>,
224+
"clientMetadata" : <document>,
225+
"active" : <boolean>,
226+
"currentOpTime" : <string>,
227+
"opid" : <number>,
228+
"secs_running" : <NumberLong()>,
229+
"microsecs_running" : <number>,
230+
"op" : <string>,
231+
"ns" : <string>,
232+
"command" : <document>,
233+
"planSummary": <string>,
234+
"cursor" : { // only for getMore operations
235+
"cursorId" : <NumberLong()>,
236+
"createdDate" : <ISODate()>,
237+
"lastAccessDate" : <ISODate()>,
238+
"nDocsReturned" : <NumberLong()>,
239+
"nBatchesReturned" : <NumberLong()>,
240+
"noCursorTimeout" : <boolean>,
241+
"tailable" : <boolean>,
242+
"awaitData" : <boolean>,
243+
"originatingCommand" : <document>,
244+
"planSummary" : <string>,
245+
"operationUsingCursorId" : <NumberLong()>
246+
},
247+
"msg": <string>,
248+
"progress" : {
249+
"done" : <number>,
250+
"total" : <number>
251+
},
252+
"killPending" : <boolean>,
253+
"numYields" : <number>,
254+
"locks" : {
255+
"Global" : <string>,
256+
"Database" : <string>,
257+
"Collection" : <string>,
258+
"Metadata" : <string>,
259+
"oplog" : <string>
260+
},
261+
"waitingForLock" : <boolean>,
262+
"lockStats" : {
263+
"Global": {
264+
"acquireCount": {
265+
"r": <NumberLong>,
266+
"w": <NumberLong>,
267+
"R": <NumberLong>,
268+
"W": <NumberLong>
269+
},
270+
"acquireWaitCount": {
271+
"r": <NumberLong>,
272+
"w": <NumberLong>,
273+
"R": <NumberLong>,
274+
"W": <NumberLong>
275+
},
276+
"timeAcquiringMicros" : {
277+
"r" : NumberLong(0),
278+
"w" : NumberLong(0),
279+
"R" : NumberLong(0),
280+
"W" : NumberLong(0)
281+
},
282+
"deadlockCount" : {
283+
"r" : NumberLong(0),
284+
"w" : NumberLong(0),
285+
"R" : NumberLong(0),
286+
"W" : NumberLong(0)
287+
}
288+
},
289+
"Database" : {
290+
...
291+
},
292+
...
293+
}
294+
},
295+
...
296+
],
297+
"ok": <num>,
298+
"operationTime": <timestamp>,
299+
"$clusterTime": <document>
300+
}

source/reference/command/currentOp.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,6 @@ The following example returns information on index creation operations:
196196
Output Example
197197
--------------
198198

199-
The following is a prototype of :dbcommand:`currentOp` output.
200-
201199
.. include:: /includes/currentOp-output-example.rst
202200

203201
.. _currentOp-output-fields:

0 commit comments

Comments
 (0)