Skip to content

Instantly share code, notes, and snippets.

@mlazarov
Forked from azat/shard-status.js
Created January 11, 2013 10:10
Show Gist options
  • Save mlazarov/4509490 to your computer and use it in GitHub Desktop.
Save mlazarov/4509490 to your computer and use it in GitHub Desktop.
// shard-status
while (true) {
db.currentOp().inprog.forEach(function(row) { if (row.query.moveChunk) printjson(row.query.shardId + " " + row.msg + " secs: " + row.secs_running + " switches: " + row.numYields); });
sleep(1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment