uptime — Show System Runtime and Load Average

Practical guide to uptime: read system runtime, logged-in users and the 1/5/15-minute load average, and interpret load correctly relative to your CPU core count.

uptime is the fastest health check for a server: in a single line it tells you how long the system has been running, how many users are logged in and – most importantly – the load average over the last 1, 5 and 15 minutes. The command is read-only and never touches the system, so you can run it safely at any time. The key to reading it well is to always weigh the load figures against the number of CPU cores – this guide shows you how to interpret the output correctly.

Basic Usage

uptime — Show uptime, logged-in users and load averages.

uptime

uptime -p — Show uptime in human-readable pretty format.

uptime -p

uptime -s — Show the date and time the system booted.

uptime -s

Understanding Load Averages

uptime — The output includes three load values: 1 min, 5 min, 15 min. A value of 1.0 equals one fully utilized CPU core.

# 10:30:45 up 42 days, 3:15, 2 users, load average: 0.50, 0.75, 1.20

nproc — Show the number of CPU cores (always use this as the reference for the load average).

nproc

cat /proc/loadavg — Read the load averages directly from the proc filesystem.

cat /proc/loadavg

w — Extended uptime info: also shows who is logged in and what they are doing.

w

Boot Time & Raw Data

who -b — Show the time of the last system boot.

who -b

last reboot — Show the system reboot history.

last reboot

cat /proc/uptime — Raw uptime in seconds (uptime, idle time).

cat /proc/uptime

awk '{print int($1/86400)" days"}' /proc/uptime — Calculate uptime in days.

awk '{print int($1/86400)" days"}' /proc/uptime

Common Patterns

uptime | awk -F'load average:' '{print $2}' — Extract only the load averages.

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

uptime -p | cut -d' ' -f2- — Get a clean uptime duration string.

uptime -p | cut -d' ' -f2-

watch -n 5 uptime — Monitor system load in real time (refresh every 5 seconds).

watch -n 5 uptime

Conclusion

uptime is the first thing you type on an unfamiliar or misbehaving server – fast, safe and strictly read-only. The key to reading it lies in the load average: always weigh the 1/5/15-minute values against the CPU core count (nproc). A load of 4 on a 4-core system is busy but not overloaded; the same value on a single-core box means processes are queuing up. Note, too, that the Linux load average does not count CPU work alone – it also includes uninterruptible-sleep processes (D-state, usually I/O), so a high load with low CPU usage often points to a struggling disk or network waits. The trend matters as well: a falling sequence (1 min high, 15 min low) signals a fresh spike, the reverse a load that is winding down.

Further Reading

  • top – watch and sort processes and system load live
  • free – display memory and swap usage
  • vmstat – overview of CPU, memory, I/O and process statistics