$ mongostat --host 192.168.0.99:27017
$ mongotop --host 192.168.0.99:27017
ns(namespace),即 <db.collection>
mplotqueries mongod.log --group operation
# 總結出全部慢查詢的模式和出現次數、消耗時間等 mloginfo mongod.log --queries
輸出html
QUERIES namespace operations pattern count min (ms) max (ms) mean (ms) 95%-ile (ms) sum (ms) allowDiskUse serverside.scrum_master update {"datetime_used": {"$ne": 1}} 20 15753 17083 16434 1.8 328692 True serverside.django_session find {"_id": 1} 562 101 1512 317 2.0 178168 False serverside.user find {"_types": 1, "emails.email": 1} 804 101 1262 201 1.0 162311 False local.slaves find {"_id": 1, "host": 1, "ns": 1} 131 101 1048 310 0.0 40738 True serverside.email_alerts update {"_types": 1, "email": 1, "pp_user_id": 1} 13 153 11639 2465 0.0 32053 None serverside.sign_up update {"_id": 1} 77 103 843 269 1.8 20761 None serverside.user_credits remove {"_id": 1} 6 204 900 369 1.3 2218 None serverside.counters remove {"_id": 1, "_types": 1} 8 121 500 263 2.1 2111 True serverside.auth_sessions update {"session_key": 1} 7 111 684 277 1.0 1940 True serverside.credit_card update {"_id": 1} 5 145 764 368 0.0 1840 True serverside.email_alerts remove {"_types": 1, "request_code": 1} 6 143 459 277 1.3 1663 False serverside.user find {"_id": 1, "_types": 1} 5 153 427 320 1.9 1601 False serverside.user update {"emails.email": 1} 2 218 422 320 0.7 640 True serverside.user update {"_id": 1} 2 139 278 208 0.4 417 True serverside.auth_sessions update {"session_endtime": 1, "session_userid": 1} 1 244 244 244 0.2 244 False serverside.game_level find {"_id": 1} 1 104 104 104 0.1 104 None
本文出自 qbit snap