Linux Uptime 命令,讓你知道你的系統運行了多久

對於一些人來說系統運行了多久是無關緊要的,但是對於伺服器管理員來說,這是相當重要的信息。伺服器在運行重要應用的時候,必須盡量保證長時間的穩定運行,有時候甚至要求零宕機。那麼我們怎麼才能知道伺服器運行了多久呢?
在Linux 下,我們可以使用uptime 命令,而且此命令不必使用root 許可權。uptime 命令在系統中已經默認安裝了。
語法如下:
$ uptime
你會在屏幕上看到如下顯示:
這些信息保存在/proc/uptime 文件中,雖然是以文本方式保存,但是這些數據卻不能直接顯示,這就需要我們使用uptime 命令來翻譯它。
以下是如何解讀uptime 提供的信息:
系統時間
在圖1中,左起第一條信息是14:04:39,這就是當前系統時間,以24小時格式輸出。
系統運行時間
第二條信息Up 1004 days, 12:20,這是顯示你的系統運行時間。圖1 顯示你的系統已經運行了1004天12小時20分鐘,如果你的系統沒有運行超過24小時,這裡將只會顯示小時分鐘或者只顯示分鐘。注意圖2、圖3的信息,當系統重啟後將會清零。
已登錄用戶的數量
第三部分的信息是顯示已登陸用戶的數量。在圖1中,顯示的是1 user ,即當前登錄用戶數量。當多個用戶在同時登陸系統時,uptime 命令將告訴你用戶的數量。
平均負載量
最後一個信息是系統的平均負載量。回到圖1,你看到這樣帶兩位小數的數字0.25, 0.25, 0.19可以換算成百分比,即0.25和0.19分別代表著25%和19%。0.25, 0.25, 0.19分別代表著過去1分鐘、5分鐘、15分鐘系統的平均負載量。負載量越低意味著你的系統性能越好。
這就是uptime 命令的日常使用指導,如果想獲取更詳細的信息,請通過輸入man uptime 進入uptime 命令的manual 頁面來查看。
你的機器已經運行多久了?貼出你的uptime給大家看看吧。
via: http://linoxide.com/linux-command/linux-uptime-command/
本文轉載來自 Linux 中國: https://github.com/Linux-CN/archive
nordvpn Cashback
350fairfax
It’s awesome in favor of me to have a web site, which
is valuable in favor of my knowledge. thanks admin
Hi! I realize this is kind of off-topic but I needed to ask.
Does building a well-established website like yours
require a massive amount work? I’m brand new to running a blog
but I do write in my journal on a daily basis.
I’d like to start a blog so I will be able to share my own experience and feelings
online. Please let me know if you have any ideas or tips
for new aspiring bloggers. Appreciate it!
Feel free to surf to my blog: nordvpn coupons inspiresensation (http://s.bea.sh/nordvpn-coupons-inspiresensation–32478)
Excellent website you have here but I was curious if you knew of
any forums that cover the same topics talked about in this article?
I’d really like to be a part of group where I can get feedback from other experienced individuals that share the same interest.
If you have any suggestions, please let me know.
Many thanks!
my blog :: nordvpn coupons inspiresensation
Helpful information. Fortunate me I discovered your website
by chance, and I am shocked why this twist of fate did not came about
in advance! I bookmarked it.
Check out my page :: Nordvpn Coupons Inspiresensation
This is very interesting, You are a very skilled blogger.
I have joined your feed and look forward to seeking more
of your excellent post. Also, I have shared your website in my social networks!
My page; nordvpn coupons inspiresensation