EnglishFrenchSpanish

OnWorks favicon

mongosniff - Online in the Cloud

Run mongosniff in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command mongosniff that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


mongosniff - MongoDB

SYNOPSIS


mongosniff provides a low-level operation tracing/sniffing view into database activity in
real time. Think of mongosniff as a MongoDB-specific analogue of tcpdump for TCP/IP
network traffic. Typically, mongosniff is most frequently used in driver development.

Note mongosniff requires libpcap and is only available for Unix-like systems.
Furthermore, the version distributed with the MongoDB binaries is dynamically
linked against aversion 0.9 of libpcap. If your system has a different version of
libpcap, you will need to compile mongosniff yourself or create a symbolic link
pointing to libpcap.so.0.9 to your local version of libpcap. Use an operation that
resembles the following:

ln -s /usr/lib/libpcap.so.1.1.1 /usr/lib/libpcap.so.0.9

Change the path's and name of the shared library as needed.

As an alternative to mongosniff, Wireshark, a popular network sniffing tool is capable of
inspecting and parsing the MongoDB wire protocol.

OPTIONS


mongosniff

--help Returns a basic help and usage text.

--forward <host><:port>
Declares a host to forward all parsed requests that the mongosniff intercepts to
another mongod instance and issue those operations on that database instance.

Specify the target host name and port in the <host><:port> format.

To connect to a replica set, you can specify the replica set seed name, and a seed
list of set members, in the following format:

<replica_set_name>/<hostname1><:port>,<hostname2:<port>,...

--source <NET [interface]>, <FILE [filename]>, <DIAGLOG [filename]>
Specifies source material to inspect. Use --source NET [interface] to inspect
traffic from a network interface (e.g. eth0 or lo.) Use --source FILE [filename] to
read captured packets in pcap format.

You may use the --source DIAGLOG [filename] option to read the output files
produced by the --diaglog option.

--objcheck
Modifies the behavior to only display invalid BSON objects and nothing else. Use
this option for troubleshooting driver development. This option has some
performance impact on the performance of mongosniff.

<port> Specifies alternate ports to sniff for traffic. By default, mongosniff watches for
MongoDB traffic on port 27017. Append multiple port numbers to the end of
mongosniff to monitor traffic on multiple ports.

USAGE


Use the following command to connect to a mongod or mongos running on port 27017 and 27018
on the localhost interface:

mongosniff --source NET lo 27017 27018

Use the following command to only log invalid BSON objects for the mongod or mongos
running on the localhost interface and port 27018, for driver development and
troubleshooting:

mongosniff --objcheck --source NET lo 27018

BUILD MONGOSNIFF


To build mongosniff yourself, Linux users can use the following procedure:

1. Obtain prerequisites using your operating systems package management software.
Dependencies include:

· libpcap - to capture network packets.

· git - to download the MongoDB source code.

· scons and a C++ compiler - to build mongosniff.

2. Download a copy of the MongoDB source code using git:

git clone git://github.com/mongodb/mongo.git

3. Issue the following sequence of commands to change to the mongo/ directory and build
mongosniff:

cd mongo
scons mongosniff

Note If you run scons mongosniff before installing libpcap you must run scons clean
before you can build mongosniff.

Use mongosniff online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    KDiff3
    KDiff3
    This repository is no longer maintained
    and is kept for archival purposes. See
    https://invent.kde.org/sdk/kdiff3 for
    the newest code and
    https://download.kde.o...
    Download KDiff3
  • 2
    USBLoaderGX
    USBLoaderGX
    USBLoaderGX is a GUI for
    Waninkoko's USB Loader, based on
    libwiigui. It allows listing and
    launching Wii games, Gamecube games and
    homebrew on Wii and WiiU...
    Download USBLoaderGX
  • 3
    Firebird
    Firebird
    Firebird RDBMS offers ANSI SQL features
    & runs on Linux, Windows &
    several Unix platforms. Features
    excellent concurrency & performance
    & power...
    Download Firebird
  • 4
    KompoZer
    KompoZer
    KompoZer is a wysiwyg HTML editor using
    the Mozilla Composer codebase. As
    Nvu's development has been stopped
    in 2005, KompoZer fixes many bugs and
    adds a f...
    Download KompoZer
  • 5
    Free Manga Downloader
    Free Manga Downloader
    The Free Manga Downloader (FMD) is an
    open source application written in
    Object-Pascal for managing and
    downloading manga from various websites.
    This is a mirr...
    Download Free Manga Downloader
  • 6
    UNetbootin
    UNetbootin
    UNetbootin allows you to create bootable
    Live USB drives for Ubuntu, Fedora, and
    other Linux distributions without
    burning a CD. It runs on Windows, Linux,
    and ...
    Download UNetbootin
  • More »

Linux commands

Ad