dstat的插件


dsata的常规用法如下所示表示每3s刷新一次结果,总共输出10次
[root@localhost tomcat]# dstat 3 10
You did not select any stats, using -cdngy by default.
----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system--
usr sys idl wai hiq siq| read  writ| recv  send|  in   out | int   csw
  0   0 100   0   0   0|2293B 8743B|   0     0 |   0     0 | 101   107
  0   0 100   0   0   0|   0     0 | 305B  517B|   0     0 | 142   200
  0   0 100   0   0   0|   0     0 | 392B  346B|   0     0 | 119   147 ^C

但是在下面这个目录中有一些写好的dstat的脚步可以利用
[root@localhost tomcat]# cd  /usr/share/dstat/
例如dstat_top_cpu.py 这个脚步的用法如下所示:

[root@localhost tomcat]# dstat -g -l -m -s --top-cpu
---paging-- ---load-avg--- ------memory-usage----- ----swap--- -most-expensive-
  in   out | 1m   5m  15m | used  buff  cach  free| used  free|  cpu process
   0     0 |   0    0    0|5904M 10.4M 3532M  246G|   0  4096M|kworker/6:1-c0.0
   0     0 |   0    0    0|5909M 10.4M 3532M  246G|   0  4096M|
   0     0 |   0    0    0|5909M 10.4M 3532M  246G|   0  4096M|
   0     0 |   0    0    0|5909M 10.4M 3532M  246G|   0  4096M|
   0     0 |   0    0    0|5909M 10.4M 3532M  246G|   0  4096M|
   0     0 |   0    0    0|5909M 10.4M 3532M  246G|   0  4096M|                ^C
[root@localhost tomcat]#
例如
dstat_dstat_cpu.py 的这个脚本实现的子命令如下:

[root@localhost dstat]# dstat --dstat-cpu
--dstat-cpu---
user syst tota
   0    0    0
   0    0    0
   0    0    0^C
[root@localhost dstat]#
常用的有
--disk-util 显示磁盘的使用率
--freespace 磁盘空闲率
--proc-count正在运行的程序数量
--top-bio块IO 最大的进程
--top-cpu cpu占用率最大的进程
--top-io io最大进程
--top-mem 占用内存最多的进程
dstat -g -l -m -s --top-mem
dstat -c -y -l --proc-count --top-cpu

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值