Page 1 of 1

Kiểm tra lịch sử reboot và uptime của server

PostPosted:09 Jun 2018 14:50
by nguyenoanh
1. Kiểm tra lịch sử reboot của server

Để kiểm tra lịch sử reboot của server, ta dùng lệnh last reboot
Code: Select all
 $ last reboot 
 reboot   system boot  3.10.0-862.3.2.e Fri Jun  8 08:52 - 03:46  (18:54)    
reboot   system boot  3.10.0-862.3.2.e Fri Jun  8 06:05 - 03:46  (21:41)    
reboot   system boot  3.10.0-862.3.2.e Fri Jun  8 06:03 - 03:46  (21:43)    
reboot   system boot  3.10.0-862.3.2.e Fri Jun  8 06:01 - 03:46  (21:45)    
reboot   system boot  3.10.0-862.3.2.e Fri Jun  8 05:56 - 06:01  (00:04)    
reboot   system boot  3.10.0-862.3.2.e Fri Jun  8 05:44 - 05:57  (00:12)    
reboot   system boot  3.10.0-862.el7.x Fri Jun  8 05:13 - 05:57  (00:43)    
reboot   system boot  3.10.0-862.el7.x Fri Jun  8 05:11 - 05:57  (00:45)    

wtmp begins Fri Jun  8 05:11:26 2018
2. Kiểm tra uptime của server

uptime của server được tính từ lúc server được bật lên hay khởi động lại cho đến thời điểm kiểm tra.
Kết quả sẽ reset lại về ban đầu nếu bạn khởi động lại server nhé.
Code: Select all
$ uptime
 14:48:31 up 215 days,  4:25,  1 user,  load average: 0.1, 0.4, 0.2
 
Như trên là VPS của mình đã uptime được 215 ngày rồi nhé.