MongoDB monitoring second mongotop
Mongotop can see how much time the MongoDB instance spends reading or writing data, which provides collection-level statistics, while mongostat provides database-level statistics. Mongotop displays data once per second by default
The relevant parameter options are as follows:
-- help displays help information
-- verbose,-v detailed mode, the more detailed multiple v, such as-vvv
-- version displays version information
-- host specifies the hostname
-- port designated port
-- username,-u specifies the user name
-- password,-p specifies the user password
-- authenticationDatabase specifies the library name of the user credential
-- authenticationMechanism designated authentication mechanism
-- locks is displayed on a per library basis, not on a collection basis
Refresh interval
Field description
The result displayed by mongotop is expressed in millisecond ms
Mongotop displays only active namespace or db, and uses-- locks to show only db but not namespace
Ns stands for namespace and consists of a library name and a collection name
Db library name, displayed using-- locks
Total time spent on total read and write operations, expressed in ms
Read read operation is time-consuming
Write write operation is time-consuming
$mongotop-- port 28018 15connected to: 127.0.0.1 ns total read write 28018-10-08T06:43:38 game_server_jd23.player_message 198ms 138ms 60ms game_server_jd33.player_instance 173ms 125ms 48ms game_server_jd02.player_backpack 132ms 126ms 6ms game_server_jd03.player_backpack 117ms 115ms 2ms local.oplog.rs 112ms 112ms 0ms game_server_jd02.player_message 103ms 103ms 0ms game_server_jd12.player_backpack 82ms 63ms 19ms game_server_jd678new.player_message 80ms 80ms 0ms game_server_jd22.player_backpack 68ms 66ms 2ms
Mongotop-- port 28018-- locks 15connected to: 127.0.0.1 locks 15connected to 28018 db total read write 2014-10-08T07:11:31 game_server_jd02 785ms 562ms 223ms game_server_jd45 589ms 255ms 334ms local 501ms 258ms 243ms game_server_jd01 493ms 155ms 338ms game_server_jd03 376ms 228ms 148ms game_server_jd16789 362ms 208ms 154ms. 298ms 10ms 288ms game_server_jd35 250ms 169ms 81ms game_server_jd12 218ms 156ms 62ms