sh.isBalancerRunning()
On this page
sh.isBalancerRunning()
Returns: boolean Returns true if the balancer process is currently running and migrating chunks and false if the balancer process is not running. Use
sh.getBalancerState()
to determine if the balancer is enabled or disabled.Important
mongosh Method
This page documents a
mongosh
method. This is not the documentation for database commands or language-specific drivers, such as Node.js.For the database command, see the
balancerStatus
command.For MongoDB API drivers, refer to the language-specific MongoDB driver documentation.
Compatibility
This method is available in deployments hosted in the following environments:
MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud
Important
This command is not supported in M0, M2, and M5 clusters. For more information, see Unsupported Commands.
MongoDB Enterprise: The subscription-based, self-managed version of MongoDB
MongoDB Community: The source-available, free-to-use, and self-managed version of MongoDB