- python = ">=3.13"
pip3 install resource-api-monitorYou can also download the .whl package and install from there.
Run:
monitor-serverThen just curl to endpoint:8000/cpu or endpoint:8000/memory.
| Endpoint | Method | Description |
|---|---|---|
/memory |
GET | Returns RAM usage and swap statistics. |
/cpu |
GET | Returns average CPU usage (0.3s duration between samples). |
{ "total_cpu_usage": 0.15, "usage_per_cpu": [0.12, 0.18, 0.14, 0.16] }