sh.status()

mongos> sh.status({"verbose":1})sh.status({"verbose":1})
--- Sharding Status ---
  sharding version: {
        "_id" : 1,
        "minCompatibleVersion" : 5,
        "currentVersion" : 6,
        "clusterId" : ObjectId("57199835d058c00f4d3281a8")
}
  shards:
        {  "_id" : "shard0000",  "host" : "localhost:30000" }
        {  "_id" : "shard0001",  "host" : "localhost:30001" }
        {  "_id" : "shard0002",  "host" : "localhost:30002" }
  balancer:
        Currently enabled:  no
        Currently running:  no
        Failed balancer rounds in last 5 attempts:  0
        Migration Results for the last 24 hours:
                No recent migrations
  databases:
        {  "_id" : "admin",  "partitioned" : false,  "primary" : "config" }
        {  "_id" : "test",  "partitioned" : true,  "primary" : "shard0001" }
                test.users
                        shard key: { "username" : 1 }
                        chunks:
                                shard0001       22
                        { "username" : { "$minKey" : 1 } } -->> { "username" : "user1421" } on : shard0001 Timestamp(1, 0)
                        { "username" : "user1421" } -->> { "username" : "user18424" } on : shard0001 Timestamp(1, 1)
                        { "username" : "user18424" } -->> { "username" : "user22638" } on : shard0001 Timestamp(1, 2)
                        { "username" : "user22638" } -->> { "username" : "user26852" } on : shard0001 Timestamp(1, 3)
                        { "username" : "user26852" } -->> { "username" : "user31065" } on : shard0001 Timestamp(1, 4)
                        { "username" : "user31065" } -->> { "username" : "user3528" } on : shard0001 Timestamp(1, 5)
                        { "username" : "user3528" } -->> { "username" : "user39494" } on : shard0001 Timestamp(1, 6)
                        { "username" : "user39494" } -->> { "username" : "user43707" } on : shard0001 Timestamp(1, 7)
                        { "username" : "user43707" } -->> { "username" : "user47921" } on : shard0001 Timestamp(1, 8)
                        { "username" : "user47921" } -->> { "username" : "user52134" } on : shard0001 Timestamp(1, 9)
                        { "username" : "user52134" } -->> { "username" : "user56349" } on : shard0001 Timestamp(1, 10)
                        { "username" : "user56349" } -->> { "username" : "user60562" } on : shard0001 Timestamp(1, 11)
                        { "username" : "user60562" } -->> { "username" : "user64777" } on : shard0001 Timestamp(1, 12)
                        { "username" : "user64777" } -->> { "username" : "user68991" } on : shard0001 Timestamp(1, 13)
                        { "username" : "user68991" } -->> { "username" : "user73203" } on : shard0001 Timestamp(1, 14)
                        { "username" : "user73203" } -->> { "username" : "user77418" } on : shard0001 Timestamp(1, 15)
                        { "username" : "user77418" } -->> { "username" : "user81631" } on : shard0001 Timestamp(1, 16)
                        { "username" : "user81631" } -->> { "username" : "user85846" } on : shard0001 Timestamp(1, 17)
                        { "username" : "user85846" } -->> { "username" : "user90059" } on : shard0001 Timestamp(1, 18)
                        { "username" : "user90059" } -->> { "username" : "user94273" } on : shard0001 Timestamp(1, 19)
                        { "username" : "user94273" } -->> { "username" : "user98488" } on : shard0001 Timestamp(1, 20)
                        { "username" : "user98488" } -->> { "username" : { "$maxKey" : 1 } } on : shard0001 Timestamp(1, 21) 

mongos>
时间: 2024-08-26 14:26:01

sh.status()的相关文章

zookeeper: zkServer.sh status没有到主机的路由

没有到主机的路由这种问题很常见,多数是由机器的防火墙没有关闭. Ubuntu查看防火墙状态ufw status 关闭防火墙ufw disable centos6查看防火墙状态service iptables status 关闭防火墙chkconfig iptables off centos7查看防火墙状态firewall-cmd --state 关闭防火墙systemctl stop firewalld.service 原文地址:https://www.cnblogs.com/achengmu/

启动zookeeper时,jps显示有进程,但是status查看状态时就Error contacting service. It is probably not running

转自:http://www.cnblogs.com/xiaohua92/p/5460515.html#undefined 安装zookeeper时候,可以查看进程启动,但是状态显示报错:Error contacting service. It is probably not running 安装zookeeper-3.3.2的时候,启动正常没报错,但zkServer.sh status查看状态的时候却出现错误,如下: JMX enabled by defaultUsing config: /ha

Concurrent Request:Inactive phase,No Manager status

Symptom 随便submit一个request,发现几乎所有的Concurrent Manager都为No Manager状态,Phase为Inactive. Solution 一个Concurrent Request的生命周期包含不同的阶段(Phase):Pending, Running, and Completed,并且对于每一个Phase,又可能会有不同的状态. Pending Phase - Normal, Standby, Scheduled, Waiting Running Ph

【Apache ZooKeeper】命令行zkCli.sh使用指南

ZooKeeper命令行 原文                   http://blog.csdn.net/ganglia/article/details/11606807 ZooKeeper客户端有C语言和Java两个版本. ZooKeeper的命令在/usr/lib/zookeeper/bin文件夹下. 运行Java版本的客户端使用bash zkCli.sh -server IP:port ,运行C语言版本的使用./cli_mt IP:port,下面介绍Java版本的,C语言版差不多. 查

mongoDB rs和sh关键字的作用

rs是一个全局变量,其其中定义了很多分片操作的辅助函数, 可以sh.help()查看使用的辅助函数 这些是rs和sh所有函数 在mongoDB中有两种方法表示 例 sh.enableSharding("test")  和   db.runCommand("enableSharding" : "test") 例 sh.status() 和db.printShardingStatus()

【转】zookeeper之 zkServer.sh命令、zkCli.sh命令、四字命令

[FROM]https://www.cnblogs.com/andy6/p/7674028.html 一.zkServer.sh 1.查看 zkServer.sh 帮助信息 [[email protected] bin]# ./zkServer.sh help ZooKeeper JMX enabled by default Using config: /bigdata/zookeeper-3.4.10/bin/../conf/zoo.cfg Usage: ./zkServer.sh {star

MongoDB 搭建分片集群

在MongoDB(版本 3.2.9)中,分片是指将collection分散存储到不同的Server中,每个Server只存储collection的一部分,服务分片的所有服务器组成分片集群.分片集群(Sharded Clustered)的服务器分为三中类型:Router(mongos),Config Server 和 Shard(Replica Set 或 Standalone mongod).使用分片集群,不需要使用强大的计算机,就能存储更多的数据,处理更大的负载.分布式数据库系统的设计目的是:

MongoDB 分片管理

在MongoDB(版本 3.2.9)中,分片集群(sharded cluster)是一种水平扩展数据库系统性能的方法,能够将数据集分布式存储在不同的分片(shard)上,每个分片只保存数据集的一部分,MongoDB保证各个分片之间不会有重复的数据,所有分片保存的数据之和就是完整的数据集.分片集群将数据集分布式存储,能够将负载分摊到多个分片上,每个分片只负责读写一部分数据,充分利用了各个shard的系统资源,提高数据库系统的吞吐量. 数据集被拆分成数据块(chunk),每个数据块包含多个doc,数

Linux->ZooKeeper集群搭建

人,总免不了有心结,限制着自己,难以前行.对于ZooKeeper的理解,以及实践也拖了很久,今天用零散时间学习一下,补点干货. 一.简述 Zookeeper是Google的Chubby一个开源的实现,是高有效和可靠的协同工作系统,Zookeeper能够用来选举Leader(基于Fast Paxos协议),配置信息维护等,在一个分布式的环境中,需要一个Master实例或存储一些配置信息,确保文件写入的一致性等. ZooKeeper是一个分布式,开放源码的分布式应用程序协调服务,包含一个简单的原语集