mongo Cluster
mongos> sh.status()
databases:
{ "_id" : "foo", "primary" : "shard1", "partitioned" : false }
{ "_id" : "bar", "primary" : "shard0", "partitioned" : false }
access shard1 from
mongo 127.0.0.1:28010
execute the following command in mongo shell
shard1:SECONDARY> db.currentOp( { "active" : true, "secs_running" : { "$gt" : 10 } } )
{
"desc": "conn1041165",
"threadId": "139624352057088",
"connectionId": 1041165,
"client": "192.168.0.1:54368",
"active": true,
"opid": 61729430,
"secs_running": 42746,
"microsecs_running": NumberLong("42746814047"),
"op": "command",
"ns": "bar",
"query": {
"dbstats": 1
},
"numYields": 0,
"locks": {
"Global": "r"
},
"waitingForLock": false,
"lockStats": {
"Global": {
"acquireCount": {
"r": NumberLong(1)
}
}
}
}
],
"ok": 1
}
...
it"s strange to find that there are many of the above queries about shard1. Why do you want to count shard0"s library? And why did it take so long to execute for almost 12 hours
"dbstats": 1
is it corresponding to the following command
> db.stats()
{
"db" : "test",
"collections" : 73,
"objects" : 246794,
"avgObjSize" : 2915.7151713574885,
"dataSize" : 719581010,
"storageSize" : 787140608,
"numExtents" : 0,
"indexes" : 85,
"indexSize" : 11505664,
"ok" : 1
}