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.
uptimeuptime -p — Show uptime in human-readable pretty format.
uptime -puptime -s — Show the date and time the system booted.
uptime -sUnderstanding 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.20nproc — Show the number of CPU cores (always use this as the reference for the load average).
nproccat /proc/loadavg — Read the load averages directly from the proc filesystem.
cat /proc/loadavgw — Extended uptime info: also shows who is logged in and what they are doing.
wBoot Time & Raw Data
who -b — Show the time of the last system boot.
who -blast reboot — Show the system reboot history.
last rebootcat /proc/uptime — Raw uptime in seconds (uptime, idle time).
cat /proc/uptimeawk '{print int($1/86400)" days"}' /proc/uptime — Calculate uptime in days.
awk '{print int($1/86400)" days"}' /proc/uptimeCommon 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
- uptime(1) – Linux manual page (man7.org) – the official manual page for uptime from the procps project
- Wikipedia: Load (computing) – background on how the Unix load average is calculated and interpreted