From 13f2faaf9eb4bc9c6dd42bdfa2fe26fc621c8f30 Mon Sep 17 00:00:00 2001 From: Bob Grabar Date: Mon, 6 May 2013 11:36:34 -0400 Subject: [PATCH] DOCS-1474 moved serverStatus examples to main reference document --- bin/htaccess.yaml | 2 +- source/reference/command/serverStatus.txt | 454 +++++++++++++++++++++- source/reference/server-status.txt | 448 --------------------- 3 files changed, 451 insertions(+), 453 deletions(-) delete mode 100644 source/reference/server-status.txt diff --git a/bin/htaccess.yaml b/bin/htaccess.yaml index d9a02e8f353..a4cbf9bdfc1 100644 --- a/bin/htaccess.yaml +++ b/bin/htaccess.yaml @@ -1427,7 +1427,7 @@ outputs: - 'v2.2' --- redirect-path: '/reference/server-status-index' -url-base: '/reference/server-status' +url-base: '/reference/command/serverStatus' type: 'redirect' code: 301 outputs: diff --git a/source/reference/command/serverStatus.txt b/source/reference/command/serverStatus.txt index 05759eb7904..614ed7a48c0 100644 --- a/source/reference/command/serverStatus.txt +++ b/source/reference/command/serverStatus.txt @@ -4,6 +4,10 @@ serverStatus .. default-domain:: mongodb +.. contents:: + :backlinks: none + :local: + Definition ---------- @@ -35,11 +39,10 @@ Definition .. |operation-name| replace:: :dbcommand:`serverStatus` .. include:: /includes/example-server-status-projection.rst - .. seealso:: :method:`db.serverStatus()` and ":doc:`/reference/server-status`" + .. seealso:: :method:`db.serverStatus()` .. When adding status fields to this document, make sure that the - ``docs/source/reference/server-status.txt`` document also - reflects those changes. + Examples section also reflects those changes. Output ------ @@ -56,7 +59,7 @@ your database. :doc:`/reference/mongostat` command for more information. For examples of the :dbcommand:`serverStatus` output, see - :doc:`/reference/server-status`. + :ref:`server-status-examples`. .. _server-status-instance-information: @@ -1609,3 +1612,446 @@ metrics :data:`~serverStatus.metrics.ttl.passes` reports the number of times the background process removes documents from collections with a :doc:`ttl index `. + +.. _server-status-examples: + +Examples +-------- + +The following are examples of the :dbcommand:`serverStatus` command +output. The helper :method:`db.serverStatus()` +in the :program:`mongo` shell provides access to this output. + +.. When adding status fields to this section, make sure that the + Output also reflects those changes. + +.. note:: + + The fields included in this output vary slightly depending on the + version of MongoDB, underlying operating system platform, and the + kind of node, including :program:`mongos`, :program:`mongod` or + :term:`replica set` member. + +.. _server-status-example-instance-information: + +The ":ref:`server-status-instance-information`" section displays +information regarding the specific :program:`mongod` and +:program:`mongos` and its state. + +.. code-block:: javascript + + { + "host" : "", + "version" : "", + "process" : "", + "pid" : , + "uptime" : , + "uptimeMillis" : , + "uptimeEstimate" : , + "localTime" : ISODate(""), + +.. _server-status-example-locks: + +The ":ref:`server-status-locks`" section reports data that reflect the +state and use of both global (i.e. ``.``) and database specific locks: + +.. code-block:: javascript + + "locks" : { + "." : { + "timeLockedMicros" : { + "R" : , + "W" : + }, + "timeAcquiringMicros" : { + "R" : , + "W" : + } + }, + "admin" : { + "timeLockedMicros" : { + "r" : , + "w" : + }, + "timeAcquiringMicros" : { + "r" : , + "w" : + } + }, + "local" : { + "timeLockedMicros" : { + "r" : , + "w" : + }, + "timeAcquiringMicros" : { + "r" : , + "w" : + } + }, + "" : { + "timeLockedMicros" : { + "r" : , + "w" : + }, + "timeAcquiringMicros" : { + "r" : , + "w" : + } + } + }, + +.. _server-status-example-globallock: + +The ":ref:`server-status-globallock`" field reports on MongoDB's +global system lock. In most cases the :ref:`locks ` document +provides more fine grained data that reflects lock use: + +.. code-block:: javascript + + "globalLock" : { + "totalTime" : , + "lockTime" : , + "currentQueue" : { + "total" : , + "readers" : , + "writers" : + }, + "activeClients" : { + "total" : , + "readers" : , + "writers" : + } + }, + +.. _server-status-example-memory: + +The ":ref:`server-status-memory`" field reports on MongoDB's +current memory use: + +.. code-block:: javascript + + "mem" : { + "bits" : , + "resident" : , + "virtual" : , + "supported" : , + "mapped" : , + "mappedWithJournal" : + }, + +.. _server-status-example-connections: + +The ":ref:`server-status-connections`" field reports on MongoDB's +current memory use by the MongoDB process: + +.. versionchanged:: 2.4 + The :data:`~serverStatus.connections.totalCreated` field. + +.. code-block:: javascript + + "connections" : { + "current" : , + "available" : , + "totalCreated" : NumberLong() + + }, + +.. _server-status-example-extrainfo: + +The fields in the ":ref:`server-status-extra-info`" document provide +platform specific information. The following example block is from a +Linux-based system: + +.. code-block:: javascript + + "extra_info" : { + "note" : "fields vary by platform", + "heap_usage_bytes" : , + "page_faults" : + }, + +.. _server-status-example-indexcounters: + +The ":ref:`server-status-indexcounters`" document reports on index +use: + +.. code-block:: javascript + + "indexCounters" : { + "accesses" : , + "hits" : , + "misses" : , + "resets" : , + "missRatio" : + }, + +.. _server-status-example-backgroundflushing: + +The ":ref:`server-status-backgroundflushing`" document reports on the +process MongoDB uses to write data to disk: + +.. code-block:: javascript + + "backgroundFlushing" : { + "flushes" : , + "total_ms" : , + "average_ms" : , + "last_ms" : , + "last_finished" : ISODate("") + }, + +.. _server-status-example-cursors: + +The ":ref:`server-status-cursors`" document reports on current cursor +use and state: + +.. code-block:: javascript + + "cursors" : { + "totalOpen" : , + "clientCursors_size" : , + "timedOut" : + }, + +.. _server-status-example-network: + +The ":ref:`server-status-network`" document reports on network use and +state: + +.. code-block:: javascript + + "network" : { + "bytesIn" : , + "bytesOut" : , + "numRequests" : + }, + +.. _server-status-example-repl: + +The ":ref:`server-status-repl`" document reports on the state of +replication and the :term:`replica set`. This document only appears +for replica sets. + +.. code-block:: javascript + + "repl" : { + "setName" : "", + "ismaster" : , + "secondary" : , + "hosts" : [ + , + , + + ], + "primary" : , + "me" : + +.. _server-status-example-opcountersrepl: + +The ":ref:`server-status-opcounters-repl`" document reports the number +of replicated operations: + +.. code-block:: javascript + + "opcountersRepl" : { + "insert" : , + "query" : , + "update" : , + "delete" : , + "getmore" : , + "command" : + }, + +.. _server-status-example-opcounters: + +The ":ref:`server-status-opcounters`" document reports the number of +operations this MongoDB instance has processed: + +.. code-block:: javascript + + "opcounters" : { + "insert" : , + "query" : , + "update" : , + "delete" : , + "getmore" : , + "command" : + }, + +.. _server-status-example-asserts: + +The ":ref:`server-status-asserts`" document reports the number of +assertions or errors produced by the server: + +.. code-block:: javascript + + "asserts" : { + "regular" : , + "warning" : , + "msg" : , + "user" : , + "rollovers" : + }, + +.. _server-status-example-writebacksqueued: + +The ":ref:`server-status-writebacksqueued`" document reports the number of +:term:`writebacks`: + +.. code-block:: javascript + + "writeBacksQueued" : , + +.. _server-status-example-journaling: + +The ":ref:`server-status-journaling`" document reports on data that +reflect this :program:`mongod` instance's journaling-related operations +and performance during a :ref:`journal group commit interval +`: + +.. code-block:: javascript + + "dur" : { + "commits" : , + "journaledMB" : , + "writeToDataFilesMB" : , + "compression" : , + "commitsInWriteLock" : , + "earlyCommits" : , + "timeMs" : { + "dt" : , + "prepLogBuffer" : , + "writeToJournal" : , + "writeToDataFiles" : , + "remapPrivateView" : + } + }, + +.. _server-status-example-recordstats: + +The ":ref:`server-status-recordstats`" document reports data on +MongoDB's ability to predict page faults and yield write operations +when required data isn't in memory: + +.. code-block:: javascript + + "recordStats" : { + "accessesNotInMemory" : , + "pageFaultExceptionsThrown" : , + "local" : { + "accessesNotInMemory" : , + "pageFaultExceptionsThrown" : + }, + "" : { + "accessesNotInMemory" : , + "pageFaultExceptionsThrown" : + } + }, + +.. _server-status-example-workingset: + +The ":ref:`server-status-workingset`" document provides an estimated +size of the MongoDB instance's working set. This data may not exactly +reflect the size of the working set in all cases. Additionally, the +:data:`~serverStatus.workingSet` document is only present in the +output of :dbcommand:`serverStatus` when explicitly enabled. + +.. versionadded:: 2.4 + +.. code-block:: javascript + + "workingSet" : { + "note" : "thisIsAnEstimate", + "pagesInMemory" : , + "computationTimeMicros" : , + "overSeconds" : num + }, + +.. _server-status-example-metrics: + +The ":ref:`server-status-metrics`" document contains a number of +operational metrics that are useful for monitoring the state and +workload of a :program:`mongod` instance. + +.. versionadded:: 2.4 + +.. code-block:: javascript + + "metrics" : { + "document" : { + "deleted" : NumberLong(), + "inserted" : NumberLong(), + "returned" : NumberLong(), + "updated" : NumberLong() + }, + "getLastError" : { + "wtime" : { + "num" : , + "totalMillis" : + }, + "wtimeouts" : NumberLong() + }, + "operation" : { + "fastmod" : NumberLong(), + "idhack" : NumberLong(), + "scanAndOrder" : NumberLong() + }, + "queryExecutor": { + "scanned" : NumberLong() + }, + "record" : { + "moves" : NumberLong() + }, + "repl" : { + "apply" : { + "batches" : { + "num" : , + "totalMillis" : + }, + "ops" : NumberLong() + }, + "buffer" : { + "count" : NumberLong(), + "maxSizeBytes" : , + "sizeBytes" : NumberLong() + }, + "network" : { + "bytes" : NumberLong(), + "getmores" : { + "num" : , + "totalMillis" : + }, + "ops" : NumberLong(), + "readersCreated" : NumberLong() + }, + "oplog" : { + "insert" : { + "num" : , + "totalMillis" : + }, + "insertBytes" : NumberLong() + }, + "preload" : { + "docs" : { + "num" : , + "totalMillis" : + }, + "indexes" : { + "num" : , + "totalMillis" : + } + } + }, + "ttl" : { + "deletedDocuments" : NumberLong(), + "passes" : NumberLong() + } + }, + +The final ``ok`` field holds the return status for the +:dbcommand:`serverStatus` command: + +.. code-block:: javascript + + "ok" : 1 + } diff --git a/source/reference/server-status.txt b/source/reference/server-status.txt deleted file mode 100644 index 254f7949625..00000000000 --- a/source/reference/server-status.txt +++ /dev/null @@ -1,448 +0,0 @@ -:orphan: - -==================== -Server Status Output -==================== - -.. default-domain:: mongodb - -This document provides a quick overview and example of the -:dbcommand:`serverStatus` command. The helper :method:`db.serverStatus()` -in the :program:`mongo` shell provides access to this output. For full -documentation of the content of this output, see -:doc:`/reference/command/serverStatus`. - -.. .. When adding status fields to this document, make sure that the - ``docs/source/reference/command/serverStatus.txt`` document also reflects - those changes. - -.. note:: - - The fields included in this output vary slightly depending on the - version of MongoDB, underlying operating system platform, and the - kind of node, including :program:`mongos`, :program:`mongod` or - :term:`replica set` member. - -.. _server-status-example-instance-information: - -The ":ref:`server-status-instance-information`" section displays -information regarding the specific :program:`mongod` and -:program:`mongos` and its state. - -.. code-block:: javascript - - { - "host" : "", - "version" : "", - "process" : "", - "pid" : , - "uptime" : , - "uptimeMillis" : , - "uptimeEstimate" : , - "localTime" : ISODate(""), - -.. _server-status-example-locks: - -The ":ref:`server-status-locks`" section reports data that reflect the -state and use of both global (i.e. ``.``) and database specific locks: - -.. code-block:: javascript - - "locks" : { - "." : { - "timeLockedMicros" : { - "R" : , - "W" : - }, - "timeAcquiringMicros" : { - "R" : , - "W" : - } - }, - "admin" : { - "timeLockedMicros" : { - "r" : , - "w" : - }, - "timeAcquiringMicros" : { - "r" : , - "w" : - } - }, - "local" : { - "timeLockedMicros" : { - "r" : , - "w" : - }, - "timeAcquiringMicros" : { - "r" : , - "w" : - } - }, - "" : { - "timeLockedMicros" : { - "r" : , - "w" : - }, - "timeAcquiringMicros" : { - "r" : , - "w" : - } - } - }, - -.. _server-status-example-globallock: - -The ":ref:`server-status-globallock`" field reports on MongoDB's -global system lock. In most cases the :ref:`locks ` document -provides more fine grained data that reflects lock use: - -.. code-block:: javascript - - "globalLock" : { - "totalTime" : , - "lockTime" : , - "currentQueue" : { - "total" : , - "readers" : , - "writers" : - }, - "activeClients" : { - "total" : , - "readers" : , - "writers" : - } - }, - -.. _server-status-example-memory: - -The ":ref:`server-status-memory`" field reports on MongoDB's -current memory use: - -.. code-block:: javascript - - "mem" : { - "bits" : , - "resident" : , - "virtual" : , - "supported" : , - "mapped" : , - "mappedWithJournal" : - }, - -.. _server-status-example-connections: - -The ":ref:`server-status-connections`" field reports on MongoDB's -current memory use by the MongoDB process: - -.. versionchanged:: 2.4 - The :data:`~serverStatus.connections.totalCreated` field. - -.. code-block:: javascript - - "connections" : { - "current" : , - "available" : , - "totalCreated" : NumberLong() - - }, - -.. _server-status-example-extrainfo: - -The fields in the ":ref:`server-status-extra-info`" document provide -platform specific information. The following example block is from a -Linux-based system: - -.. code-block:: javascript - - "extra_info" : { - "note" : "fields vary by platform", - "heap_usage_bytes" : , - "page_faults" : - }, - -.. _server-status-example-indexcounters: - -The ":ref:`server-status-indexcounters`" document reports on index -use: - -.. code-block:: javascript - - "indexCounters" : { - "accesses" : , - "hits" : , - "misses" : , - "resets" : , - "missRatio" : - }, - -.. _server-status-example-backgroundflushing: - -The ":ref:`server-status-backgroundflushing`" document reports on the -process MongoDB uses to write data to disk: - -.. code-block:: javascript - - "backgroundFlushing" : { - "flushes" : , - "total_ms" : , - "average_ms" : , - "last_ms" : , - "last_finished" : ISODate("") - }, - -.. _server-status-example-cursors: - -The ":ref:`server-status-cursors`" document reports on current cursor -use and state: - -.. code-block:: javascript - - "cursors" : { - "totalOpen" : , - "clientCursors_size" : , - "timedOut" : - }, - -.. _server-status-example-network: - -The ":ref:`server-status-network`" document reports on network use and -state: - -.. code-block:: javascript - - "network" : { - "bytesIn" : , - "bytesOut" : , - "numRequests" : - }, - -.. _server-status-example-repl: - -The ":ref:`server-status-repl`" document reports on the state of -replication and the :term:`replica set`. This document only appears -for replica sets. - -.. code-block:: javascript - - "repl" : { - "setName" : "", - "ismaster" : , - "secondary" : , - "hosts" : [ - , - , - - ], - "primary" : , - "me" : - -.. _server-status-example-opcountersrepl: - -The ":ref:`server-status-opcounters-repl`" document reports the number -of replicated operations: - -.. code-block:: javascript - - "opcountersRepl" : { - "insert" : , - "query" : , - "update" : , - "delete" : , - "getmore" : , - "command" : - }, - -.. _server-status-example-opcounters: - -The ":ref:`server-status-opcounters`" document reports the number of -operations this MongoDB instance has processed: - -.. code-block:: javascript - - "opcounters" : { - "insert" : , - "query" : , - "update" : , - "delete" : , - "getmore" : , - "command" : - }, - -.. _server-status-example-asserts: - -The ":ref:`server-status-asserts`" document reports the number of -assertions or errors produced by the server: - -.. code-block:: javascript - - "asserts" : { - "regular" : , - "warning" : , - "msg" : , - "user" : , - "rollovers" : - }, - -.. _server-status-example-writebacksqueued: - -The ":ref:`server-status-writebacksqueued`" document reports the number of -:term:`writebacks`: - -.. code-block:: javascript - - "writeBacksQueued" : , - -.. _server-status-example-journaling: - -The ":ref:`server-status-journaling`" document reports on data that -reflect this :program:`mongod` instance's journaling-related operations -and performance during a :ref:`journal group commit interval -`: - -.. code-block:: javascript - - "dur" : { - "commits" : , - "journaledMB" : , - "writeToDataFilesMB" : , - "compression" : , - "commitsInWriteLock" : , - "earlyCommits" : , - "timeMs" : { - "dt" : , - "prepLogBuffer" : , - "writeToJournal" : , - "writeToDataFiles" : , - "remapPrivateView" : - } - }, - -.. _server-status-example-recordstats: - -The ":ref:`server-status-recordstats`" document reports data on -MongoDB's ability to predict page faults and yield write operations -when required data isn't in memory: - -.. code-block:: javascript - - "recordStats" : { - "accessesNotInMemory" : , - "pageFaultExceptionsThrown" : , - "local" : { - "accessesNotInMemory" : , - "pageFaultExceptionsThrown" : - }, - "" : { - "accessesNotInMemory" : , - "pageFaultExceptionsThrown" : - } - }, - -.. _server-status-example-workingset: - -The ":ref:`server-status-workingset`" document provides an estimated -size of the MongoDB instance's working set. This data may not exactly -reflect the size of the working set in all cases. Additionally, the -:data:`~serverStatus.workingSet` document is only present in the -output of :dbcommand:`serverStatus` when explicitly enabled. - -.. versionadded:: 2.4 - -.. code-block:: javascript - - "workingSet" : { - "note" : "thisIsAnEstimate", - "pagesInMemory" : , - "computationTimeMicros" : , - "overSeconds" : num - }, - -.. _server-status-example-metrics: - -The ":ref:`server-status-metrics`" document contains a number of -operational metrics that are useful for monitoring the state and -workload of a :program:`mongod` instance. - -.. versionadded:: 2.4 - -.. code-block:: javascript - - "metrics" : { - "document" : { - "deleted" : NumberLong(), - "inserted" : NumberLong(), - "returned" : NumberLong(), - "updated" : NumberLong() - }, - "getLastError" : { - "wtime" : { - "num" : , - "totalMillis" : - }, - "wtimeouts" : NumberLong() - }, - "operation" : { - "fastmod" : NumberLong(), - "idhack" : NumberLong(), - "scanAndOrder" : NumberLong() - }, - "queryExecutor": { - "scanned" : NumberLong() - }, - "record" : { - "moves" : NumberLong() - }, - "repl" : { - "apply" : { - "batches" : { - "num" : , - "totalMillis" : - }, - "ops" : NumberLong() - }, - "buffer" : { - "count" : NumberLong(), - "maxSizeBytes" : , - "sizeBytes" : NumberLong() - }, - "network" : { - "bytes" : NumberLong(), - "getmores" : { - "num" : , - "totalMillis" : - }, - "ops" : NumberLong(), - "readersCreated" : NumberLong() - }, - "oplog" : { - "insert" : { - "num" : , - "totalMillis" : - }, - "insertBytes" : NumberLong() - }, - "preload" : { - "docs" : { - "num" : , - "totalMillis" : - }, - "indexes" : { - "num" : , - "totalMillis" : - } - } - }, - "ttl" : { - "deletedDocuments" : NumberLong(), - "passes" : NumberLong() - } - }, - -The final ``ok`` field holds the return status for the -:dbcommand:`serverStatus` command: - -.. code-block:: javascript - - "ok" : 1 - }