uptime
Overview
uptime shows how long the system has been running, how many users are logged in, and the load average (1, 5, and 15 minutes). It is a quick health snapshot before diving into top/htop/vmstat.
Load average is the average number of runnable plus uninterruptible (disk sleep) tasks — not a pure “CPU %” meter.
Syntax
uptime [options]Common Options
| Option | Description |
|---|---|
-p, --pretty |
Pretty duration only |
-s, --since |
System up since timestamp |
-h, --help |
Help |
-V |
Version |
Examples with Explanations
Default
uptime
# 10:15:02 up 21 days, 4:03, 3 users, load average: 0.08, 0.12, 0.09Pretty / since
uptime -p
uptime -sInterpret load vs CPUs
uptime
nproc
lscpu | grep '^CPU(s):'
# rough rule of thumb: load near nproc ≈ busy; much higher may mean saturationWatch over time
watch -n1 uptimeScripts
load=$(awk '{print $1}' /proc/loadavg)
echo "1-minute load: $load"
# /proc/loadavg is the source of truth
cat /proc/loadavgCorrelate with other tools
uptime
who
w
top -bn1 | headContainers
uptime
# may reflect host uptime depending on visibility of /procUnderstanding load average
| Observation | Possible meaning |
|---|---|
| Low load, high latency | Network/app issues, not CPU |
| Load ≫ nproc, CPU idle% high | I/O wait / uninterruptible tasks |
| Load ≈ runnable tasks | CPU contention |
| Sudden load spikes | Cron storms, backups, build jobs |
Use vmstat 1, iostat -xz 1, ps, pidstat for root cause.
Notes / Pitfalls
- Load is not “percent CPU”; a 64-core host can show load 20 and still be fine.
- Suspend-to-RAM / cloud live migration can make “up” time less intuitive.
- User count is from utmp; containers/ssh multiplexing may look odd.
- Don’t alert only on load without CPU, memory, and I/O context.
2026-relevant notes
- For long-term trends use Prometheus node exporter /
sarrather than one-offuptime. - Latency-sensitive systems care more about p99 and steal time (VMs) than raw load.
systemd-analyzehelps boot time;uptime -sshows when the current boot began.
Additional Resources
man uptime,man 5 proc(/proc/loadavg)