uptime — Uptime and Load Average
uptime prints how long the server has been running and the 1/5/15-minute load averages. Use it as a fast first check when WordPress feels slow or unstable: it tells you whether the server is broadly overloaded (high load average) and whether the issue is transient or sustained (1 vs 15 minutes).
If load averages are consistently higher than your CPU core count, the server is likely saturated (CPU contention or I/O wait). Confirm with top, vmstat, and iostat.
What Load Average Means
Load average is the average number of tasks that are:
- running on CPU, or
- waiting to run (runnable), or
- waiting in uninterruptible I/O sleep (often disk I/O).
If you have 2 CPU cores:
load ~2.0 -> roughly fully utilized
load >2.0 -> backlog (CPU queue or I/O wait)
load <2.0 -> headroom
Prerequisites
uptime is part of GNU coreutils/procps tooling and is installed by default.
Verify version:
uptime --version
Core Syntax
uptime [OPTIONS]
Key Options
| Option | What it does | Example | WordPress / VPS use case |
|---|---|---|---|
| (none) | Default output | uptime | Quick health snapshot |
-p | Pretty uptime | uptime -p | Human-friendly reports |
-s | Show boot time | uptime -s | Confirm when the server last rebooted |
Examples (Commands + Expected Output)
Load averages depend on traffic and background jobs.
Default output
uptime
Expected output:
10:15:12 up 12 days, 3:01, 1 user, load average: 0.32, 0.28, 0.20
Use case: Quick snapshot (uptime + load average).
Pretty uptime
uptime -p
Expected output:
up 12 days, 3 hours, 1 minute
Use case: Human-readable uptime for status reports.
Boot time (since)
uptime -s
Expected output:
2026-02-18 07:14:11
Use case: Confirm if a reboot coincides with an incident.
Watch load average over time
watch -n 2 uptime
Expected output:
Every 2.0s: uptime
10:15:12 up 12 days, 3:01, 1 user, load average: 0.32, 0.28, 0.20
Use case: Observe whether load is trending up or recovering.
Extract only the load average numbers
uptime | awk -F'load average:' '{print $2}'
Expected output:
0.32, 0.28, 0.20
Use case: Copy/paste into runbooks or monitoring scripts.
WordPress VPS Use Cases
| Symptom | What to check | Command | What to look for |
|---|---|---|---|
| Site slow for minutes | Sustained load | uptime | 15-min load high = sustained pressure |
| Spiky slowdowns | Short spikes | uptime | 1-min high but 15-min low = transient |
| After reboot | Reboot time | uptime -s | Confirms timeline |
Troubleshooting
| Observation | Likely cause | Next step |
|---|---|---|
| Load high and CPU busy | CPU contention | Check top, then mpstat -P ALL 1 5 |
| Load high but CPU mostly idle | I/O wait or blocked tasks | Check vmstat 1 10 and iostat -xz 1 5 |
| Load normal but site slow | App-level issue | Check PHP-FPM/DB logs and slow queries |
Best Practices
- Treat
uptimeas a "triage" signal: it tells you where to look next. - Always correlate load with CPU cores (use
nprocif needed). - Pair with
top/htopfor process-level root cause.
Cheat Sheet
uptime
uptime -p
uptime -s
watch -n 2 uptime
uptime | awk -F'load average:' '{print $2}'