This set of MongoDB Multiple Choice Questions & Answers (MCQs) focuses on “Monitoring for MongoDB”.
1. ___________ captures and returns the counts of database operations by type.
a) mongostat
b) mongod
c) mms
d) all of the mentioned
View Answer
Explanation: Use mongostat to understand the distribution of operation types and to inform capacity planning.
2. Point out the correct statement.
a) Database commands cannot return statistics regarding the current database state with greater fidelity
b) Monitoring is a critical component of all database administration
c) The MongoDB distribution does not include utilities that quickly return statistics about instances’ performance and activity
d) All of the mentioned
View Answer
Explanation: This is useful for diagnosing issues and assessing normal operation.
3. _________ tracks and reports the current read and write activity of a MongoDB instance, and reports these statistics on a per collection basis.
a) mongostat
b) mongod
c) mongotop
d) all of the mentioned
View Answer
Explanation: Use mongotop to check if your database activity and use match your expectations.
4. _______ method is useful tool for identifying the database instance’s in-progress operations.
a) db.current
b) db.currentOp
c) db.Op
d) none of the mentioned
View Answer
Explanation: MongoDB includes a number of commands that report on the state of the database.
5. Point out the correct statement.
a) MMS offers point in time recovery of MongoDB replica sets
b) MongoDB provides a web interface that exposes diagnostic and monitoring information in a simple web page
c) db.Status() outputs an account of the state of a MongoDB instance
d) None of the mentioned
View Answer
Explanation: The web interface is accessible at localhost:<port>, where the <port> number is 1000 more than the mongod port.
6. ___________ returns a general overview of the status of the database, detailing disk usage, memory use, connection, journaling, and index access.
a) dbStats
b) db.serverStatus()
c) db.stats()
d) none of the mentioned
View Answer
Explanation: This command is rarely run directly.
7. The ________ reflect the amount of storage used, the quantity of data contained in the database, and object, collection, and index counters.
a) dbStats
b) db.serverStatus()
c) db.statserver()
d) none of the mentioned
View Answer
Explanation: The dbStats command, or db.stats() from the shell, returns a document that addresses storage use and data volumes.
8. ________ provides statistics that resemble dbStats on the collection level.
a) dbStats
b) db.serverStatus()
c) db.statserver()
d) collstats
View Answer
Explanation: It also includes count of the objects in the collection, the size of the collection, the amount of disk space used by the collection, and information about its indexes.
Sanfoundry Global Education & Learning Series – MongoDB.
Here’s the list of Best Books in MongoDB.
- Check Information Technology Books
- Check MongoDB Books
- Practice Programming MCQs
- Apply for Programming Internship