Skip to content

Instantly share code, notes, and snippets.

@azat
Created May 21, 2012 12:41
Show Gist options
  • Save azat/2762141 to your computer and use it in GitHub Desktop.
Save azat/2762141 to your computer and use it in GitHub Desktop.
mongodb shard-status
// 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