性能检测工具dstat

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’


wKiom1dL9ejD9POEAACmYmgXffY838.jpg

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值