標籤:date insert start admin ted and 工具 root bsp
--mongostat工具是mongdb內建的監控工具,可以用來監控mongodb目前狀態下的運行情況:
[[email protected] ~]# /usr/local/mongodb341/bin/mongostat 2
insert query update delete getmore command dirty used flushes vsize res qrw arw net_in net_out conn time
*0 *0 *0 *0 0 1|0 0.0% 0.0% 0 439M 56.0M 0|0 0|0 79b 22.5k 2 Dec 29 13:22:35.349
*0 *0 *0 *0 0 1|0 0.0% 0.0% 0 439M 56.0M 0|0 0|0 79b 22.5k 2 Dec 29 13:22:37.349
*0 *0 *0 *0 0 0|0 0.0% 0.0% 0 439M 56.0M 0|0 0|0 78b 22.5k 2 Dec 29 13:22:39.350
*0 *0 *0 *0 0 1|0 0.0% 0.0% 0 439M 56.0M 0|0 0|0 79b 22.5k 2 Dec 29 13:22:41.349
*0 *0 *0 *0 0 1|0 0.0% 0.0% 0 439M 56.0M 0|0 0|0 79b 22.5k 2 Dec 29 13:22:43.348
*0 *0 *0 *0 0 0|0 0.0% 0.0% 0 439M 56.0M 0|0 0|0 78b 22.5k 2 Dec 29 13:22:45.349
*0 *0 *0 *0 0 0|0 0.0% 0.0% 0 439M 56.0M 0|0 0|0 78b 22.5k 2 Dec 29 13:22:47.350
*0 *0 *0 *0 0 1|0 0.0% 0.0% 0 439M 56.0M 0|0 0|0 105b 22.5k 2 Dec 29 13:22:49.352
--mongotop工具是mongodb內建的top監控工具,可以用來監控當前mongodb資料庫哪些資源佔用資源較多,對於最佳化具有參考作用:
[[email protected] ~]# /usr/local/mongodb341/bin/mongotop 2
2016-12-29T13:24:35.530+0800 connected to: 127.0.0.1
ns total read write 2016-12-29T13:24:37+08:00
admin.system.roles 0ms 0ms 0ms
admin.system.users 0ms 0ms 0ms
admin.system.version 0ms 0ms 0ms
dbk.col 0ms 0ms 0ms
dbk.test 0ms 0ms 0ms
dbking.col 0ms 0ms 0ms
dbking.test 0ms 0ms 0ms
local.col 0ms 0ms 0ms
local.startup_log 0ms 0ms 0ms
local.system.replset 0ms 0ms 0ms
ns total read write 2016-12-29T13:24:39+08:00
admin.system.roles 0ms 0ms 0ms
admin.system.users 0ms 0ms 0ms
admin.system.version 0ms 0ms 0ms
dbk.col 0ms 0ms 0ms
dbk.test 0ms 0ms 0ms
dbking.col 0ms 0ms 0ms
dbking.test 0ms 0ms 0ms
local.col 0ms 0ms 0ms
local.startup_log 0ms 0ms 0ms
local.system.replset 0ms 0ms 0ms
mongostat和mongotop對mongodb資料庫運行狀態進行監控