The ASH_REPORT procedure displays the ASH report in text format.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only MySQL mode.
Syntax
PROCEDURE ASH_REPORT(BTIME IN DATE,
ETIME IN DATE,
SQL_ID IN VARCHAR2 DEFAULT NULL,
TRACE_ID IN VARCHAR2 DEFAULT NULL,
WAIT_CLASS IN VARCHAR2 DEFAULT NULL,
REPORT_TYPE IN VARCHAR2 DEFAULT 'text',
SVR_IP IN VARCHAR2 DEFAULT NULL,
SVR_PORT IN NUMBER DEFAULT NULL,
TENANT_ID IN NUMBER DEFAULT NULL
);
Parameters
| Parameter | Description |
|---|---|
| BTIME | The start time of the sampling. |
| ETIME | The end time of the sampling. |
| SQL_ID | The SQL_ID of the SQL statement to be sampled. If this parameter is not specified or is set to NULL, the SQL_ID is not restricted. |
| TRACE_ID | The TRACE_ID of the SQL statement to be sampled. If this parameter is not specified or is set to NULL, the TRACE_ID is not restricted. |
| WAIT_CLASS | The type of the event to be sampled. The value of WAIT_CLASS is referenced from the GV$ACTIVE_SESSION_HISTORY.WAIT_CLASS field. If this parameter is not specified or is set to NULL, the wait type is not restricted. |
| REPORT_TYPE | The report type. Only the TEXT type is supported. This parameter is optional. |
| REPORT_TYPE | The report type. The HTML and TEXT types are supported. If this parameter is not specified, the default value TEXT is used. |
| SVR_IP | The IP address of the node that generates the ASH report. If this parameter is not specified or is set to NULL, the IP address is not restricted. |
| SVR_PORT | The port of the node that generates the ASH report. If this parameter is not specified or is set to NULL, the port is not restricted. |
| TENANT_ID | The tenant ID of the tenant that generates the ASH report. If this parameter is not specified or is set to NULL, the TENANT_ID is not restricted. |
Considerations
To obtain ASH information, query the oceanbase.GV$ACTIVE_SESSION_HISTORY view.
Examples
Enable server output.
obclient> SET SERVEROUTPUT ON;
Call the ASH_REPORT procedure and specify the start and end times for the diagnosis. After the procedure is executed, the ASH report is displayed on the interface.
obclient> CALL DBMS_WORKLOAD_REPOSITORY.ASH_REPORT(
TO_DATE('2023-12-18 21:19:00', 'yyyy-MM-dd HH24:mi:ss'),TO_DATE('2023-12-19 13:58:02', 'yyyy-MM-dd HH24:mi:ss') );
The following is a sample output:
# ASH Report
----
Sample Begin: 2023-12-18 21:19:00
Sample End: 2023-12-19 13:58:02
----------
Analysis Begin Time: 2023-12-19 06:03:27
Analysis End Time: 2023-12-19 13:58:01
Elapsed Time: 28474(secs)
Num of Sample: 1918
Num of Events: 1918
Average Active Sessions: 0.070
----
## Top User Events:
----------------------------------------------------------------+--------------------+---------+
Event| WAIT_CLASS| % Event|
----------------------------------------------------------------+--------------------+---------+
CPU + Wait for CPU| OTHER| 83.11%|
exec inner sql wait| OTHER| 11.05%|
palf write| SYSTEM_IO| 4.07%|
db file compact write| SYSTEM_IO| 0.42%|
sleep wait| IDLE| 0.36%|
slog flush condition wait| CONCURRENCY| 0.31%|
db file compact read| SYSTEM_IO| 0.21%|
latch: default bucket lock wait| CONCURRENCY| 0.21%|
async rpc proxy condition wait| CONCURRENCY| 0.16%|
dynamic thread pool condition wait| CONCURRENCY| 0.05%|
latch: ls meta lock wait| CONCURRENCY| 0.05%|
----------------------------------------------------------------+--------------------+---------+
## Top Events P1/P2/P3 Value:
----------------------------------------------------------------+----------+------------+--------------------------------------------------+--------------------+--------------------+--------------------+
Event| % Event| % Activity| Max P1/P2/P3| Parameter 1| Parameter 2| Parameter 3|
----------------------------------------------------------------+----------+------------+--------------------------------------------------+--------------------+--------------------+--------------------+
CPU + Wait for CPU| 83.11%| 83.107%| "0","0","0"| | | |
exec inner sql wait| 11.05%| 11.053%| "60001","3221748350","0"|wait inner sql class| inner session id| |
palf write| 4.07%| 4.067%| "306","67076096","8192"| fd| offset| size|
db file compact write| 0.42%| 0.417%| "4096","0","0"| fd| offset| size|
sleep wait| 0.36%| 0.365%| "5000000","0","0"| sleep_interval| | |
slog flush condition wait| 0.31%| 0.313%| "140637386012664","0","0"| address| | |
latch: default bucket lock wait| 0.21%| 0.209%| "140637510823440","1073744558","1"| address| number| tries|
db file compact read| 0.21%| 0.209%| "20480","0","0"| fd| offset| size|
async rpc proxy condition wait| 0.16%| 0.156%| "140634523769504","0","0"| address| | |
----------------------------------------------------------------+----------+------------+--------------------------------------------------+--------------------+--------------------+--------------------+
## Top Phase of Execution:
----------------------------------------+------------+--------------+----------------------------------------+
Phase of Execution| % Activity| Sample Count| Avg Active Sessions|
----------------------------------------+------------+--------------+----------------------------------------+
IN_SQL_EXECUTION| 5.944%| 114| 0.06|
IN_STORAGE_WRITE| 0.626%| 12| 0.01|
IN_STORAGE_READ| 0.313%| 6| 0.00|
IN_PLAN_CACHE| 0.209%| 4| 0.00|
IN_COMMITTING| 0.156%| 3| 0.00|
IN_SEQUENCE_LOAD| 0.104%| 2| 0.00|
IN_PARSE| 0.000%| 0| 0.00|
IN_PL_PARSE| 0.000%| 0| 0.00|
IN_SQL_OPTIMIZE| 0.000%| 0| 0.00|
IN_PX_EXECUTION| 0.000%| 0| 0.00|
IN_REMOTE_DAS_EXECUTION| 0.000%| 0| 0.00|
----------------------------------------+------------+--------------+----------------------------------------+
## Top SQL with Top Events
- All events included.
- Empty 'SQL Text' if it is PL/SQL query
----------------------------------------+------------+-------------------------+----------------------------------------------------------------+------------+------------------------------------------------------------+
SQL ID| PLAN ID| Sampled # of Executions| Event| % Event| SQL Text|
----------------------------------------+------------+-------------------------+----------------------------------------------------------------+------------+------------------------------------------------------------+
| 0| 1258| CPU + Wait for CPU| 65.59%| |
640C8A0B0E6F8741026B75810321BD44| 1658| 326| CPU + Wait for CPU| 17.00%| insert into "SYS"."TAB"("A") values(:0)|
| 0| 212| exec inner sql wait| 11.05%| |
| 0| 78| palf write| 4.07%| |
| 0| 8| db file compact write| 0.42%| |
| 0| 7| sleep wait| 0.36%| |
| 0| 6| slog flush condition wait| 0.31%| |
| 0| 4| db file compact read| 0.21%| |
D41D8CD98F00B204E9800998ECF8427E| 1658| 4| latch: default bucket lock wait| 0.21%| |
D41D8CD98F00B204E9800998ECF8427E| 304| 4| CPU + Wait for CPU| 0.21%| |
| 0| 3| async rpc proxy condition wait| 0.16%| |
710ABC06C2765FF592346DEE83A21318| 1666| 2| CPU + Wait for CPU| 0.10%| |
710ABC06C2765FF592346DEE83A21318| 1655| 1| CPU + Wait for CPU| 0.05%| |
| 0| 1| latch: ls meta lock wait| 0.05%| |
6D67D2ED377032BF2EBD4564491A521C| 1679| 1| CPU + Wait for CPU| 0.05%| select min("TOP_EVENT"."SAMPLE_TIME") AS "MIN(SAMPLE_TI|
| 0| 1| dynamic thread pool condition wait| 0.05%| |
710ABC06C2765FF592346DEE83A21318| 1664| 1| CPU + Wait for CPU| 0.05%| |
710ABC06C2765FF592346DEE83A21318| 1677| 1| CPU + Wait for CPU| 0.05%| delete from "SYS"."TAB"|
----------------------------------------+------------+-------------------------+----------------------------------------------------------------+------------+------------------------------------------------------------+
## Top SQL with Top Blocking Events
- Empty result if no event other than On CPU sampled
- Empty 'SQL Text' if it is PL/SQL query
----------------------------------------+------------+-------------------------+----------------------------------------------------------------+------------+------------------------------------------------------------+
SQL ID| PLAN ID| Sampled # of Executions| Event| % Event| SQL Text|
----------------------------------------+------------+-------------------------+----------------------------------------------------------------+------------+------------------------------------------------------------+
NULL| 0| 78| palf write| 4.07%| |
NULL| 0| 8| db file compact write| 0.42%| |
NULL| 0| 7| sleep wait| 0.36%| |
NULL| 0| 6| slog flush condition wait| 0.31%| |
D41D8CD98F00B204E9800998ECF8427E| 1658| 4| latch: default bucket lock wait| 0.21%| |
NULL| 0| 4| db file compact read| 0.21%| |
NULL| 0| 3| async rpc proxy condition wait| 0.16%| |
NULL| 0| 1| dynamic thread pool condition wait| 0.05%| |
NULL| 0| 1| latch: ls meta lock wait| 0.05%| |
----------------------------------------+------------+-------------------------+----------------------------------------------------------------+------------+------------------------------------------------------------+
## Complete List of SQL Text
SQL ID: 640C8A0B0E6F8741026B75810321BD44
PLAN ID: 1658
SQL Text: insert into "SYS"."TAB"("A") values(:0)
SQL ID: 710ABC06C2765FF592346DEE83A21318
PLAN ID: 1677
SQL Text: delete from "SYS"."TAB"
SQL ID: 6D67D2ED377032BF2EBD4564491A521C
PLAN ID: 1679
SQL Text: select min("TOP_EVENT"."SAMPLE_TIME") AS "MIN(SAMPLE_TIME)",max("TOP_EVENT"."SAMPLE_TIME") AS "MAX(SAMPLE_TIME)" from (select "UNIFIED_ASH"."SAMPLE_ID" AS "SAMPLE_ID","UNIFIED_ASH"."SAMPLE_TIME" AS "SAMPLE_TIME","UNIFIED_ASH"."SVR_IP" AS "SVR_IP","UNIFIED_ASH"."SVR_PORT" AS "SVR_PORT","UNIFIED_ASH"."CON_ID" AS "CON_ID","UNIFIED_ASH"."USER_ID" AS "USER_ID","UNIFIED_ASH"."SESSION_ID" AS "SESSION_ID","UNIFIED_ASH"."SESSION_TYPE" AS "SESSION_TYPE","UNIFIED_ASH"."SESSION_STATE" AS "SESSION_STATE","UNIFIED_ASH"."TOP_LEVEL_SQL_ID" AS "TOP_LEVEL_SQL_ID","UNIFIED_ASH"."SQL_ID" AS "SQL_ID","UNIFIED_ASH"."PLAN_ID" AS "PLAN_ID","UNIFIED_ASH"."TRACE_ID" AS "TRACE_ID","UNIFIED_ASH"."EVENT" AS "EVENT","UNIFIED_ASH"."EVENT_NO" AS "EVENT_NO","UNIFIED_ASH"."P1" AS "P1","UNIFIED_ASH"."P1TEXT" AS "P1TEXT","UNIFIED_ASH"."P2" AS "P2","UNIFIED_ASH"."P2TEXT" AS "P2TEXT","UNIFIED_ASH"."P3" AS "P3","UNIFIED_ASH"."P3TEXT" AS "P3TEXT","UNIFIED_ASH"."WAIT_CLASS" AS "WAIT_CLASS","UNIFIED_ASH"."WAIT_CLASS_ID" AS "WAIT_CLASS_ID","UNIFIED_ASH"."TIME_WAITED" AS "TIME_WAITED","UNIFIED_ASH"."SQL_PLAN_LINE_ID" AS "SQL_PLAN_LINE_ID","UNIFIED_ASH"."IN_PARSE" AS "IN_PARSE","UNIFIED_ASH"."IN_PL_PARSE" AS "IN_PL_PARSE","UNIFIED_ASH"."IN_PLAN_CACHE" AS "IN_PLAN_CACHE","UNIFIED_ASH"."IN_SQL_OPTIMIZE" AS "IN_SQL_OPTIMIZE","UNIFIED_ASH"."IN_SQL_EXECUTION" AS "IN_SQL_EXECUTION","UNIFIED_ASH"."IN_PX_EXECUTION" AS "IN_PX_EXECUTION","UNIFIED_ASH"."IN_SEQUENCE_LOAD" AS "IN_SEQUENCE_LOAD","UNIFIED_ASH"."IN_COMMITTING" AS "IN_COMMITTING","UNIFIED_ASH"."IN_STORAGE_READ" AS "IN_STORAGE_READ","UNIFIED_ASH"."IN_STORAGE_WRITE" AS "IN_STORAGE_WRITE","UNIFIED_ASH"."IN_REMOTE_DAS_EXECUTION" AS "IN_REMOTE_DAS_EXECUTION","UNIFIED_ASH"."IN_PLSQL_EXECUTION" AS "IN_PLSQL_EXECUTION","UNIFIED_ASH"."IN_PLSQL_COMPILATION" AS "IN_PLSQL_COMPILATION","UNIFIED_ASH"."PLSQL_ENTRY_OBJECT_ID" AS "PLSQL_ENTRY_OBJECT_ID","UNIFIED_ASH"."PLSQL_ENTRY_SUBPROGRAM_ID" AS "PLSQL_ENTRY_SUBPROGRAM_ID","UNIFIED_ASH"."PLSQL_ENTRY_SUBPROGRAM_NAME" AS "PLSQL_ENTRY_SUBPROGRAM_NAME","UNIFIED_ASH"."PLSQL_OBJECT_ID" AS "PLSQL_OBJECT_ID","UNIFIED_ASH"."PLSQL_SUBPROGRAM_ID" AS "PLSQL_SUBPROGRAM_ID","UNIFIED_ASH"."PLSQL_SUBPROGRAM_NAME" AS "PLSQL_SUBPROGRAM_NAME","UNIFIED_ASH"."MODULE" AS "MODULE","UNIFIED_ASH"."ACTION" AS "ACTION","UNIFIED_ASH"."CLIENT_ID" AS "CLIENT_ID" from (select "SYS"."A"."SAMPLE_ID" AS "SAMPLE_ID","SYS"."A"."SAMPLE_TIME" AS "SAMPLE_TIME","SYS"."A"."SVR_IP" AS "SVR_IP","SYS"."A"."SVR_PORT" AS "SVR_PORT","SYS"."A"."CON_ID" AS "CON_ID","SYS"."A"."USER_ID" AS "USER_ID","SYS"."A"."SESSION_ID" AS "SESSION_ID","SYS"."A"."SESSION_TYPE" AS "SESSION_TYPE","SYS"."A"."SESSION_STATE" AS "SESSION_STATE","SYS"."A"."TOP_LEVEL_SQL_ID" AS "TOP_LEVEL_SQL_ID","SYS"."A"."SQL_ID" AS "SQL_ID","SYS"."A"."PLAN_ID" AS "PLAN_ID","SYS"."A"."TRACE_ID" AS "TRACE_ID",NVL("SYS"."A"."EVENT",'CPU + Wait for CPU') AS "EVENT",NVL("SYS"."A"."EVENT_NO",1) AS "EVENT_NO","SYS"."A"."P1" AS "P1","SYS"."A"."P1TEXT" AS "P1TEXT","SYS"."A"."P2" AS "P2","SYS"."A"."P2TEXT" AS "P2TEXT","SYS"."A"."P3" AS "P3","SYS"."A"."P3TEXT" AS "P3TEXT",NVL("SYS"."A"."WAIT_CLASS",'CPU') AS "WAIT_CLASS",NVL("SYS"."A"."WAIT_CLASS_ID",9999) AS "WAIT_CLASS_ID","SYS"."A"."TIME_WAITED" AS "TIME_WAITED","SYS"."A"."SQL_PLAN_LINE_ID" AS "SQL_PLAN_LINE_ID","SYS"."A"."IN_PARSE" AS "IN_PARSE","SYS"."A"."IN_PL_PARSE" AS "IN_PL_PARSE","SYS"."A"."IN_PLAN_CACHE" AS "IN_PLAN_CACHE","SYS"."A"."IN_SQL_OPTIMIZE" AS "IN_SQL_OPTIMIZE","SYS"."A"."IN_SQL_EXECUTION" AS "IN_SQL_EXECUTION","SYS"."A"."IN_PX_EXECUTION" AS "IN_PX_EXECUTION","SYS"."A"."IN_SEQUENCE_LOAD" AS "IN_SEQUENCE_LOAD","SYS"."A"."IN_COMMITTING" AS "IN_COMMITTING","SYS"."A"."IN_STORAGE_READ" AS "IN_STORAGE_READ","SYS"."A"."IN_STORAGE_WRITE" AS "IN_STORAGE_WRITE","SYS"."A"."IN_REMOTE_DAS_EXECUTION" AS "IN_REMOTE_DAS_EXECUTION","SYS"."A"."IN_PLSQL_EXECUTION" AS "IN_PLSQL_EXECUTION","SYS"."A"."IN_PLSQL_COMPILATION" AS "IN_PLSQL_COMPILATION","SYS"."A"."PLSQL_ENTRY_OBJECT_ID" AS "PLSQL_ENTRY_OBJECT_ID","SYS"."A"."PLSQL_ENTRY_SU
## Top PL/SQL Procedures
-> 'PL/SQL entry subprogram' represents the application's top-level
entry-point(procedure, function, trigger, package initialization) into PL/SQL.
-> 'PL/SQL current subprogram' is the pl/sql subprogram being executed
at the point of sampling . If the value is 'SQL', it represents
the percentage of time spent executing SQL for the particular
plsql entry subprogram
-> 'PL/SQL entry subprogram' represents the application's top-level
------------------------------------------------------------+------------------------------------------------------------+--------------------+
PLSQL Entry Subprogram| PLSQL Current Subprogram| % Activity|
------------------------------------------------------------+------------------------------------------------------------+--------------------+
SYS.DBMS_WORKLOAD_REPOSITORY| --| 4.38%|
--| SYS.PKG2.P_PRO4| 2.35%|
--| SYS.PRO.P_PRO3| 0.36%|
--| SYS.PKG2.P_PRO4| 0.31%|
--| SYS.PRO| 0.31%|
SYS.PKG| --| 1.56%|
--| SYS.PKG.P_PRO4| 0.78%|
--| SYS.PKG.P_PRO4| 0.05%|
--| SYS.PRO| 0.05%|
--| SYS.PRO.P_PRO3| 0.05%|
--| SQL| 0.63%|
------------------------------------------------------------+------------------------------------------------------------+--------------------+
## Top Sessions:
- '# Samples Active' shows the number of ASH samples in which the session was found waiting for that particular event. The percentage shown in this column is calculated with respect to wall time.
--------------------+----------------------+----------------------------------------------------------------+------------+------------+--------------------+--------------------+
Sid| % Activity| Event| Event Count| % Event| User| # Samples Active|
--------------------+----------------------+----------------------------------------------------------------+------------+------------+--------------------+--------------------+
5136780886016| 29.09%| CPU + Wait for CPU| 558| 29.09%| | 558/28474[1.96%]|
3221678037| 15.69%| CPU + Wait for CPU| 301| 15.69%| SYS| 301/28474[1.06%]|
5098126180352| 4.85%| CPU + Wait for CPU| 93| 4.85%| | 93/28474[0.33%]|
5098126180352| 3.60%| exec inner sql wait| 69| 3.60%| | 69/28474[0.24%]|
4629974745088| 3.44%| CPU + Wait for CPU| 66| 3.44%| | 66/28474[0.23%]|
4621384810496| 2.97%| exec inner sql wait| 57| 2.97%| | 57/28474[0.20%]|
6047313952768| 2.97%| CPU + Wait for CPU| 57| 2.97%| | 57/28474[0.20%]|
6043018985472| 2.71%| CPU + Wait for CPU| 52| 2.71%| | 52/28474[0.18%]|
4561255268352| 2.45%| palf write| 47| 2.45%| | 47/28474[0.17%]|
4565550235648| 1.62%| palf write| 31| 1.62%| | 31/28474[0.11%]|
3221703527| 1.56%| CPU + Wait for CPU| 30| 1.56%| SYS| 30/28474[0.11%]|
5171140624384| 1.36%| CPU + Wait for CPU| 26| 1.36%| | 26/28474[0.09%]|
4677219385344| 1.25%| CPU + Wait for CPU| 24| 1.25%| | 24/28474[0.08%]|
4922032521216| 1.25%| CPU + Wait for CPU| 24| 1.25%| | 24/28474[0.08%]|
5102421147648| 1.15%| CPU + Wait for CPU| 22| 1.15%| | 22/28474[0.08%]|
4629974745088| 1.15%| exec inner sql wait| 22| 1.15%| | 22/28474[0.08%]|
4621384810496| 1.04%| CPU + Wait for CPU| 20| 1.04%| | 20/28474[0.07%]|
5016521801728| 0.99%| CPU + Wait for CPU| 19| 0.99%| | 19/28474[0.07%]|
4608499908608| 0.94%| CPU + Wait for CPU| 18| 0.94%| | 18/28474[0.06%]|
--------------------+----------------------+----------------------------------------------------------------+------------+------------+--------------------+--------------------+
## Top Blocking Sessions:
- Blocking session activity percentages are calculated with respect to waits on latches and locks only.
- '# Samples Active' shows the number of ASH samples in which the blocking session was found active.
--------------------+----------------------+----------------------------------------+------------+------------+--------------------+--------------------+
Blocking Sid| % Activity| Event Caused| Event Count| % Event| User| # Samples Active|
--------------------+----------------------+----------------------------------------+------------+------------+--------------------+--------------------+
4561255268352| 2.45%| palf write| 47| 2.45%| | 47/28474[0.17%]|
4565550235648| 1.62%| palf write| 31| 1.62%| | 31/28474[0.11%]|
4960687226880| 0.42%| db file compact write| 8| 0.42%| | 8/28474[0.03%]|
4621384810496| 0.31%| slog flush condition wait| 6| 0.31%| | 6/28474[0.02%]|
5115306049536| 0.26%| sleep wait| 5| 0.26%| | 5/28474[0.02%]|
3221678037| 0.21%| latch: default bucket lock wait| 4| 0.21%| SYS| 4/28474[0.01%]|
4608499908608| 0.16%| async rpc proxy condition wait| 3| 0.16%| | 3/28474[0.01%]|
4896262717440| 0.05%| db file compact read| 1| 0.05%| | 1/28474[0.00%]|
4788888535040| 0.05%| db file compact read| 1| 0.05%| | 1/28474[0.00%]|
4814658338816| 0.05%| db file compact read| 1| 0.05%| | 1/28474[0.00%]|
5025111736320| 0.05%| db file compact read| 1| 0.05%| | 1/28474[0.00%]|
4707284156416| 0.05%| sleep wait| 1| 0.05%| | 1/28474[0.00%]|
4685809319936| 0.05%| dynamic thread pool condition wait| 1| 0.05%| | 1/28474[0.00%]|
5098126180352| 0.05%| latch: ls meta lock wait| 1| 0.05%| | 1/28474[0.00%]|
4715874091008| 0.05%| sleep wait| 1| 0.05%| | 1/28474[0.00%]|
--------------------+----------------------+----------------------------------------+------------+------------+--------------------+--------------------+
## Top latches:
----------------------------------------------------------------+--------------------+--------------------+
Latch| Sampled Count| % Activity|
----------------------------------------------------------------+--------------------+--------------------+
latch: default bucket lock wait| 4| 0.21%|
latch: ls meta lock wait| 1| 0.05%|
----------------------------------------------------------------+--------------------+--------------------+
## Node Load:
----------------------------------------+--------------------+--------------------+--------------------+------------------------------+
SVR IP| SVR PORT| Sampled Count| Idle Wait Count| Load|
----------------------------------------+--------------------+--------------------+--------------------+------------------------------+
172.xx.xx.xx| 2882| 1918| 7| 0.07|
----------------------------------------+--------------------+--------------------+--------------------+------------------------------+
Execute the following command to display the report in the HTML format.
obclient [SYS]> CALL DBMS_WORKLOAD_REPOSITORY.ASH_REPORT(TO_DATE('2024-02-22 19:26:47', 'YYYY-MM-DD HH24:MI:SS'), TO_DATE('2024-06-22 19:27:07', 'YYYY-MM-DD HH24:MI:SS'), REPORT_TYPE=> 'TEXT');
The following is a sample output:
<!DOCTYPE html><html lang="en"><head><title>ASH Report</title> <style type="text/css"> body.ash_html {font:bold 10pt Arial,Helvetica,Geneva,sans-serif;color:black; background:rgb(246, 248, 251);} pre.ash_html {font:8pt Courier;color:black; background:rgb(246, 248, 251);} pre_sqltext.ash_html {white-space: pre-wrap;} h1.ash_html {font:bold 20pt Arial,Helvetica,Geneva,sans-serif;color:#336699;background-color:rgb(246, 248, 251);border-bottom:1px solid #cccc99;margin-top:0pt; margin-bottom:0pt;padding:0px 0px 0px 0px;} h2.ash_html {font:bold 18pt Arial,Helvetica,Geneva,sans-serif;color:#336699;background-color:rgb(246, 248, 251);margin-top:4pt; margin-bottom:0pt;} h3.ash_html {font:bold 16pt Arial,Helvetica,Geneva,sans-serif;color:#336699;background-color:rgb(246, 248, 251);margin-top:4pt; margin-bottom:0pt;} li.ash_html {font: 8pt Arial,Helvetica,Geneva,sans-serif; color:black; background:rgb(246, 248, 251);} th.ash_htmlnobg {font:bold 8pt Arial,Helvetica,Geneva,sans-serif; color:black; background:rgb(246, 248, 251);padding-left:4px; padding-right:4px;padding-bottom:2px} th.ash_htmlbg {font:bold 8pt Arial,Helvetica,Geneva,sans-serif; color:White; background:#0066CC;padding-left:4px; padding-right:4px;padding-bottom:2px} td.ash_htmlnc {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:rgb(246, 248, 251);vertical-align:top;} td.ash_htmlc {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:#FFFFCC; vertical-align:top;} td.ash_htmlnclb {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:rgb(246, 248, 251);vertical-align:top;border-left: thin solid black;} td.ash_htmlncbb {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:rgb(246, 248, 251);vertical-align:top;border-left: thin solid black;border-right: thin solid black;} td.ash_htmlncrb {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:rgb(246, 248, 251);vertical-align:top;border-right: thin solid black;} td.ash_htmlcrb {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:#FFFFCC; vertical-align:top;border-right: thin solid black;} td.ash_htmlclb {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:#FFFFCC; vertical-align:top;border-left: thin solid black;} td.ash_htmlcbb {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:#FFFFCC; vertical-align:top;border-left: thin solid black;border-right: thin solid black;} a.ash_html {font:bold 8pt Arial,Helvetica,sans-serif;color:#663300; vertical-align:top;margin-top:0pt; margin-bottom:0pt;} td.ash_htmlnct {font:8pt Arial,Helvetica,Geneva,sans-serif;border-top: thin solid black;color:black;background:rgb(246, 248, 251);vertical-align:top;} td.ash_htmlct {font:8pt Arial,Helvetica,Geneva,sans-serif;border-top: thin solid black;color:black;background:#FFFFCC; vertical-align:top;} td.ash_htmlnclbt {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:rgb(246, 248, 251);vertical-align:top;border-top: thin solid black;border-left: thin solid black;} td.ash_htmlncbbt {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:rgb(246, 248, 251);vertical-align:top;border-left: thin solid black;border-right: thin solid black;border-top: thin solid black;} td.ash_htmlncrbt {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:rgb(246, 248, 251);vertical-align:top;border-top: thin solid black;border-right: thin solid black;} td.ash_htmlcrbt {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:#FFFFCC; vertical-align:top;border-top: thin solid black;border-right: thin solid black;} td.ash_htmlclbt {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:#FFFFCC; vertical-align:top;border-top: thin solid black;border-left: thin solid black;} td.ash_htmlcbbt {font:8pt Arial,Helvetica,Geneva,sans-serif;color:black;background:#FFFFCC; vertical-align:top;border-top: thin solid black;border-left: thin solid black;border-right: thin solid black;} table.tdiff { border_collapse: collapse; } table.tscl {width: 600;} table.tscl tbody, table.tscl thead { display: block; } table.tscl thead tr th {height: 12px;line-height: 12px;} table.tscl tbody { height: 100px;overflow-y: auto; overflow-x: hidden;} table.tscl tbody td, thead th {width: 200;} .hidden {position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden;} .pad {margin-left:17px;} .doublepad {margin-left:34px;} </style></head>
<script> function setSectionList() { var list = document.getElementById(110); const section_headers = document.querySelectorAll('h2'); section_headers.forEach(ele => { let str = ele.innerText.replaceAll('<br>',''); let li = document.createElement('li'); let a = document.createElement('a'); a.classList.add('ash_html'); a.setAttribute('href', str); a.innerText = str; li.innerHTML = '<a class = "ash_html" href = "#' + str + '">' + str + '</a>'; li.classList.add('ash_html'); list.appendChild(li); }); } document.addEventListener('DOMContentLoaded', setSectionList); </script> <body class="ash_html"> <h1 class="ash_html"> ASH Report </h1><pre class="ash_html"> Cluster Name: test424
Observer Version: OceanBase 4.3.5.0 (200000022024120314-20891f1ab3a746b2f79b9729d0f4ef5b8ed2b9c3)
Operation System Info: Linux(3.10.0-327.ali2019.alios7.x86_64)_x86_64
User Input Begin Time: 2024-02-2219:26:47
User Input End Time: 2024-06-2219:27:07
Analysis Begin Time: 2024-06-1522:25:50
Analysis End Time: 2024-06-1711:21:55
Elapsed Time: 132964
Num of Sample: 8982
Num of Events: 8982
Average Active Sessions: 0.07
</pre><ul id=110></ul><a class="ash_html" name='Top Active Tenants'></a> <h2 class="ash_html">Top Active Tenants<br></h2><ul><li class='ash_html'>this section lists top active tenant information</li>
<li class='ash_html'>Total Count: num of records during ash report analysis time period</li>
<li class='ash_html'>Wait Event Count: num of records when session is on wait event</li>
<li class='ash_html'>On CPU Count: num of records when session is on cpu</li>
<li class='ash_html'>Avg Active Sessions: average active sessions during ash report analysis time period</li>
<li class='ash_html'>% Activity: activity(cpu + wait) percentage for given tenant</li>
</ul>