$ uptime
It will display the following output:
As shown, the output displays 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. From the output, we learn that the current time of the system is 16:25:07. It’s been up for the last 18 minutes with only 1 logged-in user. The load average is 0.00, 0.34, and 0.64.
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
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
From the output, the server has been running since 16:06:54 on the 16th May 2021.
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
Tidak ada komentar:
Posting Komentar