linux性能分析工具dstat是怎样的
本篇文章给大家分享的是有关linux性能分析工具dstat是怎样的,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。
linux性能分析图表dstat概述linux虽然有iostat或vmstat相关工具,dstat提供另一种可以监控磁盘及CPU或网络等性能瓶颈的全新方法。可以丰富分析诊断操作系统性能故障手段。
前提条件[root@three57~]#more/etc/redhat-releaseRedHatEnterpriseLinuxServerrelease6.8(Santiago)
[root@three57~]#dstat-VDstat0.7.0dstat语义
[root@three57~]#dstat--helpUsage:dstat[-afv][options..][delay[count]]VersatiletoolforgeneratingsystemresourcestatisticsDstatoptions:-c,--cpuenablecpustats-C0,3,totalincludecpu0,cpu3andtotal-d,--diskenablediskstats-Dtotal,hdaincludehdaandtotal-g,--pageenablepagestats-i,--intenableinterruptstats-I5,eth3includeint5andinterruptusedbyeth3-l,--loadenableloadstats-m,--memenablememorystats-n,--netenablenetworkstats-Neth2,totalincludeeth2andtotal-p,--procenableprocessstats-r,--ioenableiostats(I/Orequestscompleted)-s,--swapenableswapstats-Sswap1,totalincludeswap1andtotal-t,--timeenabletime/dateoutput-T,--epochenabletimecounter(secondssinceepoch)-y,--sysenablesystemstats--aioenableaiostats--fs,--filesystemenablefsstats--ipcenableipcstats--lockenablelockstats--rawenablerawstats--socketenablesocketstats--tcpenabletcpstats--udpenableudpstats--unixenableunixstats--vmenablevmstats--plugin-nameenablepluginsbypluginname(seemanual)--listlistallavailableplugins-a,--allequals-cdngy(default)-f,--fullautomaticallyexpand-C,-D,-I,-Nand-Slists-v,--vmstatequals-pmgdsc-Dtotal--bw,--blackonwhitechangecolorsforwhitebackgroundterminal--floatforcefloatvaluesonscreen--integerforceintegervaluesonscreen--nocolordisablecolors(implies--noupdate)--noheadersdisablerepetitiveheaders--noupdatedisableintermediateupdates--outputfilewriteCSVoutputtofiledelayisthedelayinsecondsbetweeneachupdate(default:1)countisthenumberofupdatestodisplaybeforeexiting(default:unlimited)dstat命令示例
2,默认显示分为5个部分第一部分cpu部分第二部分磁盘读写第三部分网卡发送及接收第四部分换页换出第五部分上下文切换及中断[root@three57~]#dstat----total-cpu-usage-----dsk/total--net/total----paging-----system--usrsysidlwaihiqsiq|readwrit|recvsend|inout|intcsw00100000|76k47k|00|01B|2982500100000|00|66B826B|00|409400100000|00|66B346B|00|113700100000|00|66B346B|00|33920099100|056k|66B346B|00|20470199000|00|66B346B|00|359500100000|00|66B346B|00|144600100000|00|66B346B|00|339200100000|00|66B346B|00|134100100000|00|66B346B|00|329300100000|00|66B346B|00|15401099000|00|66B346B|00|349300100000|00|66B346B|00|11373,显示文件系统[root@three57~]#dstat--fs--filesystem-filesinodes275237079275237079275237079275237079275237079275237079275237079275237079^C[root@three57~]#4,显示系统负载[root@three57~]#dstat--load---load-avg---1m5m15m0.070.120.170.070.120.170.070.120.170.070.120.17^C[root@three57~]#5,显示内存[root@three57~]#dstat--mem------memory-usage-----usedbuffcachfree540M56.1M1169M113M540M56.1M1169M113M540M56.1M1169M113M540M56.1M1169M113M^C6,显示进程[root@three57~]#dstat--proc---procs---runblknew000.6000000000000000^C[root@three57~]#7,显示时间[root@three57~]#dstat--time----system----date/time18-1123:21:0918-1123:21:1018-1123:21:1118-1123:21:1218-1123:21:1318-1123:21:1418-1123:21:1518-1123:21:1618-1123:21:17^C[root@three57~]#[root@three57~]#dstat--time--mem----system----------memory-usage-----date/time|usedbuffcachfree18-1123:21:37|540M56.1M1169M113M18-1123:21:38|540M56.1M1169M113M18-1123:21:39|540M56.1M1169M113M18-1123:21:40|540M56.1M1169M113M^C8,显示opoch[root@three57~]#dstat--time--mem--epoch----system----------memory-usage-------epoch---date/time|usedbuffcachfree|epoch18-1123:22:19|540M56.1M1169M113M|157409053918-1123:22:20|540M56.1M1169M113M|157409054018-1123:22:21|540M56.1M1169M113M|157409054118-1123:22:22|540M56.1M1169M113M|1574090542^C9,显示aio[root@three57~]#dstat--time--aio----system----asyncdate/time|#aio18-1123:22:50|2661B18-1123:22:51|2661B18-1123:22:52|2661B18-1123:22:53|2661B18-1123:22:54|2661B^C10,显示ipc[root@three57~]#dstat--time--ipc----system------sysv-ipc-date/time|msgsemshm18-1123:23:18|02518-1123:23:19|02518-1123:23:20|025^C11,显示锁[root@three57~]#dstat--time--lock----system-------file-locks--date/time|poslckreawri18-1123:23:48|335.003818-1123:23:49|335.003818-1123:23:50|335.003818-1123:23:51|335.0038^C12,显示socket[root@three57~]#dstat--time--socket----system----------sockets------date/time|tottcpudprawfrg18-1123:24:26|391970018-1123:24:27|391970018-1123:24:28|391970018-1123:24:29|391970018-1123:24:30|3919700^C13,显示tcp[root@three57~]#dstat--time--tcp----system--------tcp-sockets----date/time|lisactsyntimclo18-1123:24:52|12300018-1123:24:53|12300018-1123:24:54|12300018-1123:24:55|12300018-1123:24:56|12300018-1123:24:57|12300018-1123:24:58|12300018-1123:24:59|123000^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----asyncdate/time|#aio18-1123:27:33|2661B18-1123:27:34|2661B18-1123:27:35|2661B18-1123:27:36|2661B18-1123:27:37|2661B18-1123:27:38|2661B18-1123:27:39|2661B18-1123:27:40|2661B18-1123:27:41|2661B^C[root@three57~]#more/dstat.log"Dstat0.7.0CSVoutput""Author:","DagWieers<dag@wieers.com>",,,,"URL:","http://dag.wieers.com/home-made/dstat/""Host:","three57",,,,"User:","root""Cmdline:","dstat--time--aio--output/dstat.log",,,,"Date:","18Nov201923:27:33CST""system","async""date/time","#aio"18-1123:27:33,2661.018-1123:27:34,2661.018-1123:27:35,2661.018-1123:27:36,2661.018-1123:27:37,2661.018-1123:27:38,2661.018-1123:27:39,2661.018-1123:27:40,2661.018-1123:27:41,2661.0
以上就是linux性能分析工具dstat是怎样的,小编相信有部分知识点可能是我们日常工作会见到或用到的。希望你能通过这篇文章学到更多知识。更多详情敬请关注亿速云行业资讯频道。
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。