Skip to content

Instantly share code, notes, and snippets.

@azat
azat / shard-status.js
Created May 21, 2012 12:41
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);
}