歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux技術 >> 性能檢測工具dstat

性能檢測工具dstat

日期:2017/3/3 12:18:07   编辑:Linux技術
dstat命令可以收集cpu、disk、net、system、內存、進程等系統信息;功能比vmstat強大,一條命令可以集成了uptime、vmstat、top等相關信息;
安裝dstat命令:yum install -y dstat
執行 dstat 命令,默認收集-cpu-、-disk-、-net-、-paging-、-system-的數據,一秒鐘收集一次。默認輸入 dstat 等於輸入了dstat -cdngy 1 或 dstat -a 1;
如果我們執行 dstat 5 命令的話,他就是每5秒收集一次信息。
同樣的 dstat 也可以收集指定的性能資源。使用 dstat -h 可以看到相應的參數。
[root@localhost ~]# dstat -h
Usage: dstat [-afv] [options..] [delay [count]]
Versatile tool for generating system resource statistics
Dstat options:
-c, --cpu enable cpu stats 顯示CPU狀態
-C 0,3,total include cpu0, cpu3 and total
-d, --disk enable disk stats 顯示磁盤狀態(讀/寫)
-D total,hda include hda and total -D 後可以指定某一個磁盤
-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 enable memory stats 顯示內存使用狀態
-n, --net enable network stats 網絡流量
-N eth1,total include eth1 and total 指定網絡接口
-p, --proc enable process stats 進程狀態
-r, --io enable io stats (I/O requests completed)
-s, --swap enable swap stats 交換分區狀態
-S swap1,total include swap1 and total 可以指定多個SWAP
-t, --time enable time/date output 顯示系統日期和時間
-T, --epoch enable time counter (seconds since epoch)
-y, --sys enable system stats 顯示系統信息狀態
--aio enable aio stats
--fs, --filesystem enable fs stats
--ipc enable ipc stats 報告IPC消息隊列和信號量的使用情況
--lock enable lock stats
--raw enable raw stats
--socket enable socket stats
--tcp enable tcp stats
--udp enable udp stats
--unix enable unix stats
--vm enable vm stats
--plugin-name enable plugins by plugin name (see manual)
--list list all available plugins 列出可用的插件
-a, --all equals -cdngy (default) 默認顯示
-f, --full automatically expand -C, -D, -I, -N and -S lists
-v, --vmstat equals -pmgdsc -D total 與vmstat執行的信息一樣;
--bw, --blackonwhite change colors for white background terminal
--float force float values on screen
--integer force integer values on screen
--nocolor disable colors (implies --noupdate)
--noheaders disable repetitive headers 只顯示一次表頭以後就不顯示了,使用重定向寫入文件時很有用
--noupdate disable intermediate updates
--output file write CSV output to file 寫入到CVS文件中
別名 alias dstat=’dstat -cdlmnpsy’



本文出自 “模范生的學習博客” 博客,請務必保留此出處http://mofansheng.blog.51cto.com/8792265/1784493
Copyright © Linux教程網 All Rights Reserved