db.printShardingStatus()

Definition

  • db.printShardingStatus()
  • Prints a formatted report of the sharding configuration and theinformation regarding existing chunks in a sharded cluster.

Only use db.printShardingStatus() when connected to amongos instance.

The db.printShardingStatus() method has the followingparameter:

ParameterTypeDescriptionverbosebooleanOptional. Determines the level of verbosity.

If true, the method displays:

  • Full details of the chunk distribution across shards even ifyou have 20 or more chunks, as well as the number of chunkson each shard.
  • Details of active mongos instances.If false, the method displays:

  • Full details of the chunk distribution across shards only ifyou have less than 20 chunks. If you have 20 or more chunks,the method instead returns a too many chunks to print …message, showing only the number of chunks on each shard.

  • Only the version and number of active mongosinstances.The default verbose value is false.

See sh.status() for details of the output.

Note

The db.printShardingStatus() in the mongo shell does not returnJSON. Use db.printShardingStatus() for manual inspection, andConfig Database in scripts.

See also

sh.status()