Get server stat
GetStatsByServer¶
Description:
Returns a list of server performance metrics over a specified time range.
Access Control¶
🛡️ Access Level Required:
SESSION_MANAGER,SESSION_ADMIN,SESSION_DEALER
Access Scope¶
The server resolves the manager from the current staff cache and requires admin scope or access_backoffice. Token payload is used only to resolve the manager id and session type.
Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
| from | int | âś… | Start timestamp (UNIX) |
| to | int | âś… | End timestamp (UNIX) |
Response¶
A response contains:
structure: ordered list of metric field namesrows: ordered metric snapshots for the requested interval plus one live snapshot row appended at the endinfo: current server state summary
rows / structure fields¶
| Field | Type | Description |
|---|---|---|
| connections | int | Number of active connections counted during the sampling window |
| requests | int | Number of handled requests counted during the sampling window |
| cpu_load_pct | float | Total CPU usage in percent |
| disk_load_pct | float | Filesystem usage in percent for / |
| net_pck_in | float | Incoming packets per second on the monitored network interface |
| net_pck_out | float | Outgoing packets per second on the monitored network interface |
| ram_load_pct | float | RAM usage in percent |
| time | int | UNIX timestamp of the metric snapshot |
| cpu_irq_pct | float | CPU time spent in IRQ handlers in percent |
| cpu_softirq_pct | float | CPU time spent in soft IRQ handlers in percent |
| net_bytes_in | float | Incoming bytes per second on the monitored network interface |
| net_bytes_out | float | Outgoing bytes per second on the monitored network interface |
| disk_read_mbps | float | Disk read throughput in MB/s for the first detected block device |
| disk_write_mbps | float | Disk write throughput in MB/s for the first detected block device |
| sockets_total | int | Total observed TCP sockets |
| sockets_waiting | int | TCP sockets currently waiting in SYN states |
info fields¶
| Field | Type | Description |
|---|---|---|
| os | string | Operating system pretty name |
| cpu_name | string | CPU model name |
| cpu_cores | int | Number of CPU cores |
| cpu_load_pct | float | Current CPU usage in percent |
| ram_free_mb | int | Currently available RAM in MB |
| ram_total_mb | int | Total RAM in MB |
| ram_largest_mb | int | Largest free contiguous RAM block in MB |
| disk_free_mb | int | Free disk space in MB for / |
| disk_total_mb | int | Total disk space in MB for / |
| disk_read_mbps | float | Current disk read throughput in MB/s |
| disk_write_mbps | float | Current disk write throughput in MB/s |
| net_iface | string | Monitored network interface name |
| net_bytes_in | float | Current incoming bytes per second |
| net_bytes_out | float | Current outgoing bytes per second |
| net_pck_in | float | Current incoming packets per second |
| net_pck_out | float | Current outgoing packets per second |
| sockets_total | int | Current total TCP sockets |
| sockets_waiting | int | Current TCP sockets in waiting/SYN states |
Example Response¶
{
"structure": [
"connections",
"requests",
"cpu_load_pct",
"disk_load_pct",
"net_pck_in",
"net_pck_out",
"ram_load_pct",
"time",
"cpu_irq_pct",
"cpu_softirq_pct",
"net_bytes_in",
"net_bytes_out",
"disk_read_mbps",
"disk_write_mbps",
"sockets_total",
"sockets_waiting"
],
"rows": [
[123, 4567, 23.5, 14.8, 120.0, 115.0, 67.1, 1712345678, 0.3, 0.8, 1048576.0, 943718.0, 12.4, 3.1, 842, 4]
],
"info": {
"os": "Ubuntu 24.04 LTS",
"cpu_name": "Intel(R) Xeon(R) CPU",
"cpu_cores": 8,
"cpu_load_pct": 21.2,
"ram_free_mb": 6144,
"ram_total_mb": 16384,
"ram_largest_mb": 512,
"disk_free_mb": 102400,
"disk_total_mb": 204800,
"disk_read_mbps": 12.4,
"disk_write_mbps": 3.1,
"net_iface": "eth0",
"net_bytes_in": 1048576.0,
"net_bytes_out": 943718.0,
"net_pck_in": 120.0,
"net_pck_out": 115.0,
"sockets_total": 842,
"sockets_waiting": 4
}
}
Errors¶
| Code | Description |
|---|---|
| 400 | Invalid request data |
| 500 | Internal server error |