使用dstat

dstat的最简单形式:dstat

dstat默认输出示例

dstat

统计cpu,磁盘和网络

dstat -cdn

dstat 5 10

每5秒显示一次,总共刷新10次。

dstat-输出到文件

将输出发送到csv文件:

dstat --output /tmp/myoutput_stats.csv -cdn

dstat其他选项

Dstat options:
-c, --cpu enable cpu stats
-C 0,3,total include cpu0, cpu3 and total
-d, --disk enable disk stats
-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 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
-t, --time enable time/date output
-T, --epoch enable time counter (seconds since epoch)
-y, --sys enable system stats

安装dstat

在Ubuntu上安装dstat

sudo apt-get install dstat

在CentOS 6服务器上安装dstat

### 下载安装包
wget http://dag.wieers.com/packages/dstat/dstat-0.7.2-1.el6.rfx.noarch.rpm

### 安装rpm包
rpm -ihv dstat-0.7.2-1.el6.rfx.noarch.rpm

使用dstat监视Linux系统

Dstat是vmstat,iostat,netstat和ifstat的替代替换工具。
Dstat是功能丰富的监视工具,通常用于调整和基准测试系统性能。

dstat监控工具
日期:2019-04-29 03:18:07 来源:oir作者:oir