×


Check Uptime on Ubuntu Linux Server - How to do it ?

Any Linux distro comes with the uptime command. While it may not appear beneficial for ordinary Linux users, keeping tabs on how long the system has been running and active is crucial for any system administrator. It's one among several auditing roles that allows them to know how long the system has been up.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related Linux Monitoring queries.

In this context, we shall look into different methods to check uptime on Ubuntu Linux System.


How to Check uptime using the uptime command ?

The uptime command provides a bird’s eye view of the duration your system has been running. The command provides a wealth of information including the current system time, the logged-in user(s), and the load average.


Uptime Syntax

You can run the uptime command without any options with the following syntax:

$ uptime

The output will display the current system time, closely followed by the status of the system denoted by the parameter 'up'. Thereafter, you are provided with the total time that the system has been up, followed by the number of logged-in users, and finally the system's load average. 


What is Uptime pretty format ?

The -p option displays the results in 'pretty format' or in a more human-readable format. The output is provided in days, hours, and minutes. For our case, the system has only been up for 31 minutes:

$ uptime -p


What is Uptime starting time ?

The server's starting time or the time from which it has been up and running can be displayed using the -s option. It will display the date and time since the server has been running:

$ uptime -s


How to Check uptime using the top command ?

While the good old top command is used for giving an overview of the currently running Linux processes, it also provides a dynamic view of real-time system statistics including the uptime. The uptime information is displayed at the very top as shown:

$ top


[Need assistance in fixing Ubuntu Linux errors? We can help you. ]


Conclusion

This article covers how to easily print out the uptime on any Linux distribution such as Debian and Ubuntu. You will learn how to easily perform an audit of your system's uptime. It's an important command for system administrators to know how long the system has been running. Uptime tool helps troubleshooting issues related to power and scheduling.


On any UNIX-like system, the uptime command will come pre-installed. That applies to Ubuntu as well. Verify the existence of the tool by running these commands:

$  which uptime
$ uptime --version


To check the system uptime, run the following command:

$ uptime