Linux 文字介面下面常用的監控系統使用資源的程式如下
Linux 預設最古老的系統資源監控程式 – top
最簡單的硬碟監測工具 – iostat
透過 mpstat 來看個別的 CPU 使用率與統計 –mpstat
sar – CPU , Memory ,I/O (Disk, Network) 的資料都可透過這一支程式來統計
dstat – 提供更多元的設定方式來顯示要監控的 CPU , Memory ,I/O (Disk, Network) 資料.
但老實說上面的都不好用,這邊推薦另外一隻 nmon ,在 Ubuntu 下直接透過 #apt-get install nmon 就可以安裝套件,你也可以在官方網站下載 http://nmon.sourceforge.net/pmwiki.php
執行程式 #nmon 下面是執行畫面.
你要監控什麼就選什麼來看, CPU 按 c , Disk 按 d ….按 + – 可以讓顯示頻率增減.其他的參數可以透過按 h 來看.
— Statistics —
- h = help information
- r = RS6000/pSeries CPU/cache/OS/kernel/hostname details + LPAR (Resource)
- t = Top Process Stats
- 1=basic
- 3=CPU
- u = shows command arguments (hit twice to refresh)
- c = CPU by processor
- l = longer term CPU averages
- m = Memory & Swap stats
- L=Huge
- j = JFS Usage Stats
- n = Network stats
- N = NFS
- d = Disk I/O Graphs D=Stats
- o = Disks %Busy Map
- k = Kernel stats & loadavg
- V = Virtual Memory
- g = User Defined Disk Groups [start nmon with -g
] - v = Verbose Simple Checks – OK/Warnings/Danger
- b = black & white mode
— controls —
- + and – = double or half the screen refresh time
- q = quit
- space = refresh screen now
- . = Minimum Mode =display only busy disks and processes
- 0 = reset peak counts to zero (peak = “>”)
我簡單按下 c (CPU) , m (Memory) , d (Disk) 來看系統的狀態.
沒有解決問題,試試搜尋本站其他內容
One thought on “Linux command – nmon”