TL;DR (QUICK ANSWER)
On Windows, run Get-Uptime in PowerShell 6 or later, or systeminfo | find “System Boot Time” in Command Prompt. On Linux and macOS, run uptime. These show how long the operating system has run since its last boot. They don’t show whether users can reach the server, so add external monitoring that alerts you when it goes down.
Server uptime is usually the first number you check after an unexpected restart or a report that something is down. The command to see it is different on Windows, Linux, and macOS, and the result isn’t always what you expect.
We’ll cover each system, how to see past reboots, and why the number can look wrong. Start with the table below for the quickest command on each system.
| OS | Command | Shows |
|---|---|---|
| Windows (PowerShell 6+) | Get-Uptime | Time since last boot |
| Windows (any PowerShell) | (Get-Date) – (Get-CimInstance Win32_OperatingSystem).LastBootUpTime | Time since last boot |
| Windows (CMD) | systeminfo | find “System Boot Time” | Date and time of last boot |
| Linux | uptime -p | Time since last boot, for example “up 3 weeks, 2 days” |
| macOS | uptime | Time since last boot plus load averages |
Key takeaways
- On Windows, run Get-Uptime in PowerShell 6 or later, or check System Boot Time with systeminfo in Command Prompt.
- On Linux and macOS, the uptime command shows how long the system has run since its last boot.
- Event Viewer on Windows and last reboot on Linux show past restarts, not just the most recent one.
- Fast Startup in Windows 10 and 11 can make uptime look much longer than it really is.
- A server with months of uptime is usually missing security updates that need a restart.
- Uptime doesn’t tell you whether users can reach the server, so pair it with external monitoring.
What server uptime means
Server uptime is how long the operating system has been running since it last started. The counter resets every time the server reboots, so a server that restarted last night shows a few hours of uptime, even if it has otherwise run without problems for months.
This isn’t the same as the uptime percentage in an SLA (service level agreement). An SLA measures whether a service was reachable by users over a period, such as 99.9% in a month.
How to check server uptime on Windows Server
Windows gives you several ways to check uptime, from a one-word PowerShell command to the event log. Use PowerShell or CMD for a quick answer, and Event Viewer when you need to know when and why a server restarted.
With PowerShell
In PowerShell 6 and later, including PowerShell 7, run:
Get-Uptime
It returns the time since the last boot, broken down into days, hours, minutes, and seconds:
Days : 9
Hours : 0
Minutes : 9
Seconds : 45
Milliseconds : 0
TotalDays : 9.00677083333333
To see the exact boot time instead, add -Since:
Get-Uptime -Since
Windows Server ships with Windows PowerShell 5.1, which doesn’t include Get-Uptime. There, subtract the last boot time from the current time:
(Get-Date) - (Get-CimInstance Win32_OperatingSystem).LastBootUpTime
The output uses the same Days, Hours, Minutes, and Seconds format.
With Command Prompt (CMD)
In Command Prompt, run:
systeminfo | find "System Boot Time"
This command returns the date and time of the last boot, for instance, System Boot Time: 11/10/2026, 6:14:02 AM. To get the uptime, count from that point to now.
Many older guides tell you to search for “System Up Time” instead. That line was replaced by “System Boot Time” after Windows XP, so on current Windows the command returns nothing.
You can also run net statistics workstation. Its “Statistics since” line shows roughly when the machine started.
With Task Manager
- Press Ctrl+Shift+Esc to open the Task Manager.
- Open the Performance tab and select CPU.
- Read the Up time value near the bottom. It’s shown as days:hours:minutes:seconds.

With Event Viewer (reboot history)
Uptime only tells you about the last boot. To see past reboots and shutdowns, and who or what caused them, use Event Viewer.
- Open Event Viewer and go to Windows Logs > System.
- Click Filter Current Log in the right-hand pane.
- Enter 6005, 6006, 6008, 1074, 41 in the event ID field and click OK.
| Event ID | What it means |
|---|---|
| 6005 | The event log service started, which marks a boot |
| 6006 | The event log service stopped, which marks a clean shutdown |
| 6008 | The previous shutdown was unexpected |
| 1074 | A user or process started a restart or shutdown, with the account and reason |
| 41 | The system rebooted without cleanly shutting down first, for example after a crash or power loss |
A 1074 followed by a 6006 is a planned restart. A 41 and a 6008 with no 1074 before them point to a crash or power problem.

On remote servers and many servers at once
To check the last boot time on several servers at once, run this from a PowerShell session with admin rights:
Get-CimInstance -ComputerName SRV01,SRV02 -ClassName Win32_OperatingSystem | Select-Object CSName, LastBootUpTime
To show uptime per server instead of boot time, add a calculated column:
Get-CimInstance -ComputerName SRV01,SRV02 -ClassName Win32_OperatingSystem | Select-Object CSName, LastBootUpTime, @{Name='Uptime'; Expression={(Get-Date) - $_.LastBootUpTime}}
Replace SRV01 and SRV02 with your server names. This needs WinRM enabled on the target servers (it is by default on current Windows Server versions) and an account with admin rights on them. For hundreds of machines, remote monitoring and management (RMM) tools collect uptime automatically.
How to check server uptime on Linux
Linux has a few built-in ways to check uptime. Use the uptime command for a quick answer, /proc/uptime when you need the number for a script, and the login records or system journal when you need to see past reboots.
The uptime command
Run uptime in a terminal:
14:32:07 up 23 days, 4:11, 2 users, load average: 0.15, 0.10, 0.08
You’ll see the current time, how long the system has been up, the number of logged-in users, and three load averages. The load averages are the average number of processes running, waiting to run, or waiting on disk I/O over the last 1, 5, and 15 minutes.
Two options make the output easier to use:
- uptime -p shows uptime in plain words, for example up 3 weeks, 2 days, 4 hours, 11 minutes.
- uptime -s shows the exact boot time, for example 2026-10-27 10:21:05.
/proc/uptime
Run cat /proc/uptime to get uptime in seconds:
2002262.42 7893510.37
The first number is the seconds since boot, which is handy in scripts and monitoring checks. The second is the total time the CPU cores have spent idle.
Last reboot history
- who -b shows the time of the last boot.
- last reboot lists past reboots from the system’s login records (/var/log/wtmp, or a wtmpdb database on newer releases such as Debian 13).
- On systemd-based distributions, journalctl – -list-boots also lists past boots with their start and end times.
How to check uptime on macOS
Open Terminal and run uptime. It shows the time since the last boot, the number of users, and load averages, in the same format as Linux. For the exact boot time, run:
sysctl kern.boottime
Why the uptime number can look wrong
Sometimes uptime shows weeks when you know the machine was turned off last night. On Windows 10 and 11, the usual cause is Fast Startup, which is on by default. With Fast Startup, “Shut down” saves the Windows kernel to disk, much like hibernation, and restores it the next time you turn the PC on. The uptime counter keeps running. Only “Restart” fully resets it.
Other things that can make the number look off:
- Sleep and hibernation: Task Manager doesn’t subtract time spent asleep, so its uptime can differ from what other tools report.
- Desktops used as servers: A Windows 10 or 11 machine running a service can carry uptime across shutdowns because of Fast Startup.
- Restored VMs: A virtual machine resumed from a saved state carries its uptime over, because the OS never actually rebooted.
Fast Startup is a Windows 10 and 11 feature, so on a dedicated Windows Server machine the number usually reflects the last real restart.
How long should a server stay up?
Long uptime used to be something sysadmins bragged about. Today, it usually means missed patches. A server that hasn’t rebooted in a year almost certainly has security updates waiting, because many Windows and Linux kernel patches only take effect after a restart. Until then, the server keeps running the vulnerable code, even if the update shows as installed.
A better habit is to reboot on a schedule. Patch your servers regularly, then restart them in a planned maintenance window when traffic is low. Tell users ahead of time, and if you run a status page, post the window there.
That way, users know a restart is coming, and it doesn’t look like an outage. If you monitor the server with UptimeRobot, add a maintenance window for the restart so it doesn’t trigger alerts or count against your uptime stats. Maintenance windows are available on paid plans.
Server uptime vs. availability: monitor it from outside
The uptime command only tells you how long the operating system has been running. It can’t tell you whether users can actually reach the server, and it won’t alert anyone when the server goes down. A server can be “up” with a crashed web service, a blocked firewall port, or a broken network route, and the uptime counter won’t notice.
It also won’t warn you about CPU, memory, or disk problems building up. For those, see our guide to server monitoring.
That’s what external monitoring is for. A monitoring service checks your server from the outside every few minutes, the same way a user would, and alerts you when a check fails. The most useful checks for servers are:
- Ping: Sends an ICMP request to confirm the server is reachable on the network.
- Port: Confirms a specific service is accepting connections, such as 443 for HTTPS, 22 for SSH, or 3389 for Remote Desktop.
- HTTP(S): Loads a page or API endpoint and checks the response, which confirms the application works, not just the server.

How to monitor server availability with UptimeRobot
- Sign up for a free UptimeRobot account.
- Click + Add New Monitor and choose the monitor type. Use Ping to check the server itself, Port to check a service like SSH or a database, or HTTP(S) for a website or API.
- Enter the server’s IP address or hostname, and the port number for a Port monitor.
- Set the check interval and choose how you get alerted. The free plan includes email, mobile app push notifications, and integrations like Discord and Google Chat. Paid plans add SMS, voice calls, and Slack.
- Click Create Monitor.

The free plan covers 50 monitors with HTTP(S), ping, port, and keyword checks every 5 minutes. Before alerting, UptimeRobot re-checks a failure from a different data center in the same region, which cuts false alarms.
Paid plans check as often as every 60 seconds on Solo and every 15 seconds on Scale, and add SMS, voice calls, and more integrations.
If you have a server behind a firewall, paid plans include heartbeat monitoring, which works the other way around. The server pings UptimeRobot on a schedule, and you get an alert when the pings stop.
-
In PowerShell 6 and later, run Get-Uptime, or Get-Uptime -Since for the boot time. In Windows PowerShell 5.1, run (Get-Date) – (Get-CimInstance Win32_OperatingSystem).LastBootUpTime.
-
Run systeminfo | find “System Boot Time” in Command Prompt, or Get-Uptime -Since in PowerShell 6 and later. For a history of past reboots, filter the System log in Event Viewer by event IDs 6005, 6006, 6008, 1074, and 41.
-
Use Get-CimInstance -ComputerName with a list of server names and select LastBootUpTime. This needs WinRM and admin rights on the target servers. For many servers, an RMM tool collects uptime automatically, and an external monitoring service like UptimeRobot alerts you when any of them become unreachable.
-
Fast Startup is on by default in Windows 10 and 11. When you shut down, Windows saves the kernel to disk and restores it on the next start, so the uptime counter keeps going. Use Restart, or turn off Fast Startup in Power Options, to reset it.
-
For OS uptime, there’s no target to hit. Weeks between reboots is normal, but months or years usually means security updates haven’t been applied. Reboot after patching in a planned maintenance window. For availability, most services aim for 99.9% or higher, which allows about 43 minutes of downtime a month. You can try other targets in our free uptime calculator.
