linux命令 uptime詳解
引言:從今天開始,每周更新一個對程序員有用的linux命令,我真的沒敢寫每天一個,我怕我堅持不下去,每周一個還是可以的。既然每周一個了,就肯定不能拿ls,chmod這種命令來湊數(shù)了。降低數(shù)量,保障質(zhì)量。與大家共勉。
進入正題
我們先來看一下命令執(zhí)行結(jié)果
11:10:42 up 4 days, 19:23, 2 users, load average: 3.17, 3.45, 3.65
我們來分組解釋一下,大概分成一下幾個部分
我們使用man uptime命令進行查詢uptime的說明如下(man命令不了解的稍微百度一下就明白,這是一個類似手冊的功能)
注:一般我們使用 uptime -h 即命令加-h或--help的形式得到的是比較簡單的幫助文檔,而man命令一般會給出更詳細的解釋,不過一般都是英文的,其實也沒有太難的詞語希望大家堅持英文閱讀。提高技術(shù)水平的同時也潛移默化的提高了英語水平
uptime gives a one line display of the following information.
The current time, how long the system has been running, how many
users are currently logged on, and the system load averages for
the past 1, 5, and 15 minutes.
This is the same information contained in the header line dis‐
played by w(1).
System load averages is the average number of processes that are
either in a runnable or uninterruptable state. A process in a
runnable state is either using the CPU or waiting to use the CPU.
A process in uninterruptable state is waiting for some I/O
access, eg waiting for disk. The averages are taken over the
three time intervals. Load averages are not normalized for the
number of CPUs in a system, so a load average of 1 means a single
CPU system is loaded all the time while on a 4 CPU system it
means it was idle 75% of the time.
當然我知道大部分童鞋是不想看那么長串的英文的linux命令大全,我翻譯了一下如下:
uptime 在一行中給了如下信息:當前時間,系統(tǒng)已經(jīng)運行了多久,多少用戶連接目前正在使用系統(tǒng),系統(tǒng)在過去1,5,15分鐘內(nèi)的平均負載。
下一個教程:運維應(yīng)該知道的Linux命令