Monitoring

How to Check Server Uptime: Windows, macOS, & Linux.

Written by Laura Clayton Verified by Alex Ioannides 10 min read Updated Nov 24, 2026
0%

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.

OSCommandShows
Windows (PowerShell 6+)Get-UptimeTime since last boot
Windows (any PowerShell)(Get-Date) – (Get-CimInstance Win32_OperatingSystem).LastBootUpTimeTime since last boot
Windows (CMD)systeminfo | find “System Boot Time”Date and time of last boot
Linuxuptime -pTime since last boot, for example “up 3 weeks, 2 days”
macOSuptimeTime since last boot plus load averages
UptimeRobot
Downtime happens. Get notified!
Join the world's leading uptime monitoring service with 3.5M+ happy users.

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. 

Tips & Tricks
A server can show 200 days of OS uptime while the website on it was down for hours. Read more about what uptime is and what counts toward uptime.

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

  1. Press Ctrl+Shift+Esc to open the Task Manager.
  2. Open the Performance tab and select CPU.
  3. Read the Up time value near the bottom. It’s shown as days:hours:minutes:seconds.
Windows task manager uptime

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.

  1. Open Event Viewer and go to Windows Logs > System.
  2. Click Filter Current Log in the right-hand pane.
  3. Enter 6005, 6006, 6008, 1074, 41 in the event ID field and click OK.
Event IDWhat it means
6005The event log service started, which marks a boot
6006The event log service stopped, which marks a clean shutdown
6008The previous shutdown was unexpected
1074A user or process started a restart or shutdown, with the account and reason
41The 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.

Event viewer filter

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.
UptimeRobot monitoring dashboard

How to monitor server availability with UptimeRobot

  1. Sign up for a free UptimeRobot account.
  2. 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.
  3. Enter the server’s IP address or hostname, and the port number for a Port monitor.
  4. 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.
  5. Click Create Monitor.
UptimeRobot add ping monitor add port 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.

Start using UptimeRobot today.

Join more than 3.5M+ users and companies!

  • Get 50 monitors for free - forever!
  • Monitor your website, server, SSL certificates, domains, and more.
  • Create customizable status pages.
Laura Clayton

Written by

Laura Clayton

Copywriter |

Laura Clayton has over a decade of experience in the tech industry, she brings a wealth of knowledge and insights to her articles, helping businesses maintain optimal online performance. Laura's passion for technology drives her to explore the latest in monitoring tools and techniques, making her a trusted voice in the field.

Expert on: Cron Monitoring , DevOps

🎖️

Our content is peer-reviewed by our expert team to maximize accuracy and prevent miss-information.

Alex Ioannides

Content verified by

Alex Ioannides

Head of DevOps|

Prior to his tenure at itrinity, Alex founded FocusNet Group and served as its CTO. The company specializes in providing managed web hosting services for a wide spectrum of high-traffic websites and applications. One of Alex's notable contributions to the open-source community is his involvement as an early founder of HestiaCP, an open-source Linux Web Server Control Panel. At the core of Alex's work lies his passion for Infrastructure as Code. He firmly believes in the principles of GitOps and lives by the mantra of "automate everything". This approach has consistently proven effective in enhancing the efficiency and reliability of the systems he manages. Beyond his professional endeavors, Alex has a broad range of interests. He enjoys traveling, is a football enthusiast, and maintains an active interest in politics.

Questions? Contact Support
Feature suggestions? Share

Recent Articles