国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Linux > 正文

Linux的系統監控工具dstat常見用法總結

2020-07-10 11:15:39
字體:
來源:轉載
供稿:網友

1) 工具說明
dstat是一個用來替換 vmstat,iostat netstat,nfsstat和ifstat這些命令的工具, 是一個全能系統信息統計工具. 與sysstat相比, dstat擁有一個彩色的界面, 在手動觀察性能狀況時, 數據比較顯眼容易觀察; 而且dstat支持即時刷新, 譬如輸入dstat 3, 即每三秒收集一次, 但最新的數據都會每秒刷新顯示. 和sysstat相同的是, dstat也可以收集指定的性能資源。

2) 軟件安裝


復制代碼
代碼如下:

# cd /tmp
# rz
# rpm -Uvh dstat-0.6.7-1.el*.rf.noarch.rpm
# which dstat
/usr/bin/dstat


或者Ubuntu(Debian系)下:


復制代碼
代碼如下:

$ apt-get install dstat


3) dstat 選項

-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文件中
這個軟件和vmstat很像, 不過和vmstat相比好像少了io部份的顯示, dstat只能顯示磁盤的吞吐量而不是顯示負載情況, dstat和幾乎所有監控軟件一樣, 只能對整個系統進行監控而不能對某一個進程或某一個程序進行深入分析. 我常使用的參數是dstat -cdlmnpsy, 做個別名鏈接alias dstat='dstat -cdlmnpsy'

4)常見用法
查看有關 cpu,硬盤和網絡的詳細信息。


復制代碼
代碼如下:

$dstat

20151030104405498.png (687×324)

查看有關 cpu,硬盤和網絡的詳細信息。

-c cpu


復制代碼
代碼如下:

$ dstat -c

20151030104522344.png (346×240)

-d 磁盤


復制代碼
代碼如下:

$ dstat -d

20151030104618695.png (252×222)

顯示 cpu、磁盤等的詳細信息。


復制代碼
代碼如下:

$ dstat -cdl -D sda1

20151030104637015.png (486×412)

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 建德市| 雅江县| 巴中市| 怀安县| 株洲县| 新平| 隆安县| 浦江县| 鹤山市| 喜德县| 永兴县| 淮滨县| 闽清县| 承德县| 恩平市| 肃宁县| 罗甸县| 象州县| 和平区| 常德市| 玉屏| 射阳县| 思南县| 勐海县| 漾濞| 武乡县| 中西区| 建平县| 孙吴县| 宁化县| 三明市| 山西省| 米脂县| 泽库县| 宝兴县| 淅川县| 星子县| 城固县| 和田县| 井研县| 漳州市|