性能检测工具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





本文转自 模范生 51CTO博客,原文链接:http://blog.51cto.com/mofansheng/1784493,如需转载请自行联系原作者
目录
相关文章
|
4月前
|
缓存 监控 Linux
dstat工具使用
【4月更文挑战第2天】`dstat` 是Linux的系统监控工具,显示CPU、磁盘I/O、网络、内存使用等性能指标。安装命令(Yum/DNF):`sudo yum/dnf install -y dstat`。基本使用包括:默认数据显示(`dstat`)、自定义选项(-cdng/m)、定时刷新(`--interval`)、数据记录(`--output`)。还可监控特定磁盘、CPU核心、网络接口等。查阅文档获取完整功能。
52 2
dstat工具使用
|
4月前
|
监控 Linux
掌握Linux top命令:优化系统性能的关键
总之,掌握Linux top命令对于优化系统性能至关重要。通过实时监控系统资源、查看进程列表、了解CPU和内存使用情况,你可以有效地调整系统配置,提高系统的响应速度和稳定性。
64 0
|
存储 监控 网络协议
Linux:系统性能监控工具-tsar安装和使用
Linux:系统性能监控工具-tsar安装和使用
1739 0
Linux:系统性能监控工具-tsar安装和使用
|
tengine Linux 应用服务中间件
[原创]systemtap脚本分析系统中dentry SLAB占用过高问题
利用systemtap脚本分析系统中dentry SLAB占用过高问题
14830 0
Nmon性能分析工具
一.简述 Nmon是一款计算机性能系统监控工具,因为它免费,体积小,安装简单,耗费资源低,广泛应用于AIX和Linux系统。nmon的使用需要2部分:nmon采集数据和nmon_analyzer可视化分析数据 二.
2935 0