Understanding how long a server has been running, its current load, and its boot/reboot history are basic but essential diagnostics — especially useful when investigating unexpected downtime or performance issues.
Checking Current Uptime
uptime
Shows current time, how long the system has been running, number of logged-in users, and the load average.
Understanding Load Average Output
load average: 0.52, 0.58, 0.61
The three numbers represent average load over the last 1, 5, and 15 minutes respectively — compare against your CPU core count; a value near or above your core count indicates significant load.
Checking How Many CPU Cores You Have (for Context)
nproc
Viewing System Boot Time
who -b
Viewing Reboot History
last reboot
Shows a history of system reboots — useful for correlating an incident with an unexpected restart, or confirming a planned maintenance reboot actually occurred as expected.
Viewing Full Login History
last
Shows recent login sessions, including source IP — useful both for general activity review and as part of security investigation (see How to Monitor Auth Logs and Detect Intrusion Attempts on a Linux VPS).
Checking Why the System Last Booted (Shutdown vs Crash)
last -x | grep shutdown
A clean shutdown entry indicates a graceful restart; its absence before a reboot can suggest an unexpected crash or forced restart worth investigating further.
Viewing Detailed Boot Logs
journalctl -b
Shows all log entries from the current boot session — use journalctl -b -1 for the previous boot's logs, useful for investigating what happened right before an unexpected restart.
Checking for Kernel Panics or Hardware Errors
journalctl -k | grep -i error
Setting Up Uptime Monitoring Externally
For proactive awareness of downtime (rather than only discovering it after the fact via these commands), see How to Set Up Uptime Monitoring for Your Website — an external check catches outages even when you're not actively logged into the server.
Interpreting High Uptime
Very high uptime (many months/years without a reboot) isn't automatically good — it can also mean the kernel hasn't been updated with a security patch requiring a reboot; balance uptime against staying current on updates. See How to Enable Automatic Security Updates on Ubuntu & Debian.
Common Errors
Load average seems high but no obvious CPU-heavy process — check for processes in uninterruptible sleep (disk I/O wait) using ps aux | awk '$8=="D"', since load average includes I/O-waiting processes, not only CPU-bound ones.
Continue Reading
- How to Monitor Real-Time System Resources with htop and top
- How to Monitor Auth Logs and Detect Intrusion Attempts on a Linux VPS
- How to Read and Analyze Linux Logs with journalctl
Browse more articles in Linux Server Administration.