Database Reference
In-Depth Information
Understanding mongosniff
The
mongosniff
is a tool that is used to fetch live MongoDB collection statistics. While
inserting or querying data from the MongoDB instances, you can run the
mongosniff
command and connect it to your MongoDB instance to see what the database does.
Note
Please note that in order to use this utility, you should install the
libpcap
library first. To
A simple usage of the
mongosniff
tool is as follows:
sudo mongosniff --source NET lo0
The preceding command line will listen to the loopback interface (localhost). This interface
is
lo0
in Mac OS systems and
lo
for other operating systems, usually. You can get the list
for your network interfaces using the
ifconfig
command. If you're using Windows as
the operating system, you can get the list of network interfaces using the following com-
mand:
ipconfig /all
Utilizing mongoperf
The
mongoperf
tool represents the disk I/O performance. It checks the I/O in a specified
interval and illustrates it. This utility can be used independent of MongoDB.