Dstat是一个取代vmstat、iostat、netstat、nfsstat和ifstat的通用性能监控工具。Dstat克服了这些工具的一些限制并且加入了一些额外的特征。当对系统做调优测试、基准测试或解决故障时,Dstat非常有用。
它的一些特征:
Combines vmstat, iostat, ifstat, netstat information and more Shows stats in exactly the same timeframe Enable/order counters as they make most sense during analysis/troubleshooting Modular design Written in python so easily extendable for the task at hand Easy to extend, add your own counters (please contribute those) Includes about 10 external plugins to show how easy it is to add counters Can summarize grouped block/network devices and give total numbers Can summarize grouped block/network devices and give total numbers Can show interrupts per device Very accurate timeframes, no timeshifts when system is stressed Shows exact units and limits conversion mistakes Indicate different units with different colors Show intermediate results when delay > 1 Allows to export CSV output, which can be imported in Gnumeric and Excel to make graphs
Dstat 的部分选项:
-c, --cpu 显示CPU状态信息
-C 0,3,total 包括cpu0, cpu3 and total
-d, --disk 显示磁盘状态信息
-D total,hda 包括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文件中