描述
使用show proxycongestion [all] [clustername]
语句:
- show proxycongestion : 展示所有cluster的黑名单信息。黑名单指 :
dead_congested
,alive_congested
,is_zone_upgrading
,is_zone_merging
,is_server_upgrading
任意一个状态为true。 - show proxycongestion all : 展示所有cluster的server信息(包括黑名单中和非黑名单中的server信息)。
- show proxycongestion clustername : 展示指定cluster的黑名单信息。
- show proxycongestion all clustername : 展示指定cluster的server信息。
- proxy 1.1.2版本之前, clustername不需要单引号或者双引号引起来, 1.1.2版本及之后,必须要用单引号或者双引号引起来。
示例
OceanBase (root@oceanbase)> show proxycongestion;
*************************** 1. row ***************************
cluster_name: ob1.jianhua.sjh
zone_name: zone1
zone_state: ACTIVE
server_ip: 10.111.4.28:13201
server_state: ACTIVE
alive_congested: 0
last_alive_congested: 0
dead_congested: 0
last_dead_congested: 0
stat_alive_failures: 0
stat_conn_failures: 0
conn_last_fail_time: 0
conn_failure_events: 0
alive_last_fail_time: 0
alive_failure_events: 0
ref_count: 1
*************************** 2. row ***************************
cluster_name: ob1.jianhua.sjh
zone_name: zone1
zone_state: ACTIVE
server_ip: 10.111.4.27:13203
server_state: ACTIVE
alive_congested: 0
last_alive_congested: 0
dead_congested: 0
last_dead_congested: 0
stat_alive_failures: 0
stat_conn_failures: 0
conn_last_fail_time: 0
conn_failure_events: 0
alive_last_fail_time: 0
alive_failure_events: 0
ref_count: 1
2 rows in set (0.00 sec)
OceanBase (root@oceanbase)> show proxycongestion all\G
*************************** 1. row ***************************
cluster_name: MetaDataBase
zone_name: zone1
zone_state: ACTIVE
server_ip: 10.111.4.28:13201
server_state: ACTIVE
alive_congested: 0
last_alive_congested: 0
dead_congested: 0
last_dead_congested: 0
stat_alive_failures: 0
stat_conn_failures: 0
conn_last_fail_time: 0
conn_failure_events: 0
alive_last_fail_time: 0
alive_failure_events: 0
ref_count: 1
*************************** 2. row ***************************
cluster_name: MetaDataBase
zone_name: zone1
zone_state: ACTIVE
server_ip: 10.111.4.27:13203
server_state: ACTIVE
alive_congested: 0
last_alive_congested: 0
dead_congested: 0
last_dead_congested: 0
stat_alive_failures: 0
stat_conn_failures: 0
conn_last_fail_time: 0
conn_failure_events: 0
alive_last_fail_time: 0
alive_failure_events: 0
ref_count: 1
*************************** 3. row ***************************
cluster_name: ob1.jianhua.sjh
zone_name: zone1
zone_state: ACTIVE
server_ip: 10.111.4.28:13201
server_state: ACTIVE
alive_congested: 0
last_alive_congested: 0
dead_congested: 0
last_dead_congested: 0
stat_alive_failures: 0
stat_conn_failures: 0
conn_last_fail_time: 0
conn_failure_events: 0
alive_last_fail_time: 0
alive_failure_events: 0
ref_count: 1
*************************** 4. row ***************************
cluster_name: ob1.jianhua.sjh
zone_name: zone1
zone_state: ACTIVE
server_ip: 10.111.4.27:13203
server_state: ACTIVE
alive_congested: 0
last_alive_congested: 0
dead_congested: 0
last_dead_congested: 0
stat_alive_failures: 0
stat_conn_failures: 0
conn_last_fail_time: 0
conn_failure_events: 0
alive_last_fail_time: 0
alive_failure_events: 0
ref_count: 1
4 rows in set (0.01 sec)
OceanBase (root@oceanbase)> show proxycongestion all ob1.jianhua.sjh\G
*************************** 1. row ***************************
cluster_name: ob1.jianhua.sjh
zone_name: zone1
zone_state: ACTIVE
server_ip: 10.111.4.28:13201
server_state: ACTIVE
alive_congested: 0
last_alive_congested: 0
dead_congested: 0
last_dead_congested: 0
stat_alive_failures: 0
stat_conn_failures: 0
conn_last_fail_time: 0
conn_failure_events: 0
alive_last_fail_time: 0
alive_failure_events: 0
ref_count: 1
*************************** 2. row ***************************
cluster_name: ob1.jianhua.sjh
zone_name: zone1
zone_state: ACTIVE
server_ip: 10.111.4.27:13203
server_state: ACTIVE
alive_congested: 0
last_alive_congested: 0
dead_congested: 0
last_dead_congested: 0
stat_alive_failures: 0
stat_conn_failures: 0
conn_last_fail_time: 0
conn_failure_events: 0
alive_last_fail_time: 0
alive_failure_events: 0
ref_count: 1
2 rows in set (0.00 sec)
OceanBase (root@oceanbase)> show proxycongestion all ob1.jianhua\G
ERROR 4018 (HY000): Entry not exist
mysql> show proxyinfo binary\G
*************************** 1. row ***************************
name: binary info
info: ObProxy-OceanBase 1.1.2-459.el6
version:RELEASE_6U
MD5:
REVISION:459-local-5ba2e3d33ea201fb675eb704627162a584485cdd
BUILD_TIME:Sep 29 2016 11:50:15
BUILD_FLAGS:-D__STDC_LIMIT_MACROS -D_OB_VERSION=1000 -D__STDC_CONSTANT_MACROS -D_NO_EXCEPTION -g -Wall -Werror -Wextra -Wunused-parameter -Wformat -Wconversion -Wno-invalid-offsetof -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -mtune=generic -Wno-psabi -Wno-sign-compare -DGCC_52 -DUSE_POSIX_FALLOCATE -DSUPPORT_SSE4_2 -DHAVE_SCHED_GETCPU -DHAVE_REALTIME_COARSE -DOB_HAVE_EVENTFD -DHAVE_FALLOCATE -DHAVE_MINIDUMP
1 row in set (0.00 sec)
mysql> show proxycongestion all ob1.jianhua.sjh;
ERROR 5010 (21000): Unknown operator
mysql> show proxycongestion all "ob1.jianhua.sjh";
+-----------------+-----------+------------+--------------------+--------------+-----------------+----------------------+----------------+---------------------+---------------------+--------------------+---------------------+---------------------+----------------------+----------------------+-----------+
| cluster_name | zone_name | zone_state | server_ip | server_state | alive_congested | last_alive_congested | dead_congested | last_dead_congested | stat_alive_failures | stat_conn_failures | conn_last_fail_time | conn_failure_events | alive_last_fail_time | alive_failure_events | ref_count |
+-----------------+-----------+------------+--------------------+--------------+-----------------+----------------------+----------------+---------------------+---------------------+--------------------+---------------------+---------------------+----------------------+----------------------+-----------+
| ob1.jianhua.sjh | zone1 | ACTIVE | 10.125.111.7:13201 | ACTIVE | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
+-----------------+-----------+------------+--------------------+--------------+-----------------+----------------------+----------------+---------------------+---------------------+--------------------+---------------------+---------------------+----------------------+----------------------+-----------+
1 row in set (0.00 sec)