How to Check System Uptime in Linux

Linux/Unix systems keep the details of the system uptime. You may also need to know when the server is running.

Check System Uptime

You can use the uptime command to find the system uptime. Uptime command is available under procps package. This command also provides the current system time, number of logged in users and current CPU load.

$ uptime    07:33:31 up 174 days,  5:12,  2 users,  load average: 0.17, 0.14, 0.17 
as per above output, the system is running from 174 days, 5 hours and 12 minutes.

Check Last Reboot

Additionally, you can also use the last command to find the system reboot history.
$ last reboot   reboot   system boot  2.6.18-92.el5    Sat Feb 11 12:00         (12+22:51) reboot   system boot  2.6.18-92.el5    Sun Feb  5 12:57         (5+21:17) reboot   system boot  2.6.18-92.el5    Sat Jan 28 15:58         (13+18:16) reboot   system boot  2.6.18-92.el5    Thu Jan 26 17:15         (15+17:00) reboot   system boot  2.6.18-92.el5    Mon Jan  9 13:40         (32+20:35) reboot   system boot  2.6.18-92.el5    Sun Jan  8 15:50         (33+18:24) reboot   system boot  2.6.18-92.el5    Sat Dec 24 12:58         (48+21:17) 
The above output shows that the system was last rebooted on Feb 11 at 12:00 PM and others as well.

Thanks for Visit Here

Comments