
Information about how long the system has been running or server uptime is not critical for some people. But it is important for server administrators. Servers that run mission-critical applications must run as long as possible. Sometimes it must be zero downtime. Information about the uptime is very useful in many cases it helps to audit how long the server is running.
In this tutorial, we will learn about the command to find the system uptime in linux.Uptime system uptime means how long the server has been running since the last shutdown or reboot.
Question :
How to check unix or linux server uptime ? What command Should i run ?
Answer :
1. Run uptime command :
# uptime
Sample outputs:
22:54:34 up 1:26, 1 user, load average: 0.11, 0.03, 0.01
The uptime command gives a one line display of the following information.
- The current time (22:54:34)
- How long the system has been running (up 1 hour 26 Minutes)
- How many users are currently logged on (1 user)
- The system load averages for the past 1, 5, and 15 minutes (0.11, 0.03, 0.01)
2. You can use w command to check server uptime
# w
Sample outputs:
23:06:57 up 1:38, 1 user, load average: 0.00, 0.00, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 192.168.1.52 21:30 0.00s 1.85s 0.01s w
Please note that the w command also displays who is logged together with uptime info above.
3. Check server uptime using top command.
# top
top - 23:27:01 up 4 days, 10:20, 1 user, load average: 0.22, 0.12, 0.09
Tasks: 163 total, 1 running, 162 sleeping, 0 stopped, 0 zombie
%Cpu(s): 6.1 us, 1.0 sy, 0.0 ni, 92.7 id, 0.1 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 4043436 total, 282644 free, 1044916 used, 2715876 buff/cache
KiB Swap: 8388600 total, 8316440 free, 72160 used. 2905352 avail Mem