Blame SOURCES/mongostat.1

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