跳转至

seabox status

seabox status

查询SeaboxMPP数据库服务状态

语法

``` bash seabox status [OPTIONS]

Options: -a, –all show all cluster -k, –key show only key info about module -g , –group show only specified lcgroup info -m , –module module filter, including 'scdcs', 'gtm', 'monitor', 'coordinator', 'executor' 'storage', 'storage- mon','storage-mgr','storage-osd', must be used with -a/–all -v, –verbose show verbose runtime output -P, –primary show primary cluster status -n , –host host filter, such as "cor-1" -d , –dbid provide filter criteria,dbid -c , –content provide filter criteria,content -s , –status provide filter criteria,status -f , –file show cluster topology,the path of the file needs to be specified -h, –help show this help, then exit ```

描述

查询SeaboxMPP数据库服务状态,支持显示某一类组件的状态,支持显示逻辑集群信息

  • 注意:如有注意事项,补充
选项

该命令支持选项说明如下:

Options

命令支持的选项

-a, --all
使用该选项时表示显示集群中所有组件的详细信息
-k, --key
使用该选项时表示只显示集群中组件的关键信息
-g, --group
使用该选项时表示只显示逻辑集群信息,后面跟指定的逻辑集群名称
-m , --module
使用该选项时表示显示集群中某个类型组件的信息,后面跟指定的组件类型名称,配合 -a/–all 一起使用
-v, --verbose
使用该选项时表示程序运行过程中,输出详细的调试信息,便于故障定位
-P, --primary
使用该选项时表示展示主集群的状态
-n , --host
使用该选项时表示显示集群中某个主机上所有组件的信息,后面跟指定的主机名称,配合 -a/–all 一起使用
-d , --dbid
使用该选项时提供筛选条件:dbid
-c , --content
使用该选项时提供筛选条件:content
-s , --status
使用该选项时提供筛选条件:status
-f , --file
使用该选项时以表格形式展示集群拓扑文件,需要指定文件路径
-h, --help
使用该选项时返回seabox status命令的帮助信息
注解

如有具体的使用限制及注意事项,在这部分列出。

  • 注意: seabox status命令要求使用SeaboxMPP数据库集群安装用户seabox,或root用户,且需通过以下命令设置正确的环境变量:
source $SDHOME/seaboxmpp_path.sh

其中,$SDHOME为安装SeaboxMPP数据库服务的主目录。

示例

以下是seabox status --help的执行结果:

[seabox@mpp-test-1 bin]$ seabox status --help
show seabox cluster.

Usage: 
  seabox status [OPTIONS]

Options:
  -a, --all        show all cluster
  -k, --key        show only key info about module
  -g , --group     show only specified lcgroup info
  -m , --module    module filter, including 'scdcs', 'gtm', 'monitor',
                  'coordinator', 'executor' 'storage', 'storage-
                  mon','storage-mgr','storage-osd', must be used with
                  -a/--all
  -v, --verbose    show verbose runtime output
  -P, --primary    show primary cluster status
  -n , --host      host filter, such as "cor-1"
  -d , --dbid      provide filter criteria,dbid
  -c , --content   provide filter criteria,content
  -s , --status    provide filter criteria,status
  -f , --file      show cluster topology,the path of the file needs to be
                  specified
  -h, --help       show this help, then exit

以下命令可显示集群中所有组件的状态

[seabox@sy1 ~]$ seabox status -a
scdcs:
+------+--------------+--------------+--------+-------------------------------+
| host | address      | service_port | status | datadir                       |
+------+--------------+--------------+--------+-------------------------------+
| sy1  | 192.168.48.2 | 33731        | normal | /home/seabox/mpp/data/scdcs/0 |
+------+--------------+--------------+--------+-------------------------------+
gtm:
+------+---------+-------+--------+---------------------------+
| host | address |  port | status | datadir                   |
+------+---------+-------+--------+---------------------------+
| sy1  | sy1     | 33726 | normal | /home/seabox/mpp/data/gtm |
+------+---------+-------+--------+---------------------------+
monitor:
+------+--------+------------------------------------------------+---------+
| host | status | datadir                                        | role    |
+------+--------+------------------------------------------------+---------+
| sy1  | normal | /home/seabox/mpp/data/coordinatordd/monitor/14 | primary |
+------+--------+------------------------------------------------+---------+
coordinator:
+------+------+---------+-------+--------+----------------+---------------------------------------+
| dbid | host | address |  port | status | preferred_host | datadir                               |
+------+------+---------+-------+--------+----------------+---------------------------------------+
|    1 | sy1  | sy1     | 33711 | normal | sy1            | /home/seabox/mpp/data/coordinatordd/0 |
+------+------+---------+-------+--------+----------------+---------------------------------------+
safe group:
+--------+----------+
| name   | hosts    |
+--------+----------+
| group0 | sy1, sy2 |
+--------+----------+
executor:
+------+---------+------+----------+------+--------+------+---------+-------+----------------+---------------------------------------------+
| dbid | content | role | pre_role | mode | status | host | address |  port | preferred_host | datadir                                     |
+------+---------+------+----------+------+--------+------+---------+-------+----------------+---------------------------------------------+
|    2 | 0       | p    | p        | s    | normal | sy1  | sy1     | 33712 | sy1            | /home/seabox/mpp/data/executordd/primary/0  |
|    3 | 1       | p    | p        | s    | normal | sy1  | sy1     | 33713 | sy1            | /home/seabox/mpp/data/executordd/primary/1  |
|    4 | 2       | p    | p        | s    | normal | sy1  | sy1     | 33714 | sy1            | /home/seabox/mpp/data/executordd/primary/2  |
|    5 | 3       | p    | p        | s    | normal | sy2  | sy2     | 33712 | sy2            | /home/seabox/mpp/data/executordd/primary/3  |
|    6 | 4       | p    | p        | s    | normal | sy2  | sy2     | 33713 | sy2            | /home/seabox/mpp/data/executordd/primary/4  |
|    7 | 5       | p    | p        | s    | normal | sy2  | sy2     | 33714 | sy2            | /home/seabox/mpp/data/executordd/primary/5  |
|    8 | 0       | a    | a        | s    | normal | sy2  | sy2     | 33722 | sy2            | /home/seabox/mpp/data/executordd/mirror/0/0 |
|    9 | 1       | a    | a        | s    | normal | sy2  | sy2     | 33723 | sy2            | /home/seabox/mpp/data/executordd/mirror/0/1 |
|   10 | 2       | a    | a        | s    | normal | sy2  | sy2     | 33724 | sy2            | /home/seabox/mpp/data/executordd/mirror/0/2 |
|   11 | 3       | a    | a        | s    | normal | sy1  | sy1     | 33722 | sy1            | /home/seabox/mpp/data/executordd/mirror/0/3 |
|   12 | 4       | a    | a        | s    | normal | sy1  | sy1     | 33723 | sy1            | /home/seabox/mpp/data/executordd/mirror/0/4 |
|   13 | 5       | a    | a        | s    | normal | sy1  | sy1     | 33724 | sy1            | /home/seabox/mpp/data/executordd/mirror/0/5 |
+------+---------+------+----------+------+--------+------+---------+-------+----------------+---------------------------------------------+
nodes:
+----------+------------------+--------+
| hostname | address          | status |
+----------+------------------+--------+
| sy1      | sy1,192.168.48.2 | normal |
| sy2      | sy2              | normal |
+----------+------------------+--------+

以下命令可显示集群中指定组件executor的状态

[seabox@sy1 ~]$ seabox status -a -m executor
executor:
+------+---------+------+----------+------+--------+------+---------+-------+----------------+---------------------------------------------+
| dbid | content | role | pre_role | mode | status | host | address |  port | preferred_host | datadir                                     |
+------+---------+------+----------+------+--------+------+---------+-------+----------------+---------------------------------------------+
|    2 | 0       | p    | p        | s    | normal | sy1  | sy1     | 33712 | sy1            | /home/seabox/mpp/data/executordd/primary/0  |
|    3 | 1       | p    | p        | s    | normal | sy1  | sy1     | 33713 | sy1            | /home/seabox/mpp/data/executordd/primary/1  |
|    4 | 2       | p    | p        | s    | normal | sy1  | sy1     | 33714 | sy1            | /home/seabox/mpp/data/executordd/primary/2  |
|    5 | 3       | p    | p        | s    | normal | sy2  | sy2     | 33712 | sy2            | /home/seabox/mpp/data/executordd/primary/3  |
|    6 | 4       | p    | p        | s    | normal | sy2  | sy2     | 33713 | sy2            | /home/seabox/mpp/data/executordd/primary/4  |
|    7 | 5       | p    | p        | s    | normal | sy2  | sy2     | 33714 | sy2            | /home/seabox/mpp/data/executordd/primary/5  |
|    8 | 0       | a    | a        | s    | normal | sy2  | sy2     | 33722 | sy2            | /home/seabox/mpp/data/executordd/mirror/0/0 |
|    9 | 1       | a    | a        | s    | normal | sy2  | sy2     | 33723 | sy2            | /home/seabox/mpp/data/executordd/mirror/0/1 |
|   10 | 2       | a    | a        | s    | normal | sy2  | sy2     | 33724 | sy2            | /home/seabox/mpp/data/executordd/mirror/0/2 |
|   11 | 3       | a    | a        | s    | normal | sy1  | sy1     | 33722 | sy1            | /home/seabox/mpp/data/executordd/mirror/0/3 |
|   12 | 4       | a    | a        | s    | normal | sy1  | sy1     | 33723 | sy1            | /home/seabox/mpp/data/executordd/mirror/0/4 |
|   13 | 5       | a    | a        | s    | normal | sy1  | sy1     | 33724 | sy1            | /home/seabox/mpp/data/executordd/mirror/0/5 |
+------+---------+------+----------+------+--------+------+---------+-------+----------------+---------------------------------------------+
相关命令