1. 程式人生 > >mongodb後臺操作(檢視效能,檢視程序,殺死程序等)

mongodb後臺操作(檢視效能,檢視程序,殺死程序等)


檢視當前效能
/scmgt/mongodb/bin/mongostat -h xx.xx.xx.xx::9955
檢視讀寫
/scmgt/mongodb/bin/mongotop -h xx.xx.xx.xx::9955
進入mongodb
./mongo --port 9955
檢視當前執行語句
 db.currentOp()
殺掉程序(先執行 db.currentOp()獲取程序號,類似ps -ef)
db.killOP(2920488)
檢視最近錯誤
db.getLastError()db.getLastError()