OPTIONS

listShards

On this page

Definition

listShards

Returns a list of the configured shards. listShards is only available for mongos instances. You can only issue listShards against the admin database.

The command takes the following form:

{ listShards: 1 }

Example

The following example returns the list of shards:

db.getSiblingDB("admin").runCommand( { listShards: 1 } )

Was this page helpful?

Yes No

Thank you for your feedback!

We're sorry! You can Report a Problem to help us improve this page.