Auto Kill Sessions
You can kill all sessions, kill specific sessions by criteria, and view history.
To kill the current session or manually kill a session, see Real-Time Sessions.
Functions
|
Function |
Description |
|---|---|
|
Killing Specific Sessions by Criteria |
You can add a task for killing sessions. Sessions that meet the criteria will be killed. |
|
Killing All Sessions |
After you enable Auto Kill Sessions and click Kill All Sessions, all sessions are automatically deleted. |
|
Viewing history |
You can view killed sessions. |
Killing Specific Sessions by Criteria
- Log in to the console.
- Click
in the upper left corner and select a region and project. - Click
in the upper left corner, and under Databases, click Data Admin Service. - In the navigation pane, choose Intelligent O&M > Instance List.
Alternatively, on the Overview page, click Go to Intelligent O&M.
- In the upper right corner of the Instance List page, search for instances by engine type, instance name, or instance IP.
- Locate the target instance and click Details. The Dashboard page is displayed.
- On the SQL tab, click Sessions Auto Killed.
- Click
on the right of Auto Kill Sessions. In the displayed dialog box, click OK. - Click Add Kill Task.
Figure 1 Adding a task for killing sessions
- In the displayed dialog box, set the criteria for killing sessions. The parameters listed in Table 1 are in a logical AND relationship.
If you only specify Session Duration (s) and Task Duration (s), all sessions that meet the criteria will be killed.
A maximum of five conditional kill tasks can be executed at the same time.
Figure 2 Setting the criteria for killing sessions
Table 1 Parameter description Parameter
Description
User
Enter a single value, for example, root.
Host IP Address
Enter a single value, for example, 168.192.0.0.
Database Name
Enter a database name.
Command
Enter a command.
SQL Statement
Enter an SQL statement.
Session Duration (s)
The value ranges from 1 to 2147483647.
Task Closure Method
If you select Scheduled, you need to set Task Duration. After the duration ends, the task is automatically closed.
If you select Manual, you can click Stop in the Operation column of the task list to manually close a task.
Task Duration (s)
The value ranges from 10 to 31535999.
- Click OK.
When the criteria for killing sessions are met, the system automatically kills the sessions.
Killing All Sessions
- Log in to the console.
- Click
in the upper left corner and select a region and project. - Click
in the upper left corner, and under Databases, click Data Admin Service. - In the navigation pane, choose Intelligent O&M > Instance List.
Alternatively, on the Overview page, click Go to Intelligent O&M.
- In the upper right corner of the Instance List page, search for instances by engine type, instance name, or instance IP.
- Locate the target instance and click Details. The Dashboard page is displayed.
- On the SQL tab, click Sessions Auto Killed.
- Click
on the right of Auto Kill Sessions. In the displayed dialog box, click OK. - Click Kill All Sessions.
Figure 3 Killing All Sessions
- In the displayed dialog box, click OK.
Viewing killed sessions
- Log in to the console.
- Click
in the upper left corner and select a region and project. - Click
in the upper left corner, and under Databases, click Data Admin Service. - In the navigation pane, choose Intelligent O&M > Instance List.
Alternatively, on the Overview page, click Go to Intelligent O&M.
- In the upper right corner of the Instance List page, search for instances by engine type, instance name, or instance IP.
- Locate the target instance and click Details. The Dashboard page is displayed.
- On the SQL tab, click Sessions Auto Killed.
- Click
on the right of Auto Kill Sessions. In the displayed dialog box, click OK. - Click View History.
Figure 4 Killed sessions
- In the displayed dialog box, select a time range to view killed sessions within that period.
A maximum of 500 session records can be displayed.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot