Usage Metrics
Live and historical CPU, memory, disk, and network usage per sandbox.
Daytona measures every sandbox's resource consumption from outside the sandbox. Because sandboxes are hardware-isolated microVMs, the platform can observe CPU, memory, disk, and network usage from the host side, sampled roughly once per second — no agent runs inside your sandbox, so metrics collection adds zero overhead to your workload and can't be tampered with by anything running in it.
Three surfaces cover the common questions: a live endpoint for "what is this sandbox doing right now", a history endpoint for "what has it been doing over time", and a project report for "what is all of this costing me".
Live usage
GET /vms/:id/usage returns the sandbox's current resource usage — CPU, memory, disk, and network — as observed by the host. Use it for spot checks and for dashboards that watch a specific sandbox in real time.
The response wraps the live sample in a document with "source": "live". The sandbox must be running and placed; a sandbox with no compute (stopped, paused) has no live usage to report.
Usage history
GET /vms/:id/usage/history returns a time series of the same measurements, so you can see how a workload behaved over minutes or days — where the CPU spikes were, how memory grew, how much I/O a job did.
Query parameters:
| Parameter | Meaning | Default |
|---|---|---|
from | RFC3339 start of the window (inclusive) | to − 24h |
to | RFC3339 end of the window (exclusive) | now |
resolution | m (minute buckets) or h (hourly rollups) | m |
Each period in the response carries start, duration_ms, and integrals/gauges for the bucket: cpu_core_s (CPU core-seconds consumed), mem_byte_s, mem_rss_peak, disk_used, io_r_bytes, io_w_bytes, net_rx_bytes, and net_tx_bytes. To turn an integral into an average rate, divide by the bucket's duration — for example, average cores used = cpu_core_s / (duration_ms / 1000).
Project-level reporting
GET /usage/report aggregates usage across all sandboxes in your project over a time window, at hourly (resolution=h, default) or daily (resolution=d) granularity — the input for cost review and budgeting. See Platform → Spending for how usage maps to billing.
Dashboard
The Usage tab on a sandbox's page in the dashboard charts the same history data — the quickest way to eyeball a workload's footprint without writing any queries.
See also
- Platform → Spending — project-level cost breakdowns.
- Logs — when you need the why behind a usage spike.