OnWorks favicon

mongotop - Online in the Cloud

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

This is the command mongotop 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



mongotop - MongoDB


mongotop provides a method to track the amount of time a MongoDB instance spends reading
and writing data. mongotop provides statistics on a per-collection level. By default,
mongotop returns values every second.

See also

For more information about monitoring MongoDB, see /administration/monitoring.

For additional background on various other MongoDB status outputs see:

· /reference/server-status

· /reference/replica-status

· /reference/database-statistics

· /reference/collection-statistics

For an additional utility that provides MongoDB metrics see "mongostat."



--help Returns a basic help and usage text.

--verbose, -v
Increases the amount of internal reporting returned on the command line. Increase
the verbosity with the -v form by including the option multiple times, (e.g.

Print the version of the mongotop utility and exit.

--host <hostname><:port>
Specifies a resolvable hostname for the mongod from which you want to export data.
By default mongotop attempts to connect to a MongoDB process running on the
localhost port number 27017.

Optionally, specify a port number to connect a MongoDB instance running on a port
other than 27017.

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:


--port <port>
Specifies the port number, if the MongoDB instance is not running on the standard
port. (i.e. 27017) You may also specify a port number using the mongotop --host

--ipv6 Enables IPv6 support that allows mongotop to connect to the MongoDB instance using
an IPv6 network. All MongoDB programs and processes, including mongotop, disable
IPv6 support by default.

--username <username>, -u <username>
Specifies a username to authenticate to the MongoDB instance, if your database
requires authentication. Use in conjunction with the mongotop option to supply a

--password <password>, -p <password>
Specifies a password to authenticate to the MongoDB instance. Use in conjunction
with the --username option to supply a username.

If you specify a --username without the --password option, mongotop will prompt for
a password interactively.

--authenticationDatabase <dbname>
New in version 2.4.

Specifies the database that holds the user's (e.g --username) credentials.

By default, mongotop assumes that the database specified to the --db argument holds
the user's credentials, unless you specify --authenticationDatabase.

See userSource, /reference/privilege-documents and /reference/user-privileges for
more information about delegated authentication in MongoDB.

--authenticationMechanism <name>
New in version 2.4.

Specifies the authentication mechanism. By default, the authentication mechanism is
MONGODB-CR, which is the MongoDB challenge/response authentication mechanism. In
the MongoDB Subscriber Edition, mongotop also includes support for GSSAPI to handle
Kerberos authentication.

See /tutorial/control-access-to-mongodb-with-kerberos-authentication for more
information about Kerberos authentication.

New in version 2.2.

Toggles the mode of mongotop to report on use of per-database locks. These data are
useful for measuring concurrent operations and lock percentage.

The final argument is the length of time, in seconds, that mongotop waits in
between calls. By default mongotop returns data every second.


mongotop returns time values specified in milliseconds (ms.)

mongotop only reports active namespaces or databases, depending on the --locks option. If
you don't see a database or collection, it has received no recent activity. You can issue
a simple operation in the mongo shell to generate activity to affect the output of

Contains the database namespace, which combines the database name and collection.

Changed in version 2.2: If you use the --locks, the ns field does not appear in the
mongotop output.

New in version 2.2.

Contains the name of the database. The database named . refers to the global lock,
rather than a specific database.

This field does not appear unless you have invoked mongotop with the --locks

Provides the total amount of time that this mongod spent operating on this

Provides the amount of time that this mongod spent performing read operations on
this namespace.

Provides the amount of time that this mongod spent performing write operations on
this namespace.

Provides a time stamp for the returned data.


By default mongotop connects to the MongoDB instance running on the localhost port 27017.
However, mongotop can optionally connect to remote mongod instances. See the mongotop
options for more information.

To force mongotop to return less frequently specify a number, in seconds at the end of the
command. In this example, mongotop will return every 15 seconds.

mongotop 15

This command produces the following output:

connected to:

ns total read write 2012-08-13T15:45:40
test.system.namespaces 0ms 0ms 0ms
local.system.replset 0ms 0ms 0ms
local.system.indexes 0ms 0ms 0ms
admin.system.indexes 0ms 0ms 0ms
admin. 0ms 0ms 0ms

ns total read write 2012-08-13T15:45:55
test.system.namespaces 0ms 0ms 0ms
local.system.replset 0ms 0ms 0ms
local.system.indexes 0ms 0ms 0ms
admin.system.indexes 0ms 0ms 0ms
admin. 0ms 0ms 0ms

To return a mongotop report every 5 minutes, use the following command:

mongotop 300

To report the use of per-database locks, use mongotop --locks, which produces the
following output:

$ mongotop --locks
connected to:

db total read write 2012-08-13T16:33:34
local 0ms 0ms 0ms
admin 0ms 0ms 0ms
. 0ms 0ms 0ms

Use mongotop online using onworks.net services

Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Laravel is a free, open-source PHP web
    framework. Features:Expressive,
    beautiful syntax.Database agnostic
    migrationsSchema builderPainless
    routingPowerful queu...
    Download Laravel
  • 2
    nmon for Linux
    nmon for Linux
    nmon is short for Nigel's
    Performance Monitor It either shows you
    the stats on-screen updating once a
    second or saves the data to a CSV file
    for later anal...
    Download nmon for Linux
  • 3
    VBA-M (Archived - Now on Github)
    VBA-M (Archived - Now on Github)
    Project has moved to
    Features:Cheat creationsave statesmulti
    system, supports gba, gbc, gb, sgb,
    Download VBA-M (Archived - Now on Github)
  • 4
    Linux System Optimizer and Monitoring
    Github Repository:
    Audience: End Users/Desktop. User
    interface: Qt. Programming La...
    Download Stacer
  • 5
    Fork of TeamWinRecoveryProject(TWRP)
    with many additional functions, redesign
    and more Features:Supports Treble and
    non-Treble ROMsUp-to-date Oreo kernel,
    Download OrangeFox
  • 6
    itop - ITSM  CMDB OpenSource
    itop - ITSM CMDB OpenSource
    IT Operations Portal: a complete open
    source, ITIL, web based service
    management tool including a fully
    customizable CMDB, a helpdesk system and
    a document man...
    Download itop - ITSM CMDB OpenSource
  • 7
    Clementine is a multi-platform music
    player and library organizer inspired by
    Amarok 1.4. It has a fast and
    easy-to-use interface, and allows you to
    search and ...
    Download Clementine
  • More »

Linux commands