dstat--多功能系统资源监控工具。

dstat是一个用来替换 vmstat, iostat, netstat, nfsstat 和 ifstat 这些命令的工具,是一个全能系统信息统计工具。

安装dstat工具

在连网的环境下输入yum install dstat -y即可安装完成

执行命令dstat可以看到一下信息-cpu- ,-disk-,-net-,-paging-,-system-

150834102.png

输入dstat -c就是只看cpu的信息

151403253.png

输入dstat -d就是只看disk的信息

151403654.png

输入dstat -cd就是只可以看见cpu和disk的信息

151403117.png

从以上的查看结果中我总结出dstat后加的选项可以直接查看某项的信息

dstat有以下选项参数

-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文件中