Skip to main content
Sandbox metrics provide timestamped CPU, memory, and disk utilization data for a sandbox. This page reads them from the SDK and from the CLI.
Install the SDK, or the CLI for ppio commands, and set the PPIO_API_KEY and PPIO_DOMAIN environment variables before running these examples. See Quickstart and Install and authenticate.

Get sandbox metrics

Calling the metrics API returns a list of timestamped metric records.
Metrics are sampled every 5 seconds. Metrics do not appear immediately after sandbox creation: before the first sample, the response is empty.
In the CLI example, <sandbox-id> is the sandbox ID.

Metric fields

Each record holds a timestamp and the resource values for that sample.
datetime
Timestamp of the metric entry.
float
CPU usage percentage.
int
Number of CPUs.
int
Memory used, in bytes.
int
Total memory, in bytes.
int
Disk space used, in bytes.
int
Total disk space, in bytes.
Last modified on November 19, 2026