Skip to content

Instantly share code, notes, and snippets.

View no7dw's full-sized avatar

Wade Deng no7dw

  • footprint.network
  • guangzhou
  • X @no7wade
View GitHub Profile
@no7dw
no7dw / findLongRunningOp.js
Created July 2, 2019 03:11 — forked from kylemclaren/findLongRunningOp.js
Find and (safely) kill long running MongoDB ops
db.currentOp().inprog.forEach(
function(op) {
if(op.secs_running > 5) printjson(op);
}
)
[
{
"host" : "a53d01266.cloud.st3:3001",
"desc" : "conn6265179",
"connectionId" : 6265179.0,
"client" : "10.8.88.229:1478",
"clientMetadata" : {
"driver" : {
"name" : "nodejs",
"version" : "3.3.2"