当我输入 db.help() 它返回
DB methods:
db.addUser(username, password[, readOnly=false])
db.auth(username, password)
...
...
db.printShardingStatus()
...
...
db.fsyncLock() flush data to disk and lock server for backups
db.fsyncUnock() unlocks server following a db.fsyncLock()
我想了解如何获得特定命令的更详细帮助。问题出在 printShardingStatus 上,因为它返回“要打印的块太多,如果要打印,请使用详细”
mongos> db.printShardingStatus()
--- Sharding Status ---
sharding version: { "_id" : 1, "version" : 3 }
shards:
{ "_id" : "shard0000", "host" : "localhost:10001" }
{ "_id" : "shard0001", "host" : "localhost:10002" }
databases:
{ "_id" : "admin", "partitioned" : false, "primary" : "config" }
{ "_id" : "dbTest", "partitioned" : true, "primary" : "shard0000" }
dbTest.things chunks:
shard0001 12
shard0000 19
too many chunks to print, use verbose if you want to for
ce print
我发现对于那个特定的命令,我可以指定布尔参数
db.printShardingStatus(true)
未使用 db.help() 显示。