-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
display功能补充 #667
Merged
Merged
display功能补充 #667
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
info_en: "[all_tenant]" | ||
info_cn: "[所有tenant基本信息]" | ||
command: obdiag display scene run --scene=observer.all_tenant | ||
task: | ||
- version: "[*,*]" | ||
steps: | ||
- type: sql | ||
sql: "select tenant_id,tenant_name,zone_list,primary_zone,status from oceanbase.__all_tenant;" | ||
global: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
info_en: "[aplan]" | ||
info_cn: "[实际执行计划信息]" | ||
command: obdiag display scene run --scene=observer.aplan --env svr_ip=test --env tenant_id=test --env plan_id=test | ||
task: | ||
- version: "[*,*]" | ||
steps: | ||
- type: sql | ||
sql: "select plan_id, operator, name, rows, cost | ||
from oceanbase.__all_virtual_plan_cache_plan_explain | ||
where svr_ip = '#{svr_ip}' | ||
and svr_port = 2882 | ||
and tenant_id = '#{tenant_id}' | ||
and plan_id = '#{plan_id}'" | ||
global: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
info_en: "[cpu]" | ||
info_cn: "[tenant的cpu信息]" | ||
command: obdiag display scene run --scene=observer.cpu | ||
task: | ||
- version: "[*,*]" | ||
steps: | ||
- type: sql | ||
sql: " select NOW() 'chenck_time', t.tenant_name,t.tenant_id,ca.svr_ip, | ||
round(sum(case when STAT_ID='140006' then ca.VALUE else 0 end)/100,2) 'cpu_usage', | ||
round(sum(case when STAT_ID='140005' then ca.VALUE else 0 end)/100,2) 'cpu_max' , | ||
round(100*(sum(case when STAT_ID='140006' then ca.VALUE else 0 end)/sum(case when STAT_ID='140005' then ca.VALUE else 0 end)),2) 'cpu_percent' | ||
from | ||
(select s.CON_ID, s.svr_ip,s.STAT_ID, sum(s.VALUE) VALUE | ||
from oceanbase.gv$sysstat s where s.STAT_ID in(140005,140006) | ||
group by s.CON_ID, s.svr_ip,s.STAT_ID, s.NAME) ca,oceanbase.__all_tenant t | ||
where t.tenant_id=ca.CON_ID | ||
group by t.tenant_name,ca.svr_ip;" | ||
global: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
info_en: "[index]" | ||
info_cn: "[查询表上的index信息]" | ||
command: obdiag display scene run --scene=observer.index --env user_name=test --env table_name=test | ||
task: | ||
- version: "[*,*]" | ||
steps: | ||
- type: sql | ||
sql: "select t1.tenant_name,a.table_id index_id,d.database_name tab_owner,a2.table_name ,d.database_name idx_owner,substr(substring_index(e.table_name,'_',4),7) table_id, substring(e.table_name,length(substring_index(e.table_name,'_',4))+2) index_name, group_concat(distinct a.column_name order by a.rowkey_position separator',') as index_column | ||
from oceanbase.__all_virtual_column a | ||
inner join oceanbase.__all_virtual_table e on a.table_id=e.table_id and e.table_type=5 and a.tenant_id=e.tenant_id | ||
inner join oceanbase.__all_virtual_table a2 on e.data_table_id=a2.table_id and a2.table_name=upper('#{table_name}') And a2.tenant_id=e.tenant_id | ||
inner join oceanbase.__all_tenant t1 on t1.tenant_id=a2.tenant_id and t1.tenant_id>1000 | ||
inner join oceanbase.__all_virtual_database d on d.database_id=a2.database_id and d.database_name=upper('#{user_name}') and e.database_id=d.database_id | ||
group by t1.tenant_name,a.table_id,d.database_name,a2.table_name,d.database_name,e.table_name; " | ||
global: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
info_en: "[leader]" | ||
info_cn: "[ob集群的leader信息]" | ||
command: obdiag display scene run --scene=observer.leader --env level=('all' or tenant_id or table_name) | ||
task: | ||
- version: "[*,4.0.0]" | ||
steps: | ||
- type: sql | ||
sql: "select a.tenant_id, b.tenant_name, a.svr_ip, a.role, count(1) part_count from oceanbase.__all_virtual_meta_table a, oceanbase.__all_tenant b | ||
where a.tenant_id = b.tenant_id and (('all'='#{level}') or (a.tenant_id = '#{level}') or (a.table_id in (select table_id from oceanbase.__all_virtual_table where table_name ='#{level}'))) group by a.tenant_id, b.tenant_name, a.svr_ip, a.role order by 4,1;" | ||
global: true | ||
- version: "[4.0.0,*]" | ||
steps: | ||
- type: sql | ||
sql: "select a.tenant_id, b.tenant_name, a.svr_ip, a.role, count(1) part_count from oceanbase.CDB_OB_TABLE_LOCATIONS a, oceanbase.__all_tenant b | ||
where a.tenant_id = b.tenant_id and (('all'='#{level}') or (a.tenant_id = '#{level}') or (a.table_name ='#{level}')) group by a.tenant_id, b.tenant_name, a.svr_ip, a.role order by 4,1;" | ||
global: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
info_en: "[lock]" | ||
info_cn: "[库里所有表持有锁的信息]" | ||
command: obdiag display scene run --scene=observer.lock | ||
task: | ||
- version: "[*,4.0.0]" | ||
steps: | ||
- type: sql | ||
sql: "select a.tenant_id,a.svr_ip,a.table_id,c.table_name,a.session_id,substring_index(substring_index(a.trans_id,',',1),':',-1) hash,a.ctx_create_time,a.expired_time,count(*) | ||
from oceanbase.__all_virtual_trans_lock_stat a | ||
inner join oceanbase.__all_virtual_table c on a.table_id=c.table_id and c.table_name not like '__idx_%' and a.tenant_id>1000 group by a.tenant_id,a.trans_id,a.svr_ip,a.table_id,c.table_name,a.session_id,substring_index(substring_index(a.trans_id,',',1),':',-1),a.ctx_create_time,a.expired_time;" | ||
global: true | ||
- version: "[4.0.0,*]" | ||
steps: | ||
- type: sql | ||
sql: "select a.tenant_id,a.svr_ip,a.ls_id,a.table_id,c.table_id table_actual_id,c.table_name,a.tablet_id,a.session_id,a.ctx_create_time | ||
from oceanbase.__all_virtual_trans_lock_stat a | ||
inner join oceanbase.__all_virtual_tablet_to_ls b on b.tablet_id=a.tablet_id and a.tenant_id=b.tenant_id and a.ls_id=b.ls_id | ||
inner join oceanbase.__all_virtual_table c on b.table_id=c.table_id and c.table_name not like '__idx_%' where a.tenant_id>1000;" | ||
global: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
info_en: "[locked_session]" | ||
info_cn: "[库里被阻塞会话的信息]" | ||
command: obdiag display scene run --scene=observer.locked_session | ||
task: | ||
- version: "[*,4.0.0]" | ||
steps: | ||
- type: sql | ||
sql: "select distinct a.svr_ip,c.table_id table_actual_id,c.table_name,a.session_id,a.block_session_id,a.lock_mode,a.type | ||
from oceanbase.__all_virtual_lock_wait_stat a | ||
left join oceanbase.__all_virtual_table c on a.table_id=c.table_id order by c.table_name;" | ||
global: true | ||
- version: "[4.0.0,*]" | ||
steps: | ||
- type: sql | ||
sql: "select distinct a.tenant_id,a.svr_ip,c.table_id table_actual_id,c.table_name,a.tablet_id,a.session_id,a.block_session_id,a.trans_id, | ||
a.holder_trans_id,a.lock_mode,a.type | ||
from oceanbase.__all_virtual_lock_wait_stat a | ||
left join oceanbase.__all_virtual_tablet_to_ls b on b.tablet_id=a.tablet_id and a.tenant_id=b.tenant_id and a.ls_id=b.ls_id | ||
left join oceanbase.__all_virtual_table c on b.table_id=c.table_id order by c.table_name,a.tenant_id;" | ||
global: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
info_en: "[locktab]" | ||
info_cn: "[某张表上持有锁的信息]" | ||
command: obdiag display scene run --scene=observer.locktab --env tablename=test | ||
task: | ||
- version: "[*,4.0.0]" | ||
steps: | ||
- type: sql | ||
sql: "select * from (select a.tenant_id,a.svr_ip,a.table_id,c.table_name,a.session_id,substring_index(substring_index(a.trans_id,',',1),':',-1) hash,a.ctx_create_time,a.expired_time,timestampdiff(second,date_format(a.ctx_create_time,'%Y-%m-%d %T'),now()) wait_time_s | ||
from oceanbase.__all_virtual_trans_lock_stat a | ||
left join oceanbase.__all_virtual_table c on a.table_id=c.table_id ) t where t.table_name like '%#{tablename}%';" | ||
global: true | ||
- version: "[4.0.0,*]" | ||
steps: | ||
- type: sql | ||
sql: "select * from (select a.tenant_id,a.svr_ip,a.ls_id,a.table_id,c.table_id table_actual_id,c.table_name,a.tablet_id,a.session_id,a.ctx_create_time,timestampdiff(second,date_format(a.ctx_create_time,'%Y-%m-%d %T'),now()) wait_time_s | ||
from oceanbase.__all_virtual_trans_lock_stat a | ||
left join oceanbase.__all_virtual_tablet_to_ls b on b.tablet_id=a.tablet_id | ||
left join oceanbase.__all_virtual_table c on b.table_id=c.table_id) t where t.table_name like '%#{tablename}%';" | ||
global: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
info_en: "[long_transaction]" | ||
info_cn: "[ob集群的长事务信息]" | ||
command: obdiag display scene run --scene=observer.long_transaction --env wait_time= waittime(s) | ||
task: | ||
- version: "[*,4.0.0]" | ||
steps: | ||
- type: sql | ||
sql: "select t.table_name,t.table_id,a.svr_ip,a.session_id,timestampdiff(second,date_format(ctx_create_time,'%Y-%m-%d %T'),now())/60 wait_time,a.trans_type,a.trans_id,case when b.trans_id is not null and part_trans_action > 2 then 'XA_hang' when b.trans_id is null and part_trans_action > 2 then 'nomarl_hang' when b.trans_id is not null then 'normal_XA_trans' when b.trans_id is null then 'normal_long_trans' end as 'trans_type_info' from oceanbase.__all_virtual_trans_stat a left join oceanbase.gv$table t on substr(a.`partition`,6,16)=t.table_id left join oceanbase.__all_virtual_global_transaction b on a.tenant_id = b.tenant_id and a.trans_id = b.trans_id where | ||
timestampdiff(second,date_format(ctx_create_time,'%Y-%m-%d %T'),now()) > #{wait_time} and a.is_exiting<>1 | ||
order by a.ctx_create_time limit 50;" | ||
global: true | ||
- version: "[4.0.0,*]" | ||
steps: | ||
- type: sql | ||
sql: "select a.svr_ip,a.session_id,a.ctx_create_time,now(),timestampdiff(second,date_format(ctx_create_time,'%Y-%m-%d %T'),now())/60 wait_time,a.trans_type,a.trans_id,case when b.trans_id is not null | ||
and part_trans_action > 2 then 'XA_hang' when b.trans_id is null and part_trans_action > 2 then 'nomarl_hang' | ||
when b.trans_id is not null then 'normal_XA_trans' when b.trans_id is null then 'normal_long_trans' end as 'trans_type_info',a.participants from oceanbase.__all_virtual_trans_stat a left join oceanbase.__all_virtual_global_transaction b on a.tenant_id = b.tenant_id and a.trans_id = b.trans_id where | ||
timestampdiff(second,date_format(ctx_create_time,'%Y-%m-%d %T'),now()) > #{wait_time} and a.is_exiting<>1 | ||
order by a.ctx_create_time limit 50;" | ||
global: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
info_en: "[lvss]" | ||
info_cn: "[processlist实时会话信息汇总]" | ||
command: obdiag display scene run --scene=observer.lvss | ||
task: | ||
- version: "[*,3.0.0.0]" | ||
steps: | ||
- type: sql | ||
sql: " select a.db,a.tenant,a.user,b.svr_ip,ifnull(b.sql_id,''),avg(b.time),max(b.time),count(*),a.id,a.master_sessid from oceanbase.__all_virtual_processlist a | ||
inner join oceanbase.__all_virtual_session_info b on a.id=b.id and a.svr_ip=b.svr_ip | ||
inner join oceanbase.__all_tenant c on a.tenant=c.tenant_name and c.tenant_id>1000 | ||
where b.sql_id<>'' and a.state<>'SLEEP' group by a.db,a.tenant,a.user,a.svr_ip,b.sql_id order by count(*) desc limit 10; " | ||
global: true | ||
- type: sql | ||
sql: " select user,svr_ip,replace(substr(info,1,40),char(10),'') as q_sql,avg(time),max(time),count(*),id from oceanbase.__all_virtual_processlist | ||
where tenant in (select b.tenant_name from __all_tenant b where b.tenant_id>1000) | ||
and state<>'SLEEP' group by user,svr_ip,substr(info,1,40) order by count(*) desc limit 10; " | ||
global: true | ||
- version: "[3.0.0.0,*]" | ||
steps: | ||
- type: sql | ||
sql: "select tenant,user,svr_ip,ifnull(sql_id,''),avg(retry_cnt),avg(time),max(time),count(*),id from oceanbase.__all_virtual_processlist where tenant<>'sys' and sql_id<>'' group by user,svr_ip,sql_id order by count(*) desc limit 10; " | ||
global: true | ||
- type: sql | ||
sql: "select tenant,user,svr_ip,substr(info,1,40) as q_sql,avg(retry_cnt),avg(time),max(time),count(*),id from oceanbase.__all_virtual_processlist where tenant<>'sys' and sql_id<>'' group by user,svr_ip,substr(info,1,40) order by count(*) desc limit 10; " | ||
global: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
info_en: "[mem]" | ||
info_cn: "[所有tenant的mermory信息]" | ||
command: obdiag display scene run --scene=observer.mem | ||
task: | ||
- version: "[4.0.0.0,*]" | ||
steps: | ||
- type: sql | ||
sql: " select NOW() 'chenck_time',b.tenant_id,b.tenant_name, a.SVR_IP , | ||
round(sum(case when a.STAT_ID='140003' then a.VALUE else 0 end)/1024/1024/1024,2) 'mem_usage/G', | ||
round(sum(case when a.STAT_ID='140002' then a.VALUE else 0 end)/1024/1024/1024,2) 'mem_max/G' ,round(100*(sum(case when STAT_ID='140003' then a.VALUE else 0 end)/sum(case when STAT_ID='140002' then a.VALUE else 0 end)),2) 'mem_percent' | ||
from oceanbase.gv$sysstat a inner join oceanbase.__all_tenant b on a.con_id = b.tenant_id where a.stat_id IN (140003,140002) and (a.con_id > 1000 or a.con_id = 1) and a.class < 1000 | ||
group by b.tenant_id,b.tenant_name, a.SVR_IP order by b.tenant_name,a.SVR_IP ; " | ||
global: true | ||
- type: sql | ||
sql: " SELECT tenant_id, svr_ip | ||
, round(ACTIVE_SPAN / 1024 / 1024/1024,2) AS active_gb | ||
, round(freeze_trigger / 1024 / 1024/1024,2) AS freeze_trg_gb | ||
, round(ACTIVE_SPAN / freeze_trigger*100,2) AS freeze_percent | ||
, FREEZE_CNT | ||
, round(MEMSTORE_USED /1024 / 1024/1024, 2) AS memstore_usage | ||
, round(MEMSTORE_LIMIT / 1024 / 1024/1024, 2) AS memstore_total | ||
,round(MEMSTORE_USED / MEMSTORE_LIMIT*100,2) as memstore_percent | ||
FROM oceanbase.gv$ob_memstore | ||
where tenant_id>1000 or tenant_id= 1 | ||
ORDER BY tenant_id, svr_ip desc; " | ||
global: true | ||
|
||
- version: "[*,4.0.0.0]" | ||
steps: | ||
- type: sql | ||
sql: " select NOW() 'chenck_time',b.tenant_id,b.tenant_name, a.SVR_IP , | ||
round(sum(case when a.STAT_ID='140003' then a.VALUE else 0 end)/1024/1024/1024,2) 'mem_usage/G', | ||
round(sum(case when a.STAT_ID='140002' then a.VALUE else 0 end)/1024/1024/1024,2) 'mem_max/G' ,round(100*(sum(case when STAT_ID='140003' then a.VALUE else 0 end)/sum(case when STAT_ID='140002' then a.VALUE else 0 end)),2) 'mem_percent' | ||
from oceanbase.gv$sysstat a inner join oceanbase.__all_tenant b on a.con_id = b.tenant_id where a.stat_id IN (140003,140002) and (a.con_id > 1000 or a.con_id = 1) and a.class < 1000 | ||
group by b.tenant_id,b.tenant_name, a.SVR_IP order by b.tenant_name,a.SVR_IP ; " | ||
global: true | ||
- type: sql | ||
sql: " SELECT tenant_id, ip | ||
, round(active / 1024 / 1024) AS active_mb | ||
, round(total / 1024 / 1024) AS total_mb | ||
, round(freeze_trigger / 1024 / 1024) AS freeze_trg_mb | ||
, round(mem_limit / 1024 / 1024) AS mem_limit_mb | ||
, freeze_cnt, round(active / freeze_trigger, 2) AS freeze_pct | ||
, round(total / mem_limit, 2) AS mem_usage | ||
FROM oceanbase.gv$memstore | ||
where tenant_id>1000 or tenant_id= 1 | ||
ORDER BY tenant_id, mem_usage desc; " | ||
global: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
info_en: "[obtab]" | ||
info_cn: "[ob内部表信息]" | ||
command: obdiag display scene run --scene=observer.obtab --env tablename=test | ||
task: | ||
- version: "[*,*]" | ||
steps: | ||
- type: sql | ||
sql: "SELECT distinct table_name FROM oceanbase.__all_virtual_table t1 JOIN oceanbase.__all_virtual_database t2 ON t2.database_id = t1.database_id JOIN oceanbase.__all_tenant t3 ON t3.tenant_id = t1.tenant_id WHERE tenant_name = 'sys' AND database_name = 'oceanbase' AND (table_name LIKE '__all%' OR table_name LIKE '__tenant%' OR table_name LIKE 'gv%' OR table_name LIKE 'v%' OR table_name LIKE 'dba%' OR table_name LIKE 'cdb%') and table_name like '%#{tablename}%' ORDER BY ORA_DECODE(SUBSTR(table_name, 1, 1), 'v', 3, 'g', 4, ORA_DECODE(SUBSTR(table_name, 3, 1), 'a', 2, 1)), table_name;" | ||
global: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
info_en: "[splan]" | ||
info_cn: "[执行记录信息]" | ||
command: obdiag display scene run --scene=observer.splan --env sqlid=test | ||
task: | ||
- version: "[*,4.0.0.0]" | ||
steps: | ||
- type: sql | ||
sql: "select database_name,svr_ip,plan_id,a.TENANT_ID,type,sql_id,substr(first_load_time,1,19) first_load_time, | ||
substr(last_active_time,1,19) last_active_time,avg_exe_usec/1000 'avg_exe_usec(ms)',executions,elapsed_time/1000/1000 'elapsed_time(s)', | ||
round(slowest_exe_usec/1000/1000,2) 'slowest_time(s)',substr(slowest_exe_time,1,19) slowest_exe_time,slow_count,ps_stmt_id, | ||
rows_processed/executions rows,outline_id | ||
from oceanbase.gv$plan_cache_plan_stat a,oceanbase.__all_virtual_database d | ||
where sql_id='#{sqlid}' and d.database_id=db_id and d.tenant_id=a.tenant_id;" | ||
global: true | ||
|
||
- version: "[4.0.0.0,*]" | ||
steps: | ||
- type: sql | ||
sql: "select database_name,svr_ip,plan_id,a.TENANT_ID,type,sql_id,substr(first_load_time,1,19) first_load_time, | ||
substr(last_active_time,1,19) last_active_time,avg_exe_usec/1000 'avg_exe_usec(ms)',executions,elapsed_time/1000/1000 'elapsed_time(s)', | ||
round(slowest_exe_usec/1000/1000,2) 'slowest_time(s)',substr(slowest_exe_time,1,19) slowest_exe_time,slow_count,ps_stmt_id, | ||
rows_processed/executions rows,outline_id | ||
from oceanbase.gv$ob_plan_cache_plan_stat a,oceanbase.__all_virtual_database d | ||
where sql_id='#{sqlid}' and d.database_id=db_id and d.tenant_id=a.tenant_id;" | ||
global: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
info_en: "[status]" | ||
info_cn: "[server status信息]" | ||
command: obdiag display scene run --scene=observer.status | ||
task: | ||
- version: "[*,*]" | ||
steps: | ||
- type: sql | ||
sql: "select b.info cluster_name,a.svr_ip,a.with_rootserver rs,a.zone, | ||
ora_decode(a.start_service_time,0,null,date_format(usec_to_time(a.start_service_time),'%Y-%m-%d %h:%i:%s')) start_service_time, | ||
ora_decode(a.last_offline_time,0,null,date_format(usec_to_time(a.last_offline_time),'%Y-%m-%d %h:%i:%s')) last_offline_time, | ||
ora_decode(a.stop_time,0,null,date_format(usec_to_time(a.stop_time),'%Y-%m-%d %h:%i:%s')) stop_time, | ||
a.status,SUBSTR(a.build_version, 1, INSTR(build_version, '-') - 1) build_version | ||
from oceanbase.__All_server a ,oceanbase.__all_zone b where b.name='cluster' order by a.zone,a.svr_ip; " | ||
global: true |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这一条和obdiag display scene run --scene=observer.server_info 重复了,需要整合成一条