Blame SOURCES/mongostat.1

7fe184
.\" Man page generated from reStructuredText.
7fe184
.
7fe184
.TH "MONGOSTAT" "1" "January 30, 2015" "3.0" "mongodb-manual"
7fe184
.SH NAME
7fe184
mongostat \- MongoDB Use Statistics
7fe184
.
7fe184
.nr rst2man-indent-level 0
7fe184
.
7fe184
.de1 rstReportMargin
7fe184
\\$1 \\n[an-margin]
7fe184
level \\n[rst2man-indent-level]
7fe184
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
7fe184
-
7fe184
\\n[rst2man-indent0]
7fe184
\\n[rst2man-indent1]
7fe184
\\n[rst2man-indent2]
7fe184
..
7fe184
.de1 INDENT
7fe184
.\" .rstReportMargin pre:
7fe184
. RS \\$1
7fe184
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
7fe184
. nr rst2man-indent-level +1
7fe184
.\" .rstReportMargin post:
7fe184
..
7fe184
.de UNINDENT
7fe184
. RE
7fe184
.\" indent \\n[an-margin]
7fe184
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
7fe184
.nr rst2man-indent-level -1
7fe184
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
7fe184
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
7fe184
..
7fe184
.SH SYNOPSIS
7fe184
.sp
7fe184
The \fBmongostat\fP utility provides a quick overview of the
7fe184
status of a currently running \fBmongod\fP
7fe184
or \fBmongos\fP
7fe184
instance. \fBmongostat\fP is functionally similar to the
7fe184
UNIX/Linux file system utility \fBvmstat\fP, but provides data regarding
7fe184
\fBmongod\fP and \fBmongos\fP instances.
7fe184
.sp
7fe184
\fBSEE ALSO:\fP
7fe184
.INDENT 0.0
7fe184
.INDENT 3.5
7fe184
For more information about monitoring MongoDB, see
7fe184
http://docs.mongodb.org/manual/administration/monitoring\&.
7fe184
.sp
7fe184
For more background on various other MongoDB status outputs see:
7fe184
.INDENT 0.0
7fe184
.IP \(bu 2
7fe184
http://docs.mongodb.org/manual/reference/command/serverStatus
7fe184
.IP \(bu 2
7fe184
http://docs.mongodb.org/manual/reference/command/replSetGetStatus
7fe184
.IP \(bu 2
7fe184
http://docs.mongodb.org/manual/reference/command/dbStats
7fe184
.IP \(bu 2
7fe184
http://docs.mongodb.org/manual/reference/command/collStats
7fe184
.UNINDENT
7fe184
.sp
7fe184
For an additional utility that provides MongoDB metrics see
7fe184
\fBmongotop\fP\&.
7fe184
.UNINDENT
7fe184
.UNINDENT
7fe184
.SH ACCESS CONTROL REQUIREMENTS
7fe184
.sp
7fe184
In order to connect to a \fBmongod\fP that enforces authorization
7fe184
with the \fI\-\-auth\fP option, specify the
7fe184
\fI\-\-username\fP and \fI\-\-password\fP options, and the user specified must have the
7fe184
\fBserverStatus\fP privilege action on the cluster resources.
7fe184
.sp
7fe184
The built\-in role \fBclusterMonitor\fP provides this privilege as
7fe184
well as other privileges. To create a role with just the privilege to
7fe184
run \fBmongostat\fP, see \fIcreate\-role\-for\-mongostat\fP\&.
7fe184
.SH OPTIONS
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B mongostat
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B mongostat
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B \-\-help
7fe184
Returns information on the options and use of \fBmongostat\fP\&.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B \-\-verbose, \-v
7fe184
Increases the amount of internal reporting returned on standard output
7fe184
or in log files. Increase the verbosity with the \fB\-v\fP form by
7fe184
including the option multiple times, (e.g. \fB\-vvvvv\fP\&.)
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B \-\-version
7fe184
Returns the \fBmongostat\fP release number.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B \-\-host <hostname><:port>, \-h <hostname><:port>
7fe184
\fIDefault\fP: localhost:27017
7fe184
.sp
7fe184
Specifies a resolvable hostname for the \fBmongod\fP to which to
7fe184
connect. By default, the \fBmongostat\fP attempts to connect to a MongoDB
7fe184
instance running on the localhost on port number \fB27017\fP\&.
7fe184
.sp
7fe184
To connect to a replica set, specify the
7fe184
\fBreplSetName\fP and a seed list of set members, as in
7fe184
the following:
7fe184
.INDENT 7.0
7fe184
.INDENT 3.5
7fe184
.sp
7fe184
.nf
7fe184
.ft C
7fe184
<replSetName>/<hostname1><:port>,<hostname2><:port>,<...>
7fe184
.ft P
7fe184
.fi
7fe184
.UNINDENT
7fe184
.UNINDENT
7fe184
.sp
7fe184
You can always connect directly to a single MongoDB instance by
7fe184
specifying the host and port number directly.
7fe184
.sp
7fe184
Changed in version 3.0.0: If you use IPv6 and use the \fB<address>:<port>\fP format, you must
7fe184
enclose the portion of an address and port combination in
7fe184
brackets (e.g. \fB[<address>]\fP).
7fe184
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B \-\-port <port>
7fe184
\fIDefault\fP: 27017
7fe184
.sp
7fe184
Specifies the TCP port on which the MongoDB instance listens for
7fe184
client connections.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B \-\-ipv6
7fe184
Enables IPv6 support and allows the \fBmongostat\fP to connect to the
7fe184
MongoDB instance using an IPv6 network. All MongoDB programs and
7fe184
processes disable IPv6 support by default.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B \-\-ssl
7fe184
New in version 2.6.
7fe184
7fe184
.sp
7fe184
Enables connection to a \fBmongod\fP or \fBmongos\fP that has
7fe184
SSL support enabled.
7fe184
.sp
7fe184
The default distribution of MongoDB does not contain support for SSL.
7fe184
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B \-\-sslCAFile <filename>
7fe184
New in version 2.6.
7fe184
7fe184
.sp
7fe184
Specifies the \fB\&.pem\fP file that contains the root certificate chain
7fe184
from the Certificate Authority. Specify the file name of the
7fe184
\fB\&.pem\fP file using relative or absolute paths.
7fe184
.sp
7fe184
The default distribution of MongoDB does not contain support for SSL.
7fe184
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
7fe184
.sp
7fe184
\fBWARNING:\fP
7fe184
.INDENT 7.0
7fe184
.INDENT 3.5
7fe184
If the \fBmongo\fP shell or any other tool that connects to
7fe184
\fBmongos\fP or \fBmongod\fP is run without
7fe184
\fI\-\-sslCAFile\fP, it will not attempt to validate
7fe184
server certificates. This results in vulnerability to expired
7fe184
\fBmongod\fP and \fBmongos\fP certificates as well as to foreign
7fe184
processes posing as valid \fBmongod\fP or \fBmongos\fP
7fe184
instances. Ensure that you \fIalways\fP specify the CA file against which
7fe184
server certificates should be validated in cases where intrusion is a
7fe184
possibility.
7fe184
.UNINDENT
7fe184
.UNINDENT
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B \-\-sslPEMKeyFile <filename>
7fe184
New in version 2.6.
7fe184
7fe184
.sp
7fe184
Specifies the \fB\&.pem\fP file that contains both the SSL certificate
7fe184
and key. Specify the file name of the \fB\&.pem\fP file using relative
7fe184
or absolute paths.
7fe184
.sp
7fe184
This option is required when using the \fI\-\-ssl\fP option to connect
7fe184
to a \fBmongod\fP or \fBmongos\fP that has
7fe184
\fBCAFile\fP enabled \fIwithout\fP
7fe184
\fBallowConnectionsWithoutCertificates\fP\&.
7fe184
.sp
7fe184
The default distribution of MongoDB does not contain support for SSL.
7fe184
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B \-\-sslPEMKeyPassword <value>
7fe184
New in version 2.6.
7fe184
7fe184
.sp
7fe184
Specifies the password to de\-crypt the certificate\-key file (i.e.
7fe184
\fI\-\-sslPEMKeyFile\fP). Use the \fI\-\-sslPEMKeyPassword\fP option only if the
7fe184
certificate\-key file is encrypted. In all cases, the \fBmongostat\fP will
7fe184
redact the password from all logging and reporting output.
7fe184
.sp
7fe184
If the private key in the PEM file is encrypted and you do not specify
7fe184
the \fI\-\-sslPEMKeyPassword\fP option, the \fBmongostat\fP will prompt for a passphrase. See
7fe184
\fIssl\-certificate\-password\fP\&.
7fe184
.sp
7fe184
The default distribution of MongoDB does not contain support for SSL.
7fe184
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B \-\-sslCRLFile <filename>
7fe184
New in version 2.6.
7fe184
7fe184
.sp
7fe184
Specifies the \fB\&.pem\fP file that contains the Certificate Revocation
7fe184
List. Specify the file name of the \fB\&.pem\fP file using relative or
7fe184
absolute paths.
7fe184
.sp
7fe184
The default distribution of MongoDB does not contain support for SSL.
7fe184
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B \-\-sslAllowInvalidCertificates
7fe184
New in version 2.6.
7fe184
7fe184
.sp
7fe184
Bypasses the validation checks for server certificates and allows
7fe184
the use of invalid certificates. When using the
7fe184
\fBallowInvalidCertificates\fP setting, MongoDB logs as a
7fe184
warning the use of the invalid certificate.
7fe184
.sp
7fe184
The default distribution of MongoDB does not contain support for SSL.
7fe184
For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B \-\-sslAllowInvalidHostnames
7fe184
New in version 3.0.
7fe184
7fe184
.sp
7fe184
Disables the validation of the hostnames in SSL certificates. Allows
7fe184
\fBmongostat\fP to connect to MongoDB instances if the hostname their
7fe184
certificates do not match the specified hostname.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B \-\-sslFIPSMode
7fe184
New in version 2.6.
7fe184
7fe184
.sp
7fe184
Directs the \fBmongostat\fP to use the FIPS mode of the installed OpenSSL
7fe184
library. Your system must have a FIPS compliant OpenSSL library to use
7fe184
the \fI\-\-sslFIPSMode\fP option.
7fe184
.sp
7fe184
\fBNOTE:\fP
7fe184
.INDENT 7.0
7fe184
.INDENT 3.5
7fe184
FIPS Compatible SSL is
7fe184
available only in \fI\%MongoDB Enterprise\fP\&. See
7fe184
http://docs.mongodb.org/manual/tutorial/configure\-fips for more information.
7fe184
.UNINDENT
7fe184
.UNINDENT
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B \-\-username <username>, \-u <username>
7fe184
Specifies a username with which to authenticate to a MongoDB database
7fe184
that uses authentication. Use in conjunction with the \fB\-\-password\fP and
7fe184
\fB\-\-authenticationDatabase\fP options.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B \-\-password <password>, \-p <password>
7fe184
Specifies a password with which to authenticate to a MongoDB database
7fe184
that uses authentication. Use in conjunction with the \fB\-\-username\fP and
7fe184
\fB\-\-authenticationDatabase\fP options.
7fe184
.sp
7fe184
If you do not specify an argument for \fI\-\-password\fP, \fBmongostat\fP will
7fe184
prompt interactively for a password on the console.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B \-\-authenticationDatabase <dbname>
7fe184
New in version 2.4.
7fe184
7fe184
.sp
7fe184
Specifies the database that holds the user\(aqs credentials.
7fe184
.sp
7fe184
\fI\-\-authenticationDatabase\fP is required for \fBmongod\fP
7fe184
and \fBmongos\fP instances that use \fIauthentication\fP\&.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B \-\-authenticationMechanism <name>
7fe184
\fIDefault\fP: MONGODB\-CR
7fe184
.sp
7fe184
New in version 2.4.
7fe184
7fe184
.sp
7fe184
Changed in version 2.6: Added support for the \fBPLAIN\fP and \fBMONGODB\-X509\fP authentication
7fe184
mechanisms.
7fe184
7fe184
.sp
7fe184
Specifies the authentication mechanism the \fBmongostat\fP instance uses to
7fe184
authenticate to the \fBmongod\fP or \fBmongos\fP\&.
7fe184
.TS
7fe184
center;
7fe184
|l|l|.
7fe184
_
7fe184
T{
7fe184
Value
7fe184
T}	T{
7fe184
Description
7fe184
T}
7fe184
_
7fe184
T{
7fe184
MONGODB\-CR
7fe184
T}	T{
7fe184
MongoDB challenge/response authentication.
7fe184
T}
7fe184
_
7fe184
T{
7fe184
MONGODB\-X509
7fe184
T}	T{
7fe184
MongoDB SSL certificate authentication.
7fe184
T}
7fe184
_
7fe184
T{
7fe184
PLAIN
7fe184
T}	T{
7fe184
External authentication using LDAP. You can also use \fBPLAIN\fP
7fe184
for authenticating in\-database users. \fBPLAIN\fP transmits
7fe184
passwords in plain text. This mechanism is available only in
7fe184
\fI\%MongoDB Enterprise\fP\&.
7fe184
T}
7fe184
_
7fe184
T{
7fe184
GSSAPI
7fe184
T}	T{
7fe184
External authentication using Kerberos. This mechanism is
7fe184
available only in \fI\%MongoDB Enterprise\fP\&.
7fe184
T}
7fe184
_
7fe184
.TE
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B \-\-gssapiServiceName
7fe184
New in version 2.6.
7fe184
7fe184
.sp
7fe184
Specify the name of the service using \fBGSSAPI/Kerberos\fP\&. Only required if the service does not use the
7fe184
default name of \fBmongodb\fP\&.
7fe184
.sp
7fe184
This option is available only in MongoDB Enterprise.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B \-\-gssapiHostName
7fe184
New in version 2.6.
7fe184
7fe184
.sp
7fe184
Specify the hostname of a service using \fBGSSAPI/Kerberos\fP\&. \fIOnly\fP required if the hostname of a machine does
7fe184
not match the hostname resolved by DNS.
7fe184
.sp
7fe184
This option is available only in MongoDB Enterprise.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B \-\-noheaders
7fe184
Disables the output of column or field names.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B \-\-rowcount <number>, \-n <number>
7fe184
Controls the number of rows to output. Use in conjunction with
7fe184
the \fBsleeptime\fP argument to control the duration of a
7fe184
\fBmongostat\fP operation.
7fe184
.sp
7fe184
Unless \fI\-\-rowcount\fP is specified, \fBmongostat\fP
7fe184
will return an infinite number of rows (e.g. value of \fB0\fP\&.)
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B \-\-http
7fe184
Configures \fBmongostat\fP to collect data using the HTTP interface
7fe184
rather than a raw database connection.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B \-\-discover
7fe184
Discovers and reports on statistics from all members of a \fIreplica
7fe184
set\fP or \fIsharded cluster\fP\&. When connected to any member of a
7fe184
replica set, \fI\%\-\-discover\fP all non\-\fIhidden members\fP of the replica set. When connected to a \fBmongos\fP,
7fe184
\fBmongostat\fP will return data from all \fIshards\fP in
7fe184
the cluster. If a replica set provides a shard in the sharded cluster,
7fe184
\fBmongostat\fP will report on non\-hidden members of that replica
7fe184
set.
7fe184
.sp
7fe184
The \fImongostat \-\-host\fP option is not required but
7fe184
potentially useful in this case.
7fe184
.sp
7fe184
Changed in version 2.6: When running with \fI\%\-\-discover\fP, \fBmongostat\fP now
7fe184
respects :option:\-\-rowcount\(ga.
7fe184
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B \-\-all
7fe184
Configures \fBmongostat\fP to return all optional \fI\%fields\fP\&.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B \-\-json
7fe184
New in version 3.0.0.
7fe184
7fe184
.sp
7fe184
Returns output for \fBmongostat\fP in \fIJSON\fP format.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B <sleeptime>
7fe184
The final argument is the length of time, in seconds, that
7fe184
\fBmongostat\fP waits in between calls. By default \fBmongostat\fP
7fe184
returns one call every second.
7fe184
.sp
7fe184
\fBmongostat\fP returns values that reflect the operations
7fe184
over a 1 second period. For values of \fB<sleeptime>\fP greater
7fe184
than 1, \fBmongostat\fP averages data to reflect average
7fe184
operations per second.
7fe184
.UNINDENT
7fe184
.SH FIELDS
7fe184
.sp
7fe184
\fBmongostat\fP returns values that reflect the operations over a
7fe184
1 second period. When \fBmongostat <sleeptime>\fP has a value
7fe184
greater than 1, \fBmongostat\fP averages the statistics to reflect
7fe184
average operations per second.
7fe184
.sp
7fe184
\fBmongostat\fP outputs the following fields:
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B inserts
7fe184
The number of objects inserted into the database per second. If
7fe184
followed by an asterisk (e.g. \fB*\fP), the datum refers to a
7fe184
replicated operation.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B query
7fe184
The number of query operations per second.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B update
7fe184
The number of update operations per second.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B delete
7fe184
The number of delete operations per second.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B getmore
7fe184
The number of get more (i.e. cursor batch) operations per second.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B command
7fe184
The number of commands per second. On \fIslave\fP and
7fe184
\fIsecondary\fP systems, \fBmongostat\fP presents two values
7fe184
separated by a pipe character (e.g. \fB|\fP), in the form of
7fe184
\fBlocal|replicated\fP commands.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B flushes
7fe184
The number of \fIfsync\fP operations per second.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B mapped
7fe184
The total amount of data mapped in megabytes. This is the total
7fe184
data size at the time of the last \fBmongostat\fP call.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B size
7fe184
The amount of virtual memory in megabytes used by the process at
7fe184
the time of the last \fBmongostat\fP call.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B non\-mapped
7fe184
The total amount of virtual memory excluding all mapped memory at
7fe184
the time of the last \fBmongostat\fP call.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B res
7fe184
The amount of resident memory in megabytes used by the process at
7fe184
the time of the last \fBmongostat\fP call.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B faults
7fe184
Changed in version 2.1.
7fe184
7fe184
.sp
7fe184
The number of page faults per second.
7fe184
.sp
7fe184
Before version 2.1 this value was only provided for MongoDB
7fe184
instances running on Linux hosts.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B locked
7fe184
The percent of time in a global write lock.
7fe184
.sp
7fe184
Changed in version 2.2: The \fBlocked db\fP field replaces the \fBlocked %\fP field to
7fe184
more appropriate data regarding the database specific locks in
7fe184
version 2.2.
7fe184
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B locked db
7fe184
New in version 2.2.
7fe184
7fe184
.sp
7fe184
The percent of time in the per\-database context\-specific
7fe184
lock. \fBmongostat\fP will report the database that has spent
7fe184
the most time since the last \fBmongostat\fP call with a write
7fe184
lock.
7fe184
.sp
7fe184
This value represents the amount of time that the listed database
7fe184
spent in a locked state \fIcombined\fP with the time that the
7fe184
\fBmongod\fP spent in the global lock. Because of this, and
7fe184
the sampling method, you may see some values greater than 100%.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B idx miss
7fe184
The percent of index access attempts that required a page fault
7fe184
to load a btree node. This is a sampled value.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B qr
7fe184
The length of the queue of clients waiting to read data from the
7fe184
MongoDB instance.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B qw
7fe184
The length of the queue of clients waiting to write data from the
7fe184
MongoDB instance.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B ar
7fe184
The number of active clients performing read operations.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B aw
7fe184
The number of active clients performing write operations.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B netIn
7fe184
The amount of network traffic, in \fIbytes\fP, received by the MongoDB instance.
7fe184
.sp
7fe184
This includes traffic from \fBmongostat\fP itself.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B netOut
7fe184
The amount of network traffic, in \fIbytes\fP, sent by the MongoDB instance.
7fe184
.sp
7fe184
This includes traffic from \fBmongostat\fP itself.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B conn
7fe184
The total number of open connections.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B set
7fe184
The name, if applicable, of the replica set.
7fe184
.UNINDENT
7fe184
.INDENT 0.0
7fe184
.TP
7fe184
.B repl
7fe184
The replication status of the member.
7fe184
.TS
7fe184
center;
7fe184
|l|l|.
7fe184
_
7fe184
T{
7fe184
\fBValue\fP
7fe184
T}	T{
7fe184
\fBReplication Type\fP
7fe184
T}
7fe184
_
7fe184
T{
7fe184
M
7fe184
T}	T{
7fe184
\fImaster\fP
7fe184
T}
7fe184
_
7fe184
T{
7fe184
SEC
7fe184
T}	T{
7fe184
\fIsecondary\fP
7fe184
T}
7fe184
_
7fe184
T{
7fe184
REC
7fe184
T}	T{
7fe184
recovering
7fe184
T}
7fe184
_
7fe184
T{
7fe184
UNK
7fe184
T}	T{
7fe184
unknown
7fe184
T}
7fe184
_
7fe184
T{
7fe184
SLV
7fe184
T}	T{
7fe184
\fIslave\fP
7fe184
T}
7fe184
_
7fe184
T{
7fe184
RTR
7fe184
T}	T{
7fe184
mongos process ("router")
7fe184
T}
7fe184
_
7fe184
.TE
7fe184
.UNINDENT
7fe184
.SH USAGE
7fe184
.sp
7fe184
In the first example, \fBmongostat\fP will return data every
7fe184
second for 20 seconds. \fBmongostat\fP collects data from the
7fe184
\fBmongod\fP instance running on the localhost interface on
7fe184
port 27017. All of the following invocations produce identical
7fe184
behavior:
7fe184
.INDENT 0.0
7fe184
.INDENT 3.5
7fe184
.sp
7fe184
.nf
7fe184
.ft C
7fe184
mongostat \-\-rowcount 20 1
7fe184
mongostat \-\-rowcount 20
7fe184
mongostat \-n 20 1
7fe184
mongostat \-n 20
7fe184
.ft P
7fe184
.fi
7fe184
.UNINDENT
7fe184
.UNINDENT
7fe184
.sp
7fe184
In the next example, \fBmongostat\fP returns data every 5 minutes
7fe184
(or 300 seconds) for as long as the program runs. \fBmongostat\fP
7fe184
collects data from the \fBmongod\fP instance running on the
7fe184
localhost interface on port \fB27017\fP\&. Both of the following
7fe184
invocations produce identical behavior.
7fe184
.INDENT 0.0
7fe184
.INDENT 3.5
7fe184
.sp
7fe184
.nf
7fe184
.ft C
7fe184
mongostat \-\-rowcount 0 300
7fe184
mongostat \-n 0 300
7fe184
mongostat 300
7fe184
.ft P
7fe184
.fi
7fe184
.UNINDENT
7fe184
.UNINDENT
7fe184
.sp
7fe184
In the following example, \fBmongostat\fP returns data every 5
7fe184
minutes for an hour (12 times.) \fBmongostat\fP collects data
7fe184
from the \fBmongod\fP instance running on the localhost interface
7fe184
on port 27017. Both of the following invocations produce identical
7fe184
behavior.
7fe184
.INDENT 0.0
7fe184
.INDENT 3.5
7fe184
.sp
7fe184
.nf
7fe184
.ft C
7fe184
mongostat \-\-rowcount 12 300
7fe184
mongostat \-n 12 300
7fe184
.ft P
7fe184
.fi
7fe184
.UNINDENT
7fe184
.UNINDENT
7fe184
.sp
7fe184
In many cases, using the \fI\-\-discover\fP
7fe184
will help provide a more complete snapshot of the state of an entire
7fe184
group of machines. If a \fBmongos\fP process connected to a
7fe184
\fIsharded cluster\fP is running on port \fB27017\fP of the local
7fe184
machine, you can use the following form to return statistics from all
7fe184
members of the cluster:
7fe184
.INDENT 0.0
7fe184
.INDENT 3.5
7fe184
.sp
7fe184
.nf
7fe184
.ft C
7fe184
mongostat \-\-discover
7fe184
.ft P
7fe184
.fi
7fe184
.UNINDENT
7fe184
.UNINDENT
7fe184
.SH AUTHOR
7fe184
MongoDB Documentation Project
7fe184
.SH COPYRIGHT
7fe184
2011-2015
7fe184
.\" Generated by docutils manpage writer.
7fe184
.