Java Blog for Alex Wan

          Let life be beautiful like summer flowers and death like autumn leaves.

          導(dǎo)航

          <2009年6月>
          31123456
          78910111213
          14151617181920
          21222324252627
          2829301234
          567891011

          隨筆分類(148)

          文章分類

          隨筆檔案(104)

          統(tǒng)計

          留言簿(10)

          BlogJava

          Blogs

          DIV+CSS

          JQuery相關(guān)

          友情鏈接

          常去的地方

          數(shù)據(jù)供應(yīng)

          閱讀排行榜

          評論排行榜

          [linux]linux下查看系統(tǒng)啟動時間的方法

          1.top命令
          輸出的第一行就是系統(tǒng)當(dāng)前時間和已運(yùn)行的時間長度,如
          top
          top - 23:15:59 up 9 days,  8:45,  1 user,  load average: 1.23, 0.87, 0.58

          2.uptime命令

          輸出和top命令的第一行類似:
          uptime
           23:16:58 up 9 days,  8:46,  1 user,  load average: 1.57, 1.02, 0.64

          3.查看/proc/uptime/
          cat /proc/uptime
          809318.30 767841.27

          運(yùn)用系統(tǒng)工具date即可算出系統(tǒng)啟動時間
          date -d "$(awk -F. '{print $1}' /proc/uptime) second ago" +"%Y-%m-%d %H:%M:%S"
          2009-06-02 14:30:36











          Let life be beautiful like summer flowers and death like autumn leaves.

          posted on 2009-06-11 23:29 Alexwan 閱讀(1269) 評論(0)  編輯  收藏 所屬分類: 小筆記 、linux

          主站蜘蛛池模板: 共和县| 呈贡县| 泸西县| 浙江省| 固镇县| 攀枝花市| 彭泽县| 阳朔县| 宜都市| 富源县| 银川市| 邯郸县| 潮州市| 彭山县| 仁化县| 儋州市| 信宜市| 上蔡县| 长沙县| 澄迈县| 东乡县| 綦江县| 云龙县| 建宁县| 祁门县| 新竹市| 岗巴县| 阿拉善左旗| 吉安市| 东乌| 衡阳市| 鹿泉市| 社旗县| 聂荣县| 玉田县| 阿拉善盟| 宁陵县| 东兰县| 隆子县| 宁明县| 汝城县|