The most readily available monitoring command is the stats() shell method, available at both the database and collection levels. At the database level, this shell method gives important information such as the number of collections and indexes, as well as information on the average document size, average file size, and information on the amount of filesystem storage used.
Here is an example of output from db.stats()Â using the sweetscomplete database:
Information given by db.<COLLECTION>.stats() (substitute the name of the collection in place of <COLLECTION>), a wrapper for the collStats database command, easily produces 10 times the amount of information as db.stats(). The output from db.<COLLECTION>.stats() gives the following general information:
Output key | Data type | Notes |
ns | string | Shows the namespace of the collection. The namespace is a string that includes the database and collection, separated... |