Path: API › 系统管理

`POST /system`

获取实时网络流量及综合系统数据（CPU、内存、负载、磁盘、IO）。

## Request body

_Required._

- `action345.request_time` (string, required) — Unix 时间戳。
- `action345.request_token` (string, required) — 按 API 概览生成的签名。
- `action345.action` (string, required) — 具体操作名称。
  - one of `"GetNetWork"`

## Example request

```text
{
  "request_time": "string",
  "request_token": "string",
  "action": "GetNetWork"
}
```

## Code samples

### cURL（填写面板地址与签名）

```curl
curl --request POST \
  --url "https://your-panel.example.com:8888/system" \
  --header "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "request_time=<Unix时间戳>" \
  --data-urlencode "request_token=<按 API 概览生成的签名>" \
  --data-urlencode "action=GetNetWork"
```

## Responses

### default

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

#### Example

```json
{
  "network": {},
  "upTotal": 0,
  "downTotal": 0,
  "up": 0,
  "down": 0,
  "cpu": [
    null
  ],
  "load": {},
  "mem": {},
  "disk": [
    null
  ],
  "iostat": {},
  "time": "string",
  "system": "string",
  "site_total": 0,
  "ftp_total": 0,
  "database_total": 0
}
```

- `action345.response.default.network` (object, optional) — 各网卡流量，key 为网卡名，值为 `{upTotal, downTotal, up, down, upPackets, downPackets}`
- `action345.response.default.upTotal` (integer, optional) — 总上传字节数
- `action345.response.default.downTotal` (integer, optional) — 总下载字节数
- `action345.response.default.up` (number, optional) — 当前上传速率（KB/s）
- `action345.response.default.down` (number, optional) — 当前下载速率（KB/s）
- `action345.response.default.cpu` (array<unknown>, optional) — CPU 信息
- `action345.response.default.load` (object, optional) — 负载信息
- `action345.response.default.mem` (object, optional) — 内存信息
- `action345.response.default.disk` (array<unknown>, optional) — 磁盘信息
- `action345.response.default.iostat` (object, optional) — 磁盘 IO 统计
- `action345.response.default.time` (string, optional) — 系统运行时间
- `action345.response.default.system` (string, optional) — 操作系统版本
- `action345.response.default.site_total` (integer, optional) — 网站数量
- `action345.response.default.ftp_total` (integer, optional) — FTP 用户数量
- `action345.response.default.database_total` (integer, optional) — 数据库数量


## GetNetWork

## GetNetWork / GetNetWorkApi

获取实时网络流量及综合系统数据（CPU、内存、负载、磁盘、IO）。

- **路由**：`POST /system`
- **action**：`GetNetWork` 或 `GetNetWorkApi`（两者行为相同）

## 输入参数

| 参数名称 | 必选 | 类型 | 描述 |
|----------|------|------|------|
| action | 是 | String | `GetNetWork` 或 `GetNetWorkApi` |

## 输出参数

| 参数名称 | 类型 | 描述 |
|----------|------|------|
| network | Object | 各网卡流量，key 为网卡名，值为 `{upTotal, downTotal, up, down, upPackets, downPackets}` |
| upTotal | Integer | 总上传字节数 |
| downTotal | Integer | 总下载字节数 |
| up | Float | 当前上传速率（KB/s） |
| down | Float | 当前下载速率（KB/s） |
| cpu | Array | CPU 信息 |
| load | Object | 负载信息 |
| mem | Object | 内存信息 |
| disk | Array | 磁盘信息 |
| iostat | Object | 磁盘 IO 统计 |
| time | String | 系统运行时间 |
| system | String | 操作系统版本 |
| site_total | Integer | 网站数量 |
| ftp_total | Integer | FTP 用户数量 |
| database_total | Integer | 数据库数量 |

## 示例

### 响应

```json
{
    "network": {"eth0": {"upTotal": 1000000, "downTotal": 5000000, "up": 10.5, "down": 50.2}},
    "upTotal": 1000000,
    "downTotal": 5000000,
    "up": 10.5,
    "down": 50.2,
    "cpu": [12.5, 2, [15.0, 10.0], "Intel...", 1, 1],
    "load": {"one": 0.15, "five": 0.08, "fifteen": 0.02},
    "mem": {"memTotal": 3901, "memFree": 2918, "memRealUsed": 623},
    "disk": [...],
    "site_total": 1,
    "ftp_total": 0,
    "database_total": 1
}
```

