In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail what is related to MongoDB operation and maintenance commands. The content of the article is of high quality, so Xiaobian shares it with you for reference. I hope you have a certain understanding of relevant knowledge after reading this article.
1. Release memory online
use admin
db.runCommand({closeAllDatabases:1})
Note: Version 3.2 has removed this command.
2.rs.status()
Query Replication Set Status
3.db.stats()
Query the status of a specified library (including memory and disk usage statistics)
4.db.collectionsname.stats()
Query specific information about a specified collection
5.db.version()
View version of current instance
6.db.getCollectionNames();
Gets the names of all collections in the current database
7. Export/import of aggregate data
mongoexport / mongoimport
8. Backup and Restore of Database
mongodump and mongostore
9.db.serverStatus()
server statistics
10.db.currentOp()
Statistics of currently running operations
db.currentOp('ture')
Operations with idle
11.mongostat
Diagnostic tool for statistics of global system information
Polls periodically and displays statistics ranging from number of insertions per second to memory usage to frequency of missing B-leaves.
Login at the time, executed under bin document
./ mongostat -h Host IP: port-u User name--authenticationDatabase Login authenticated database
12.mongotop
Mongotop is an external wrapper for the top command and works the same way as mongostat.
What about MongoDB operation-related commands is shared here. I hope the above content can help you to learn more. If you think the article is good, you can share it so that more people can see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.