Get load statistics

Get server utilization reports generated by SAR

  • HTTP Method: GET
  • URL: https://example.domain.tld/api/v1/server/load/<report>/
  • Require authentication: Yes
  • Permission level required: MasterAdmin

Path parameters

Parameter Type Description Required
report str load_avg, cpu, memory, or disk Required

Response

HTTP 200. Requested report (for current day) as UTF-8 encoded text, text/html mimetype.

Example request (Python)

import requests
import json
from pprint import pprint

url = "https://example.domain.tld/api/v1/server/load/load_avg/"
r = requests.get(url, auth=("admin","long-auth_token-here"))
try:
    pprint(r.json())
except:
    print(r.text)

Example response (text)

Linux 4.19.0-8-cloud-amd64 (mail3.mymailcheap.com)     03/11/2020      _x86_64_        (2 CPU)

12:00:01 AM   runq-sz  plist-sz   ldavg-1   ldavg-5  ldavg-15   blocked
12:05:01 AM         1       224      0.00      0.00      0.00         0
12:15:01 AM         1       221      0.01      0.01      0.00         0
12:25:01 AM         2       223      0.00      0.00      0.00         0
12:35:01 AM         1       222      0.03      0.01      0.00         0
12:45:01 AM         1       232      0.00      0.01      0.00         0
12:55:01 AM         3       221      0.13      0.08      0.03         0
01:05:01 AM         2       224      0.02      0.07      0.05         1
01:15:01 AM         1       226      0.06      0.03      0.01         0
01:25:01 AM         1       229      0.00      0.00      0.00         0
01:35:01 AM         3       228      0.02      0.01      0.00         0
01:45:01 AM         1       226      0.05      0.01      0.00         0
01:55:01 AM         1       228      0.00      0.03      0.00         0
02:05:01 AM         1       224      0.04      0.02      0.00         0
02:15:02 AM         1       230      0.05      0.01      0.00         0
02:25:01 AM         1       224      0.00      0.00      0.00         0
02:35:01 AM         1       222      0.27      0.11      0.03         0
02:45:01 AM         1       236      0.05      0.12      0.06         0
02:55:01 AM         1       226      0.00      0.03      0.03         0
03:05:01 AM         1       222      0.00      0.00      0.00         0
03:15:01 AM         1       229      0.07      0.03      0.00         0
03:25:01 AM         1       225      0.01      0.02      0.00         0
03:35:01 AM         3       226      0.01      0.00      0.00         0
03:45:01 AM         4       225      0.00      0.00      0.00         0
03:55:01 AM         3       230      0.01      0.03      0.00         0
04:05:01 AM         2       225      0.04      0.05      0.00         0
04:15:01 AM         1       226      0.00      0.01      0.00         0
04:25:01 AM         1       231      0.03      0.04      0.01         0
04:35:01 AM         2       224      0.06      0.06      0.01         0
Average:            2       226      0.03      0.03      0.01         0