Skip to content

Metrics

Read live resource usage for a sandbox — CPU, memory, process count, network, and uptime.

python
m = sbx.get_metrics()
print(m["cpu_pct"], m["mem_used_mb"], m["uptime_s"])
javascript
const m = await sbx.getMetrics();
console.log(m.cpu_pct, m.mem_used_mb, m.uptime_s);

Fields

FieldMeaning
statusrunning or paused
cpu_pctCPU usage percent (point-in-time)
cpu_corescores visible to the sandbox
mem_used_mbmemory in use (page cache excluded)
mem_limit_mbmemory limit
mem_pctmemory used as a percent of the limit
pidsrunning process count
net_rx_mb / net_tx_mbnetwork received / transmitted
uptime_sseconds since the sandbox was created

A paused sandbox reports zero compute (its container is stopped).

Poll get_metrics on a timer to drive a live usage view — the AI2IN dashboard does exactly this in the sandbox workspace.

Sovereign compute for Indian AI — hosted in Mumbai (ap-south-1).