How To Check Uptime Of A Linux Server?


System uptime is how long a system has been up and running. Linux operating system provides various commands such as uptime and top to check the uptime of a system. System uptime information is stored in /proc/uptime file. This information can be displayed using the uptime command.

In this article, we will discuss to check the uptime of a server by using uptime and top command. You can use these commands on any Linux system.

How to display the system uptime using uptime command

To display the system uptime using uptime command open your terminal by pressing ctrl+alt+t and then run the following command –

uptime

Where,

13:19:25 is the current time

The system is up since last 1 hour 40 minutes

1 user is currently login on this server

load average for the last 1, 5 and 15 minutes is 0.06, 0.03 and 0.01

Display uptime in pretty format

To display uptime in pretty format use -u option with uptime command  –

uptime -u

Display last start date and time of system

Use -s or --since option with the uptime command if you want to display the last start date and time of a system or server –

uptime -s

To know more about uptime command see its manual page by running following command –

man uptime

Find system uptime using the top command

In Linux top command is used to monitor processes. It displays a dynamic and realtime view of the processes that are running in a system. We can use this command to check the uptime of a system.

Now use the following command to display system uptime by using top command –

top

Now see in the first line of the output of the top command –

14:47:23 is the current time

The system is up for the last 3 hours and 8 minutes

1 User is active on this server

The average load of last 1, 5 and 15 minutes is 0.02, 0.02 and 0.00

Conclusion

By following this article now you can find how long your system has been up and running. If you have something to say on this topic then write in the comments below.

Leave a Comment