Skip to content

获取 MySQL 运行状态变量(SHOW GLOBAL STATUS)

获取 MySQL 服务器的运行状态变量(SHOW GLOBAL STATUS 结果)。

POST
https://your-panel.example.com:8888/database
更新于 查看 Markdown

Request bodyX-WWW-FORM-URLENCODEDrequired

  • request_timestringrequired

    Unix 时间戳。

  • request_tokenstringrequired

    按 API 概览生成的签名。

  • actionGetRunStatusrequired

    具体操作名称。

Returns

default

接口响应,业务状态见下方详细说明。

各操作详细说明

GetRunStatusaction=GetRunStatus获取 MySQL 运行状态变量(SHOW GLOBAL STATUS)

获取 MySQL 服务器的运行状态变量(SHOW GLOBAL STATUS 结果)。

  • 路由:POST /database
  • action:GetRunStatus

输入参数

参数名称 必选 类型 描述
action 是 String 固定值 GetRunStatus

输出参数

返回 MySQL 状态变量键值对,包含连接数、查询数、流量等数百个指标。

常见参数 描述
Connections 总连接次数
Uptime MySQL 运行时间(秒)
Bytes_received/sent 收发字节数
Com_select/insert/update/delete CRUD 操作计数
Slow_queries 慢查询数
Threads_connected 当前连接数

示例

{
    "Aborted_clients": "33",
    "Bytes_received": "17167",
    "Bytes_sent": "39463",
    "Connections": "50",
    "Uptime": "3600",
    "Threads_connected": "2"
}
Navigation

Type to search…

↑↓ navigate↵ selectEsc close