mongostat是mongoDB自带的工具,用于检测mongodb的运行状态。
Test:Test/node-131 / # mongostat --help
Usage:
mongostat
Monitor basic MongoDB server statistics.
See http://docs.mongodb.org/manual/reference/program/mongostat/ for more information.
general options:
--help print usage
--version print the tool version and exit
verbosity options:
-v, --verbose= more detailed log output (include multiple times for more verbosity, e.g. -vvvvv, or specify a numeric value, e.g. --verbose=N)
--quiet hide all log output
connection options:
-h, --host= mongodb host to connect to (setname/host1,host2 for replica sets)
--port= server port (can also use --host hostname:port)
ssl options:
--ssl connect to a mongod or mongos that has ssl enabled
--sslCAFile= the .pem file containing the root certificate chain from the certificate authority
--sslPEMKeyFile= the .pem file containing the certificate and key
--sslPEMKeyPassword= the password to decrypt the sslPEMKeyFile, if necessary
--sslCRLFile= the .pem file containing the certificate revocation list
--sslAllowInvalidCertificates bypass the validation for server certificates
--sslAllowInvalidHostnames bypass the validation for server name
--sslFIPSMode use FIPS mode of the installed openssl library
authentication options:
-u, --username= username for authentication
-p, --password= password for authentication
--authenticationDatabase= database that holds the users credentials
--authenticationMechanism= authentication mechanism to use
stat options:
--noheaders dont output column names
-n, --rowcount= number of stats lines to print (0 for indefinite)
--discover discover nodes and display stats for all
--http use HTTP instead of raw db connection
--all all optional fields
--json output as JSON rather than a formatted table
举例: