天天看點

【工具】系統性能檢視工具 dstat

今天學習到一款系統性能檢視工具 dstat 

擷取方式:

1 yum install -y dstat

2 wget http://packages.sw.be/dstat/dstat-0.7.2-1.el5.rfx.noarch.rpm

  rpm -ivh  dstat-0.7.2-1.el5.rfx.noarch.rpm

Dstat的使用:

安裝完成後,執行 dstat 指令,預設情況它會收集-cpu-、-disk-、-net-、-paging-、-system-的資料,一秒鐘收集一次。 

輸出效果圖:

<a href="http://blog.itpub.net/batch.download.php?aid=34419" target="_blank"></a>

預設輸入 dstat 等于輸入了dstat -cdngy 1或dstat -a 1;

具體的參數如下:

Dstat options:

  -c, --cpu              顯示CPU情況

  -C 0,3,total           include cpu0, cpu3 and total

  -d, --disk             顯示磁盤情況

  -D total,hda           include hda and total

  -g, --page             enable page stats

  -i, --int              enable interrupt stats

  -I 5,eth2              include int5 and interrupt used by eth2

  -l, --load             enable load stats

  -m, --mem              顯示記憶體情況

  -n, --net              顯示網絡情況

  -N eth1,total          可以指定網絡接口

  -p, --proc             enable process stats

  -s, --swap             顯示swap情況

  -S swap1,total         可以指定多個swap

  -t, --time             enable time counter

  -y, --sys              enable system stats

  --ipc                  報告IPC消息隊列和信号量的使用情況 

  --lock                 enable lock stats

  --raw                  enable raw stats

  --tcp                  enable tcp stats

  --udp                  enable udp stats

  --unix                 enable unix stats

  -M stat1,stat2         enable external stats

  -mods stat1,stat2

  -a, --all              使用-cdngy 預設的就是這樣顯示

  -f, --full             使用 -C, -D, -I, -N and -S 顯示

  -v, --vmstat           使用-pmgdsc -D 顯示

  --integer              show integer values

  --nocolor              disable colors (implies --noupdate)

  --noheaders            隻顯示一次表頭以後就不顯示了,使用重定向寫入檔案時很有用

  --noupdate             disable intermediate updates

  --output file          寫入到CVS檔案中

  可以指定參數檢視具體的os的性能,比如 cpu,網絡,io 等等!