Skip to content

Commit 0378760

Browse files
authored
[Tool] Add diagnostics.sql script for troubleshooting (StarRocks#28428)
Signed-off-by: Alex Zhu <[email protected]>
1 parent ea7fd02 commit 0378760

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tools/diagnostics.sql

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
-- diagnostics.sql
2+
3+
-- This script collects key system information to help diagnose
4+
-- and troubleshoot performance issues.
5+
6+
-- This data can help identify system bottlenecks,
7+
-- debug problems, and guide optimization efforts.
8+
9+
-- example:
10+
-- cat diagnostics.sql | mysql -h127.0.0.1 -P9030 -uroot |gzip > diagnostics.gz
11+
12+
show frontends\G;
13+
show backends\G;
14+
show variables\G;
15+
admin show frontend config\G;
16+
select * from information_schema.loads\G;
17+
select * from information_schema.routine_load_jobs\G;
18+
select * from information_schema.be_metrics\G;
19+
select * from information_schema.be_bvars\G;
20+
select * from information_schema.be_cloud_native_compactions\G;
21+
select BE_ID, NAME, VALUE from information_schema.be_configs\G;
22+
show proc '/compactions'\G;
23+
select BE_ID, LOG from (select BE_ID, TIMESTAMP, LOG from information_schema.be_logs where LEVEL='W' or LEVEL='E' order by TIMESTAMP DESC limit 5000) t order by BE_ID, TIMESTAMP ASC;

0 commit comments

Comments
 (0)