Last active
November 29, 2015 04:59
-
-
Save jstrellner/d69af11cc24da7d43fc2 to your computer and use it in GitHub Desktop.
Print the status of all index rebuilds.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.currentOp().inprog.forEach( | |
function(op) { | |
if ((op.secs_running > 5) && (op.op == "query")) { | |
if ((op.msg !== undefined) && (op.msg.indexOf("%") != -1)) { | |
print(op.ns + " - " + op.msg + "\n"); | |
} | |
} | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment