Knowing your server’s uptime is fundamental to reliability engineering. Whether you’re debugging a recent reboot, verifying an SLA, or auditing server health, here’s how to check uptime on any system.
Check Uptime on Linux
The uptime Command
The simplest way:
$ uptime 14:23:45 up 127 days, 3:42, 2 users, load average: 0.15, 0.10, 0.08This tells you: current time, how long the system has been running, logged-in users, and load averages for 1, 5, and 15 minutes.
Using /proc/uptime
For a machine-readable format:
$ cat /proc/uptime10987654.32 21234567.89The first number is uptime in seconds. The second is total idle time across all CPUs. To convert to days:
$ awk '{print int($1/86400)" days"}' /proc/uptime127 daysUsing who -b
Shows the last boot time:
$ who -b system boot 2025-10-30 10:41Using systemd-analyze
On systemd-based systems, get detailed boot timing:
$ systemd-analyzeStartup finished in 1.234s (kernel) + 3.456s (initrd) + 12.789s (userspace) = 17.479sUsing last reboot
See a history of all reboots:
$ last rebootreboot system boot 5.15.0-89-generic Wed Oct 30 10:41 still runningreboot system boot 5.15.0-86-generic Mon Sep 15 08:22 - 10:41 (45+02:19)Check Uptime on Windows
Using systeminfo
Open Command Prompt or PowerShell:
systeminfo | find "System Boot Time"Output:
System Boot Time: 10/30/2025, 10:41:23 AMUsing PowerShell
More precise with PowerShell:
(Get-Date) - (Get-CimInstance Win32_OperatingSystem).LastBootUpTimeOutput:
Days : 127Hours : 3Minutes : 42Seconds : 15Or as a one-liner for just the uptime:
$os = Get-CimInstance Win32_OperatingSystem"Uptime: $((Get-Date) - $os.LastBootUpTime)"Using Task Manager
For a quick visual check:
- Open Task Manager (Ctrl+Shift+Esc)
- Go to the Performance tab
- Look at Up time in the bottom-left of the CPU section
Using net statistics
net statistics serverThe “Statistics since…” line shows when the Server service started, which typically aligns with boot time.
Remote Server Uptime Check
Via SSH (Linux)
ssh user@server "uptime"Via SNMP
For monitoring systems that support SNMP:
snmpget -v2c -c public server.example.com 1.3.6.1.2.1.1.3.0Returns sysUpTime in hundredths of a second since the SNMP agent started.
Via Monitoring Tools
The most reliable way to check uptime over time is external monitoring. Server-side commands only show time since last reboot, not actual availability from a user’s perspective. A server can be “up” but unreachable due to network issues, firewall changes, or application crashes.
External uptime monitoring tools check from outside your network, measuring what users actually experience.
Automating Uptime Checks
Cron Job (Linux)
Log uptime every hour:
# Add to crontab -e0 * * * * echo "$(date): $(uptime)" >> /var/log/uptime.logScheduled Task (Windows)
Create a PowerShell script that logs uptime:
$uptime = (Get-Date) - (Get-CimInstance Win32_OperatingSystem).LastBootUpTime"$(Get-Date): Uptime $($uptime.Days)d $($uptime.Hours)h" | Out-File -Append C:\logs\uptime.logSchedule it with Task Scheduler to run hourly.
Server Uptime vs Service Uptime
Important distinction: server uptime (time since last reboot) is not the same as service uptime (time your application is accessible to users).
Your server can be up for 365 days while your web application crashes multiple times a week. The server uptime command won’t show you those application-level outages.
For true availability monitoring, you need external checks that test your application’s actual endpoints, not just whether the OS is running. Use the uptime calculator to understand what different availability levels mean in practice.
Related tools:
- Uptime Calculator — Convert between uptime percentages and downtime
- Error Budget Calculator — Track your allowed downtime budget