Skip to main content

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).

Quick Summary

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).
load-average-interpretation.txt
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.sh
uptime --version

Core Syntax

uptime-syntax.sh
uptime [OPTIONS]

Key Options

OptionWhat it doesExampleWordPress / VPS use case
(none)Default outputuptimeQuick health snapshot
-pPretty uptimeuptime -pHuman-friendly reports
-sShow boot timeuptime -sConfirm when the server last rebooted

Examples (Commands + Expected Output)

Output varies

Load averages depend on traffic and background jobs.

Default output

uptime-default.sh
uptime

Expected output:

example-output-uptime-default.txt
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-pretty.sh
uptime -p

Expected output:

example-output-uptime-pretty.txt
up 12 days, 3 hours, 1 minute

Use case: Human-readable uptime for status reports.

Boot time (since)

uptime-since.sh
uptime -s

Expected output:

example-output-uptime-since.txt
2026-02-18 07:14:11

Use case: Confirm if a reboot coincides with an incident.

Watch load average over time

watch-uptime-load.sh
watch -n 2 uptime

Expected output:

example-output-watch-uptime.txt
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

extract-load-average.sh
uptime | awk -F'load average:' '{print $2}'

Expected output:

example-output-extract-loadavg.txt
0.32, 0.28, 0.20

Use case: Copy/paste into runbooks or monitoring scripts.

WordPress VPS Use Cases

SymptomWhat to checkCommandWhat to look for
Site slow for minutesSustained loaduptime15-min load high = sustained pressure
Spiky slowdownsShort spikesuptime1-min high but 15-min low = transient
After rebootReboot timeuptime -sConfirms timeline

Troubleshooting

ObservationLikely causeNext step
Load high and CPU busyCPU contentionCheck top, then mpstat -P ALL 1 5
Load high but CPU mostly idleI/O wait or blocked tasksCheck vmstat 1 10 and iostat -xz 1 5
Load normal but site slowApp-level issueCheck PHP-FPM/DB logs and slow queries

Best Practices

  • Treat uptime as a "triage" signal: it tells you where to look next.
  • Always correlate load with CPU cores (use nproc if needed).
  • Pair with top/htop for process-level root cause.
Cheat Sheet
uptime-cheat-sheet.sh
uptime
uptime -p
uptime -s
watch -n 2 uptime
uptime | awk -F'load average:' '{print $2}'

What's Next