Skip to content

bhatti admin metrics

bhatti admin metrics server only

Section titled “bhatti admin metrics ”

Query metrics snapshots over time.

sudo bhatti admin metrics [—since <range>]

The server takes a metrics snapshot roughly every minute and persists it to the database (in metrics_snapshots). This command reads them back and prints a compact table — request rates, error counts, proxy traffic, cold wakes, sandbox state distribution, host load, available memory.

The output is bucketed automatically based on the time range:

RangeBucket size
< 2 hours1 minute
2–24 hours15 minutes
> 24 hours1 hour

Each row aggregates the snapshots in its bucket (sums for counters like req/min, last-value for gauges like LOAD).

--since accepts the same formats as admin events --since — relative durations or absolute dates. The default is 1 hour.

Terminal window
# Last hour at 1-minute resolution (default)
sudo bhatti admin metrics
TIME REQ/min ERR PROXY/min WAKES HOT WARM COLD LOAD MEM_AVAIL
14:21 47 0 8 0 4 6 7 0.4 19421 MB
14:20 52 1 9 1 4 5 8 0.5 19388 MB
14:19 44 0 7 0 4 4 9 0.5 19412 MB
...
Terminal window
# Last 12 hours, auto-bucketed to 15-minute intervals
sudo bhatti admin metrics --since 12h
Terminal window
# Last week, auto-bucketed to 1-hour intervals
sudo bhatti admin metrics --since 7d
Terminal window
# Machine-readable, raw 1-min snapshots for the last 30 minutes
sudo bhatti admin metrics --since 30m --json | jq '.[] | .api_requests'
FlagDefaultDescription
--since <range>1hEarliest snapshot to include.

See Global flags for --url, --token, --json, --timing, --data-dir.