How to Find out Linux and Windows Uptime

By Zhiqiang Ma On Nov 27, 2012

How to find out Linux and Windows uptime is introduced in this post.

Linux uptime

Linux uptime can be easily found out by the uptime command:
$ uptime
22:19:29 up 10 days, 22:26,  5 users,  load average: 0.00, 0.00, 0.00
The system is up for 10 days, 22 hours and 26 minutes.

uptime gives a one line display of the following information. The current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes.

The current date and time can be found out by date command:

$ date
Thu Dec  9 22:30:18 HKT 2010

Windows uptime

1. Go to “Start” -> “Run”. 2. Write “cmd” and press “Enter”. 3. Write the following command in the command line:
net statistics server
Or for short
net stats srv
A sample output is:
I:>net statistics server
Server Statistics for \W2KPGTS

Statistics since 12/2/2010 9:06 AM

Sessions accepted                  2 Sessions timed-out                 0 Sessions errored-out               0

Kilobytes sent                     9724 Kilobytes received                 2716

Mean response time (msec)          0

System errors                      0 Permission violations              0 Password violations                12

Files accessed                     947 Communication devices accessed     0 Print jobs spooled                 0

Times buffers exhausted

Big buffers                      0 Request buffers                  0

The command completed successfully. The line that start with “Statistics since …” provides the time that the server was up from.

Then the current data and time can be found out by date and time command:

I:>date
The current date is: Thu 12/09/2010
Enter the new date: (mm-dd-yy)

I:>time The current time is: 22:25:13.37 Enter the new time:

By: Zhiqiang Ma Last updated: Nov 27, 2012 Views: 795
Tags: , , , ,

About Zhiqiang Ma

Zhiqiang Ma is a PhD candidate at Dep. of CSE, HKUST. He is interested in system software for cloud computing, virtualization of large-scale distributed system, etc. Find Zhiqiang on Facebook, Twitter, LinkedIn and Google+.

Add your comments, share your thoughts

Be nice. Keep it clean. Stay on topic. No spam.