The Active Session History (ASH) diagnostic report is used to analyze session activity distribution within a specified time window, pinpointing the exact timing of performance bottlenecks and waiting events.
OAgent supports two usage methods: online, where you request a report generation and interpretation from OAS; or upload an existing ASH report (such as HTML or text exported from OAS or OCP) for interpretation by the Agent.
When to use
The database experiences performance jitter at a certain point in time, and you need to confirm the composition of the waiting events at that time.
You need to identify the SQL statements and sessions that consume the most DB Time over a period.
After detecting anomalies during an inspection or alert analysis, you need more granular evidence of active sessions.
Prerequisites
Online generation mode: You have configured an OAS connection for the product to which the target cluster belongs, and the ASH report is generated by OAS.
Upload and analysis mode: No real-time connection is required; only an exported ASH report (HTML or text) is needed. For details, see Upload an attachment.
Procedure
Type
@in the session to select the target cluster and tenant.Specify the time range and describe your request, for example:
Generate an ASH report for me from 10:00 to 10:30 today.Press Enter to send it, and wait for the Agent to complete the analysis.
The Agent triggers an ASH report generation task and polls the task status. The report content is automatically obtained after the task is completed.
Note
ASH reports are generated asynchronously. A larger time range results in longer generation time. The dialog interface continuously displays the task status during the wait period; no repeated inquiries are needed.
View the report summary.
The Agent provides a summary interpretation of key waiting events, high-frequency SQL, and active session distribution in the report, and suggests the next troubleshooting direction.
Analyze an existing ASH report (Upload)
This method applies when real-time connection to the target environment is inconvenient, or when an ASH report has already been exported from other sources, such as an appendix to an inspection report or historical ASH reports from another cluster.
Use the attachment feature in the session to upload the ASH report file (supports HTML or plain text). For details, see Upload an attachment.
Describe the request, for example:
Interpret this ASH report to identify CPU and I/O bottlenecks. What are the top wait events in this report and which SQL statements do they correspond to?Press Enter to send the request and wait for the Agent to interpret it.
The Agent extracts key information from the uploaded content, such as sampling overview, top wait events, top SQL statements, and session distribution, and outputs a conclusion structure consistent with the online mode.
Note
The uploaded report content is parsed offline by the Agent without reconnecting to the database. If you need to further drill down on specific objects mentioned in the report, it is recommended to switch to the online session of the corresponding cluster.
Usage suggestions
It is recommended to set the time range within 30 minutes and cover the moment when the issue occurred.
If the report indicates that bottlenecks are concentrated on a few SQL statements, you can continue to drill down for analysis. For details, see Slow SQL, TopSQL, and Abnormal SQL Analysis.