Linux operating system is known as a command-based powerful operating system where a Linux engineer or administrators using several commands for daily activities.
There are several commands you need to perform your daily task and to monitor your operating system’s performance, where uptime is one of them.
The uptime command gives you information about how long your system has been running with the current time, numbers of the user currently login or session opened, and system’s average load for 1, 5, and 15 minutes.
It can also display filtered information by using options.
#uptime [option]
Suggested Reading: Linux uptime command Structure
Using uptime Command-
You can use uptime command without any option also like below:
# uptime
It will gives you output similar to below:
07:33:49 up 452 days, 16:25, 2 users, load average: 0.71, 3.03, 3.43
In the above output, the command displays the current time first, “up” means the current system is running and it show next to the total time, next shows the user count (logged in users), and in last it shows system load average.
To know more about uptime command’s syntax and option check out here – Linux uptime command.
Now we can discuss some of the useful uptime command usages with examples:
Check Linux Server Starting Time
You can use the “-s” option to display the date and time when the system has been running.
# uptime -s
Output:
2020-04-27 15:08:19
Check Linux Server uptime
You can use the “-p” option to filter uptime’s output to show only the running time of the system.
# uptime -p
Output:
up 1 year, 12 weeks, 4 days, 16 hours, 34 minutes
Check Linux Server uptime
you can check your installed uptime tool version by using the “-V” option
# uptime -V
Output:
uptime from procps-ng 3.3.10
Information about uptime command
You can also check the detailed information about uptime command and available options of uptime command by using the “-h” option
# uptime -h
Output:
Usage: uptime [options] Options: -p, --pretty show uptime in pretty format -h, --help display this help and exit -s, --since system up since -V, --version output version information and exit
Conclusion:-
The uptime command use to get the information about the current time, online users, how long system has been running and up, and the system load average.
If you have any feedback or question, feel free to leave a comment.
0 Comments