GetRunStatus
获取 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"
}