Linux中如何查看系統開機時間

來源:互聯網
上載者:User

有時候需要查看Linux系統運行了多久時間,此時需要知道上次開機啟動時間; 有時候由於斷電或供電故障突然停機,需要查看Linux開機時間/重啟時間;  下面總結一些查看Linux開機關機時間的方法(非常全面)

1: who 命令查看

who -b 查看最後一次系統啟動的時間。

who -r 查看當前系統已耗用時間

[root@DB-Server ~]# who -b

system boot May 11 09:27

2: last  reboot

如下所示last reboot可以看到Linux系統曆史啟動的時間。 重啟一下作業系統後,然後

[root@DB-Server ~]# last reboot

reboot system boot 2.6.9-42.ELsmp Thu May 29 15:25 (00:07)

reboot system boot 2.6.9-42.ELsmp Sun May 11 09:27 (18+05:55)

wtmp begins Mon May 5 16:18:57 2014

如果只需要查看最後一次Linux系統啟動的時間

[root@DB-Server ~]# last reboot | head -1

reboot system boot 2.6.9-42.ELsmp Thu May 29 15:25 (00:08)

3:TOP命令查看

如下截圖所示,up後表示系統到目前運行了多久時間。反過來推算系統重啟時間

返回欄目頁:http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.