国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統(tǒng) > Linux > 正文

Linux查看系統(tǒng)開機(jī)時(shí)間

2024-06-28 13:26:05
字體:
供稿:網(wǎng)友
linux查看系統(tǒng)開機(jī)時(shí)間 2014-05-29 16:21 by 瀟湘隱者, ... 閱讀, ... 評(píng)論, 收藏, 編輯

有時(shí)候需要查看Linux系統(tǒng)運(yùn)行了多久時(shí)間,此時(shí)需要知道上次開機(jī)啟動(dòng)時(shí)間; 有時(shí)候由于斷電或供電故障突然停機(jī),需要查看Linux開機(jī)時(shí)間/重啟時(shí)間; 下面總結(jié)一些查看Linux開機(jī)關(guān)機(jī)時(shí)間的方法(非常全面)

1: who 命令查看

who -b 查看最后一次系統(tǒng)啟動(dòng)的時(shí)間。

who -r 查看當(dāng)前系統(tǒng)運(yùn)行時(shí)間

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

system boot May 11 09:27

clipboard

clipboard[1]

2: last reboot

如下所示last reboot可以看到Linux系統(tǒng)歷史啟動(dòng)的時(shí)間。 重啟一下操作系統(tǒng)后,然后

[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

clipboard[2]

如果只需要查看最后一次Linux系統(tǒng)啟動(dòng)的時(shí)間

[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后表示系統(tǒng)到目前運(yùn)行了多久時(shí)間。反過來推算系統(tǒng)重啟時(shí)間

clipboard[3]4:w 命令查看

4: w命令查看

如下截圖所示,up后表示系統(tǒng)到目前運(yùn)行了多久時(shí)間。反過來推算系統(tǒng)重啟時(shí)間

clipboard[4]

5:uptime 命令查看

clipboard[5]

6: 查看/PRoc/uptime

[root@DB-Server ~]# cat /proc/uptime

1415.59 1401.42

[root@DB-Server ~]# date -d "`cut -f1 -d. /proc/uptime` seconds ago"

Thu May 29 15:24:57 CST 2014

[root@DB-Server ~]# date -d "$(awk -F. '{print $1}' /proc/uptime) second ago" +"%Y-%m-%d %H:%M:%S" 2014-05-29 15:24:57

clipboard[6]

參考資料:

http://www.thegeekstuff.com/2011/10/linux-reboot-date-and-time/

http://www.averainy.info/linux-system-Operation-time-and-the-view-of-the-latest-powered-up-time/


發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 延安市| 蓝田县| 漳浦县| 象州县| 治县。| 天长市| 甘德县| 荥经县| 崇仁县| 景德镇市| 介休市| 隆安县| 大化| 阿城市| 乌拉特后旗| 浪卡子县| 棋牌| 江城| 子洲县| 罗甸县| 托克逊县| 英超| 北流市| 东山县| 祁阳县| 泽州县| 南阳市| 岐山县| 曲靖市| 丰台区| 富宁县| 临夏县| 舒城县| 新龙县| 松溪县| 新营市| 长阳| 海盐县| 临沭县| 绥江县| 县级市|