最新消息:阿啰哈,本人90后,目前单身,欢迎妹子们来撩!.(。→‿←。)

安装dstat(系统性能检测利器)

Commands 林志斌 698浏览
Dstat is a versatile replacement for vmstat, iostat, netstat and ifstat. Dstat overcomes some of their limitations and adds some extra features, more counters and flexibility. Dstat is handy for monitoring systems during performance tuning tests, benchmarks or troubleshooting. 

Dstat allows you to view all of your system resources in real-time, you can eg. compare disk utilization in combination with interrupts from your IDE controller, or compare the network bandwidth numbers directly with the disk throughput (in the same interval).
Features
  • 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 many external plugins to show how easy it is to add counters
  • 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 graphsyum

Ubuntu:
apt-get install dstat

CentOS:
yum install dstat

Options:

-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文件中
这个软件和vmstat很像, 不过和vmstat相比好像少了io部份的显示, dstat只能显示磁盘的吞吐量而不是显示负载情况, dstat和几乎所有监控软件一样, 只能对整个系统进行监控而不能对某一个进程或某一个程序进行深入分析. 我常使用的参数是dstat -cdlmnpsy, 做个别名链接alias dstat='dstat -cdlmnpsy'

示例: dstat -lcdnmspyt -N eth0 -D total,sda,sdb

安装Dstat(性能检测神器) - 卡书 - Self-Study

转载请注明:林志斌 » 安装dstat(系统性能检测利器)

发表评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址