Alpha
Endpoints

Usage Data

Get dynamic system usage metrics.

The /api/usage endpoint returns real-time usage data that changes frequently, such as CPU load, memory usage, and temperatures.

Prefer Real-Time APIs

For real-time data, we recommend using WebSocket or SSE Stream instead of polling this endpoint. Both push updates to you automatically and are more efficient.

Endpoints

Get Usage Data

Returns real-time usage data that changes frequently, such as CPU load, memory usage, and temperatures.

GET /api/usage

Response:

{
  "uptime": 86400,
  "cpu": {
    "current_load": 12.5,
    "current_speed": 5.2
  },
  "memory": {
    "used": 12456789012,
    "free": 21811522540,
    "used_percent": 36.35
  }
  // ... gpu, disks
}

Field Reference

Root Object

FieldTypeDescription
uptimeintSystem uptime in seconds.
cpuobjectCurrent CPU usage metrics.
memoryobjectCurrent memory usage.
gpuobjectCurrent GPU usage (null if not detected).
disksarrayCurrent disk usage for each drive.

CPU Object

FieldTypeDescription
current_loadfloatCurrent CPU usage percentage.
current_speedfloatCurrent clock speed in GHz.

Memory Object

FieldTypeDescription
usedintUsed RAM in bytes.
freeintFree RAM in bytes.
used_percentfloatUsage as a percentage.

GPU Object

FieldTypeDescription
current_loadintGPU usage percentage.
current_tempintGPU temperature in °C.
current_memoryintVRAM usage in MB.

Disk Object

FieldTypeDescription
fsstringFilesystem identifier.
usedintUsed space in bytes.
availableintAvailable space in bytes.
used_percentfloatUsage as a percentage.

Polling Recommendation

For dashboards, poll this endpoint every 2-5 seconds. More frequent polling provides smoother updates but increases network traffic.

Example Usage Scenarios

1. Minimalistic Stat Bar

Build a tiny status bar for your second monitor.

  1. Poll /api/usage every 5 seconds.
  2. Display simple bars for cpu.current_load and memory.used_percent.

2. High Load Alert

Notify yourself if the server is struggling.

  1. Monitor /api/usage.
  2. If cpu.current_load > 90% for 1 minute:
  3. Send a push notification to your phone.

On this page