GetSystemTotal
获取系统统计信息,包含内存、CPU、运行时间、系统版本等综合数据。
- 路由:
POST /system - action:
GetSystemTotal
输入参数
除公共参数外无需额外参数。
| 参数名称 | 必选 | 类型 | 描述 |
|---|---|---|---|
| action | 是 | String | 固定值 GetSystemTotal |
输出参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| memTotal | Integer | 总内存(MB) |
| memFree | Integer | 空闲内存(MB) |
| memBuffers | Integer | 缓冲区内存(MB) |
| memCached | Integer | 缓存内存(MB) |
| memAvailable | Integer | 可用内存(MB) |
| memRealUsed | Integer | 实际已用内存(MB),不含 buffer/cache |
| cpuNum | Integer | CPU 逻辑核心数 |
| cpuRealUsed | Float | CPU 实时使用率(%) |
| time | String | 系统已运行时间,如 10天、5小时、30分钟 |
| system | String | 操作系统版本,如 Debian GNU/Linux 13 x86_64(Py3.7.16) |
| isuser | Integer | 是否存在 admin 用户,1 为存在 |
| isport | Boolean | 面板端口是否为默认 8888 |
| version | String | 面板版本号,如 11.7.0 |
示例
请求
POST /system HTTP/1.1
Host: 192.168.168.213:8888
Content-Type: application/x-www-form-urlencoded
request_time=1700000000&request_token=xxx&action=GetSystemTotal
响应
{
"memTotal": 3901,
"memFree": 2918,
"memBuffers": 22,
"memCached": 338,
"memAvailable": 3056,
"memRealUsed": 623,
"cpuNum": 2,
"cpuRealUsed": 12.5,
"time": "0分钟",
"system": "Debian GNU/Linux 13 x86_64(Py3.7.16)",
"isuser": 1,
"isport": false,
"version": "11.7.0"
}