Skip to content

Instantly share code, notes, and snippets.

View omerbn's full-sized avatar
🎯
Focusing

Omer omerbn

🎯
Focusing
View GitHub Profile
@omerbn
omerbn / findLongRunningOp.js
Last active April 23, 2020 16:25 — forked from kylemclaren/findLongRunningOp.js
Find and (safely) kill long running MongoDB ops
db.currentOp().inprog.forEach(
function(op) {
if (!op.client.startsWith("10.1.1.38")) return;
if(op.secs_running > 5){
db.killOp(op.opid);
}
}
)