linux性能分析工具dstat是怎样的
发表于:2026-11-03 作者:千家信息网编辑
千家信息网最后更新 2026年11月03日,本篇文章给大家分享的是有关linux性能分析工具dstat是怎样的,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。linux性能分析图表d
千家信息网最后更新 2026年11月03日linux性能分析工具dstat是怎样的
本篇文章给大家分享的是有关linux性能分析工具dstat是怎样的,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。
linux性能分析图表
dstat概述
linux虽然有iostat或vmstat相关工具,dstat提供另一种可以监控磁盘及CPU或网络等性能瓶颈的全新方法。可以丰富分析诊断操作系统性能故障手段。
前提条件
[root@three57 ~]# more /etc/redhat-release Red Hat Enterprise Linux Server release 6.8 (Santiago)
[root@three57 ~]# dstat -VDstat 0.7.0
dstat语义
[root@three57 ~]# dstat --helpUsage: dstat [-afv] [options..] [delay [count]]Versatile tool for generating system resource statisticsDstat options: -c, --cpu enable cpu stats -C 0,3,total include cpu0, cpu3 and total -d, --disk enable disk stats -D total,hda include hda and total -g, --page enable page stats -i, --int enable interrupt stats -I 5,eth3 include int5 and interrupt used by eth3 -l, --load enable load stats -m, --mem enable memory stats -n, --net enable network stats -N eth2,total include eth2 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 -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 --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 --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 filedelay is the delay in seconds between each update (default: 1)count is the number of updates to display before exiting (default: unlimited)
dstat命令示例
2,默认显示分为5个部分第一部分 cpu部分第二部分 磁盘读写第三部分 网卡发送及接收第四部分 换页换出第五部分 上下文切换及中断[root@three57 ~]# dstat----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| 76k 47k| 0 0 | 0 1B| 29 825 0 0 100 0 0 0| 0 0 | 66B 826B| 0 0 | 40 94 0 0 100 0 0 0| 0 0 | 66B 346B| 0 0 | 11 37 0 0 100 0 0 0| 0 0 | 66B 346B| 0 0 | 33 92 0 0 99 1 0 0| 0 56k| 66B 346B| 0 0 | 20 47 0 1 99 0 0 0| 0 0 | 66B 346B| 0 0 | 35 95 0 0 100 0 0 0| 0 0 | 66B 346B| 0 0 | 14 46 0 0 100 0 0 0| 0 0 | 66B 346B| 0 0 | 33 92 0 0 100 0 0 0| 0 0 | 66B 346B| 0 0 | 13 41 0 0 100 0 0 0| 0 0 | 66B 346B| 0 0 | 32 93 0 0 100 0 0 0| 0 0 | 66B 346B| 0 0 | 15 40 1 0 99 0 0 0| 0 0 | 66B 346B| 0 0 | 34 93 0 0 100 0 0 0| 0 0 | 66B 346B| 0 0 | 11 373,显示文件系统[root@three57 ~]# dstat --fs--filesystem-files inodes 2752 37079 2752 37079 2752 37079 2752 37079 2752 37079 2752 37079 2752 37079 2752 37079 ^C[root@three57 ~]# 4,显示系统负载[root@three57 ~]# dstat --load---load-avg--- 1m 5m 15m 0.07 0.12 0.170.07 0.12 0.170.07 0.12 0.170.07 0.12 0.17^C[root@three57 ~]# 5,显示内存[root@three57 ~]# dstat --mem------memory-usage----- used buff cach free 540M 56.1M 1169M 113M 540M 56.1M 1169M 113M 540M 56.1M 1169M 113M 540M 56.1M 1169M 113M^C 6,显示进程 [root@three57 ~]# dstat --proc---procs---run blk new 0 0 0.6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0^C[root@three57 ~]# 7,显示时间[root@three57 ~]# dstat --time----system---- date/time 18-11 23:21:0918-11 23:21:1018-11 23:21:1118-11 23:21:1218-11 23:21:1318-11 23:21:1418-11 23:21:1518-11 23:21:1618-11 23:21:17^C[root@three57 ~]# [root@three57 ~]# dstat --time --mem----system---- ------memory-usage----- date/time | used buff cach free18-11 23:21:37| 540M 56.1M 1169M 113M18-11 23:21:38| 540M 56.1M 1169M 113M18-11 23:21:39| 540M 56.1M 1169M 113M18-11 23:21:40| 540M 56.1M 1169M 113M^C8,显示opoch[root@three57 ~]# dstat --time --mem --epoch----system---- ------memory-usage----- --epoch--- date/time | used buff cach free| epoch 18-11 23:22:19| 540M 56.1M 1169M 113M|157409053918-11 23:22:20| 540M 56.1M 1169M 113M|157409054018-11 23:22:21| 540M 56.1M 1169M 113M|157409054118-11 23:22:22| 540M 56.1M 1169M 113M|1574090542^C9,显示aio[root@three57 ~]# dstat --time --aio----system---- async date/time | #aio18-11 23:22:50|2661B18-11 23:22:51|2661B18-11 23:22:52|2661B18-11 23:22:53|2661B18-11 23:22:54|2661B^C10,显示ipc[root@three57 ~]# dstat --time --ipc----system---- --sysv-ipc- date/time |msg sem shm18-11 23:23:18| 0 2 518-11 23:23:19| 0 2 518-11 23:23:20| 0 2 5^C11,显示锁[root@three57 ~]# dstat --time --lock----system---- ---file-locks-- date/time |pos lck rea wri18-11 23:23:48| 33 5.0 0 3818-11 23:23:49| 33 5.0 0 3818-11 23:23:50| 33 5.0 0 3818-11 23:23:51| 33 5.0 0 38^C12,显示socket[root@three57 ~]# dstat --time --socket----system---- ------sockets------ date/time |tot tcp udp raw frg18-11 23:24:26|391 9 7 0 018-11 23:24:27|391 9 7 0 018-11 23:24:28|391 9 7 0 018-11 23:24:29|391 9 7 0 018-11 23:24:30|391 9 7 0 0^C13,显示tcp[root@three57 ~]# dstat --time --tcp----system---- ----tcp-sockets---- date/time |lis act syn tim clo18-11 23:24:52| 12 3 0 0 018-11 23:24:53| 12 3 0 0 018-11 23:24:54| 12 3 0 0 018-11 23:24:55| 12 3 0 0 018-11 23:24:56| 12 3 0 0 018-11 23:24:57| 12 3 0 0 018-11 23:24:58| 12 3 0 0 018-11 23:24:59| 12 3 0 0 0^C14,显示所有可用插件[root@three57 ~]# dstat --time --listinternal: aio, cpu, cpu24, disk, disk24, disk24old, epoch, fs, int, int24, io, ipc, load, lock, mem, net, page, page24, proc, raw, socket, swap, swapold, sys, tcp, time, udp, unix, vm/usr/share/dstat: battery, battery-remain, cpufreq, dbus, disk-util, fan, freespace, gpfs, gpfs-ops, helloworld, innodb-buffer, innodb-io, innodb-ops, lustre, memcache-hits, mysql-io, mysql-keys, mysql5-cmds, mysql5-conn, mysql5-io, mysql5-keys, net-packets, nfs3, nfs3-ops, nfsd3, nfsd3-ops, ntp, postfix, power, proc-count, rpc, rpcd, sendmail, snooze, thermal, top-bio, top-cpu, top-cputime, top-cputime-avg, top-io, top-latency, top-latency-avg, top-mem, top-oom, utmp, vm-memctl, vmk-hba, vmk-int, vmk-nic, vz-cpu, vz-io, vz-ubc, wifi15,重定向到一个文件[root@three57 ~]# dstat --time --aio --output /dstat.log----system---- async date/time | #aio18-11 23:27:33|2661B18-11 23:27:34|2661B18-11 23:27:35|2661B18-11 23:27:36|2661B18-11 23:27:37|2661B18-11 23:27:38|2661B18-11 23:27:39|2661B18-11 23:27:40|2661B18-11 23:27:41|2661B^C[root@three57 ~]# more /dstat.log "Dstat 0.7.0 CSV output""Author:","Dag Wieers",,,,"URL:","http://dag.wieers.com/home-made/dstat/""Host:","three57",,,,"User:","root""Cmdline:","dstat --time --aio --output /dstat.log",,,,"Date:","18 Nov 2019 23:27:33 CST""system","async""date/time","#aio"18-11 23:27:33,2661.018-11 23:27:34,2661.018-11 23:27:35,2661.018-11 23:27:36,2661.018-11 23:27:37,2661.018-11 23:27:38,2661.018-11 23:27:39,2661.018-11 23:27:40,2661.018-11 23:27:41,2661.0
以上就是linux性能分析工具dstat是怎样的,小编相信有部分知识点可能是我们日常工作会见到或用到的。希望你能通过这篇文章学到更多知识。更多详情敬请关注行业资讯频道。
性能
部分
分析
工具
性能分析
系统
文件
更多
知识
磁盘
篇文章
实用
操作系统
上下
上下文
个部
全新
内存
前提
命令
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
互联网与科技
互联网佳科技有限公司
互联网和科技技术
互联网核心科技是什么
互联网科技有限公司图片
互联网 科技
北京互联网科技
高科技与互联网
丰台科技园 互联网
互联网科技上市公司
互联网科技咨询
重庆科技学院互联网
互联网金融监管科技
互联网软件和科技
青岛科技大学互联网大赛研究生
和信科技工业互联网
伊宁互联网科技做什么的
上海京穆互联网科技有限公司
广州三三互联网科技有限公司
中国主要互联网科技公司
广州万易互联网科技有限公司
互联网科技公司经营范围
为想互联网科技怎么样
互联网高科技股票
成都仁贤领冠互联网科技有限公司
阿里巴巴算科技企业还是互联网
福建科技产业互联网发展
重庆互联网医院沙龙医盟信息科技
广州千川互联网科技有限公司
图游互联网科技