db.printShardingStatus()
On this page本页内容
Definition定义
db.printShardingStatus()
-
Prints a formatted report of the sharding configuration and the information regarding existing chunks in a sharded cluster.打印分片配置的格式化报告以及关于分片集群中现有块的信息。Only use仅在连接到db.printShardingStatus()
when connected to amongos
instance.mongos
实例时使用db.printShardingStatus()
。Thedb.printShardingStatus()
method has the following parameter:db.printShardingStatus()
方法具有以下参数:Parameter参数Type类型Description描述verbose
boolean Optional.可选的。Determines the level of verbosity.确定详细程度。
If如果为true
, the method displays:true
,则该方法显示:Full details of the chunk distribution across shards even if you have 20 or more chunks, as well as the number of chunks on each shard.即使你有20个或20个以上的区块,区块在分片之间分布的完整细节,以及每个分片上的区块数量。Details of active mongos instances.活动mongos
实例的详细信息。
If如果为false
, the method displays:false
,则该方法显示:Full details of the chunk distribution across shards only if you have less than 20 chunks.只有当你拥有少于20个区块时,区块在分片之间分布的完整细节。If you have 20 or more chunks, the method instead returns a如果你有20个或更多的块,该方法会返回too many chunks to print ...
message, showing only the number of chunks on each shard.too many chunks to print ...
消息,只显示每个分片上的块数。Only the version and number of active mongos instances.仅活动mongos
实例的版本和数量。
The default verbose value is默认的详细值为false
.false
。See sh.status() for details of the output.有关输出的详细信息,请参阅sh.status()
。NoteThedb.printShardingStatus()
method run inmongosh
does not return JSON.mongosh
中运行的db.printShardingStatus()
方法不返回JSON。Use使用db.printShardingStatus()
for manual inspection, and Config Database in scripts.db.printShardingStatus()
进行手动检查,并在脚本中配置数据库。TipSee also:另请参阅: