In a preliminary discussion, we have been able to successfully run MongoDB on our own machine. But there are some tools that we don't know about in the bin directory. Next, you'll look at the purpose of each gadget and explore the purpose of a file that MongoDB creates in the Data folder.
1, the bin directory of the following a variety of small tools and how to use
Bsondump.exe
Client for converting exported Bson file format to JSON format Mongo.exe MongoDB
Mongod.exe
Server for starting MongoDB
Mongodump.exe
Used to export Bson format files from the MongoDB database, similar to the MySQL dump tool mysqldump
Mongoexport.exe
Used to export a database in MongoDB to a format of json,csv or TSV.
Use example: Mongoexport--host mongodb1.example.net--port 37017--username user--password pass--collection contacts
Mongofiles.exe
The command used to interact with MongoDB's Gridfs file system, and to manipulate the files in it, provides a storage object interface between our local system and the Gridfs file system.
Use example: Mongofiles--hostname db1.example.net--port 37017-d records list
For Mongoimport.exe
Import the file formats such as Json,csv or TSV into the MongoDB database.
Use example: Mongoimport--db users--collection contacts--type CSV--file/opt/backups/contacts.csv
Mongooplog.exe
Used to copy the run log from the running Mongod service to the specified server, primarily for incremental backups.
Use example: Mongooplog--from mongodb0.example.net--host mongodb1.example.net, backup You can also refer to this article blog:http://www.ttlsa.com/html/ 2052.html
Mongoperf.exe tool for independent checking of MongoDB I/O performance.
Use Example: Mongoperf.exe < TestPrefJson.txt (Note: testPrefJson.txt stores the parameters of the test in JSON format, such as: {Nthreads:16,filesizemb:1000,r:true }, see the Help for this command for more parameters, configure the Iostat command on Linux to observe the effect of the write
Mongorestore.exe
Used to restore exported Bson files to the MongoDB database
Mongos.exe
For registering system processing
Mongostat.exe
Current Mongod Status Monitoring tool, like Linux Vmstat monitoring Linux
Mongotop.exe
Provides a trace of the time that the Mongod database spends reading and writing data, records for each collection, and the default record time is recorded in seconds.
Mongosniff (Linux and Unix have this tool) is used to monitor TCP/IP connections to MongoDB, similar to tcpdump. App to view this blog:http://blog.nosqlfan.com/html/521.html
2. Introduction to data files created by MongoDB
dbname.0
Data files
DBNAME.NS file
The Dbname.ns file stores namespace information. In MongoDB, each collection has a namespace, named Dbname.collection_name. The Dbname.ns file stores an array of hash table nodes. Key is based on the name of the namespace, and value is the namespace information. The size of the hash table node is 628 bytes, the default size of the Dbname.ns file is 16M, and altogether 26,715 namespaces can be stored.
Mongod.lock
Storing process information for the current MongoDB
Copyright NOTICE: Reprint Please specify the address of the blog, respect the author's labor results. Welcome to pay attention to http://blog.csdn.net/zgs_shmily, grow together.
MongoDB Primary Series II: Recognize some of the common tools that MongoDB provides