Skip to content
Latchkey

uptime: Read the Load Average on a Runner

uptime prints the three load averages (1, 5, and 15 minute), which compared to the CPU count tell you whether a runner is overloaded.

A slow runner is often simply oversubscribed. The load average from uptime, read against nproc, quantifies that in one line, and the trend across the three numbers shows whether it is rising or settling.

What it does

uptime shows current time, how long the system has been up, logged-in users, and the load averages over the last 1, 5, and 15 minutes. Load average is the number of processes running or waiting (including uninterruptible I/O sleep). Compare it to the CPU count: a load equal to the core count means fully busy; well above means a backlog.

Common usage

Terminal
uptime
uptime -p                        # pretty: "up 3 hours, 12 minutes"
# load relative to cores
echo "load $(cut -d, -f1 /proc/loadavg) over $(nproc) cpus"

Options

Flag / fieldWhat it does
(none)Uptime, users, and 1/5/15-min load averages
-pPretty-print just the uptime duration
-sShow the boot timestamp
load 1/5/15Average over the last 1, 5, 15 minutes

In CI

Read the load against the runner’s core count from nproc. On a 4-CPU runner, a 15-minute load of 4 is fully utilized and a load of 16 means jobs are queuing four deep. A 1-minute load much higher than the 15-minute one means load is spiking right now; the reverse means it is recovering. Note: a high load driven by I/O wait (state D processes) inflates the number even when CPUs are idle.

Common errors in CI

Treating a load of "8" as bad without context is the mistake; on a 32-core runner that is light. Always divide by nproc. Load includes processes blocked in uninterruptible sleep, so a stuck NFS mount can drive load to dozens while CPU sits idle; cross-check with vmstat’s wa and b columns.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →