db.currentOp() -- This is for listing current operation processes/sessions information
db.killOp() -- Using operation id we can kill long running processess
db.currentOp()
--find the opid for the long running session
db.killOp(opid)
db.currentOp()
db.currentOp().inprog.length
Script for identifying long running ops
===========================
db.currentOp().inprog.forEach(
function(op)
{
if(op.secs_running>10)
{
print("slow op in progress? secs:" + op.secs_running+"opid:"+
op.opid);
}
}
)
rs.status() - replica status
db.killOp(<opid>)
Misc commands
============
netstat -n|grep <port>
lsof|grep pid
Creating open transaction:
===================
while (1){db.example.update({},{$inc:{x:1}},false,true);}
db.killOp() -- Using operation id we can kill long running processess
db.currentOp()
--find the opid for the long running session
db.killOp(opid)
db.currentOp()
db.currentOp().inprog.length
Script for identifying long running ops
===========================
db.currentOp().inprog.forEach(
function(op)
{
if(op.secs_running>10)
{
print("slow op in progress? secs:" + op.secs_running+"opid:"+
op.opid);
}
}
)
rs.status() - replica status
db.killOp(<opid>)
Misc commands
============
netstat -n|grep <port>
lsof|grep pid
Creating open transaction:
===================
while (1){db.example.update({},{$inc:{x:1}},false,true);}
No comments:
Post a Comment