What does uptime print?
$ uptime 14:22:07 up 37 days, 6:41, 2 users, load average: 0.84, 0.77, 0.69
The current time, how long since boot, the number of open login sessions and the three load averages. The same numbers appear in the first line of top. If you need just one part, use the flags below rather than parsing the text.
Which uptime options are useful?
uptime -p # up 5 weeks, 2 days, 6 hours, 41 minutes uptime -s # 2026-10-27 07:40:52 cat /proc/uptime # 3221460.19 38108344.72
-p gives a readable duration, -s the exact boot time, which is perfect for scripts. /proc/uptime holds seconds since boot and total idle seconds summed across all CPUs. Divide the second number by the first and by nproc to get the average idle share since boot.
How do I see past reboots?
last -x reboot | head -8 journalctl --list-boots --no-pager | tail -8 who -b
last reads /var/log/wtmp and lists each reboot with its time span. On Debian 13 and other newer systems, wtmp may be replaced by wtmpdb; use wtmpdb last reboot there. journalctl --list-boots shows every boot the journal remembers, with first and last entries, and works the same on every systemd distro. who -b prints just the last boot.
Why did my server reboot?
Look at the end of the previous boot's journal:
journalctl -b -1 -n 40 --no-pager journalctl -b -1 | grep -iE 'reboot|shutdown|panic|watchdog' grep -h 'reboot' /var/log/apt/history.log /var/log/dnf.log 2>/dev/null | tail
A clean reboot shows systemd stopping services in order. Automatic package tools such as unattended-upgrades can reboot on a schedule if Automatic-Reboot is set. If the log simply stops, the system lost power or was reset; a reboot from the panel looks like that from the inside. Kernel panics usually leave a trace only if the journal flushed in time.
Is a very long uptime good?
It shows stability, but it often also means the kernel has not been updated. Security fixes for the kernel, glibc, OpenSSL and systemd only take full effect after a restart. On a single server, a monthly planned reboot in a quiet hour is a reasonable habit. Check whether one is pending:
[ -f /var/run/reboot-required ] && cat /var/run/reboot-required.pkgs # Debian, Ubuntu sudo dnf needs-restarting -r # RHEL family uname -r; ls -t /boot/vmlinuz-* | head -1
If the newest kernel in /boot differs from what uname -r reports, the new one is waiting for a reboot. Check the Linux kernel version covers this in detail.
Can I restart services without a full reboot?
For library updates, often yes. needrestart on Debian and Ubuntu, and dnf needs-restarting without -r on the RHEL family, list services that still use old libraries. Restarting those services applies the fix with seconds of downtime instead of a minute or two. Kernel updates are different; they need a reboot unless you use a live patching service.
How do I monitor uptime from outside?
Uptime on the box tells you about the OS, not about your site. Point an external check at your web server or SSH port from another network, so you hear about a problem even when the box cannot report it. For a simple self hosted option, run a small status page on a second machine and check HTTP every minute. Our Uptime entry explains how availability percentages translate into minutes of downtime.
How long does a reboot take on your machines?
Server firmware runs memory and device checks before the bootloader, so a reboot takes longer than on a desktop: typically a few minutes, and more on machines with lots of RAM. Plan for that when you schedule maintenance, and make sure every service you need is enabled to start at boot with systemctl enable. After the reboot, uptime -s confirms the new boot time and systemctl --failed shows anything that did not come back.
Can I alert on unexpected reboots?
Yes, with a few lines in cron. Store the boot time from uptime -s in a file, compare it every five minutes, and send a mail or a webhook when it changes. A reboot you did not plan is always worth a look in the journal, even when everything came back fine, because it can point at a kernel panic, a hardware fault or someone with access you forgot about.
Low Cost Machines for Always On Services
| Server | Processor | Cores / threads | Memory | Storage | Network | Per month | Smallest order |
|---|---|---|---|---|---|---|---|
| E1 | Intel Xeon E3-1240 v3 | 4 / 8 | 16 GB DDR3 | 2x 240 GB SSD | 2x 1 Gbps | $30.52 | $91.56 (3 months) |
| E2 | Intel Xeon E3-1270 v3 | 4 / 8 | 32 GB DDR3 | 1x 480 GB SSD | 2x 1 Gbps | $38.32 | $114.96 (3 months) |
| S2 | Intel Xeon E-2356G | 6 / 12 | 64 GB DDR4 | 1x 1 TB NVMe | 2x 10 Gbps | $58.39 | $58.39 (1 month) |
Keep Reading
Linux load average
Understand the three load average numbers, how they relate to your core count, why disk waits raise them, and when a high load is a real problem.
OpenCheck the Linux kernel version
Find the running kernel version, compare it with installed kernels, read what the version string means and know when a reboot is due.
OpenUptime
The share of time a system is up and serving, what the nines really allow, how to measure uptime honestly and how to raise it.
OpenRead Linux log files
Find and read Linux logs on a server: the systemd journal, /var/log text files, app logs, filtering by time and following live output.
OpenFAQ
Quick Answers
Run uptime -s, or who -b.
In /var/log/wtmp for last, and in the systemd journal for journalctl --list-boots.
Yes. Any restart, from the shell or the panel, starts the counter again.
Compare uname -r with the newest kernel in /boot, or check /var/run/reboot-required.
Not with security updates applied. Short planned reboots are part of a healthy server.