本篇文章給大家分享的是有關(guān)linux性能分析工具dstat是怎樣的,小編覺得挺實用的,因此分享給大家學(xué)習(xí),希望大家閱讀完這篇文章后可以有所收獲,話不多說,跟著小編一起來看看吧。
來安網(wǎng)站建設(shè)公司創(chuàng)新互聯(lián)公司,來安網(wǎng)站設(shè)計制作,有大型網(wǎng)站制作公司豐富經(jīng)驗。已為來安數(shù)千家提供企業(yè)網(wǎng)站建設(shè)服務(wù)。企業(yè)網(wǎng)站搭建\外貿(mào)營銷網(wǎng)站建設(shè)要多少錢,請找那個售后服務(wù)好的來安做網(wǎng)站的公司定做!
linux雖然有iostat或vmstat相關(guān)工具,dstat提供另一種可以監(jiān)控磁盤及CPU或網(wǎng)絡(luò)等性能瓶頸的全新方法??梢载S富分析診斷操作系統(tǒng)性能故障手段。
[root@three57 ~]# more /etc/redhat-release Red Hat Enterprise Linux Server release 6.8 (Santiago)
[root@three57 ~]# dstat -V Dstat 0.7.0
[root@three57 ~]# dstat --help Usage: dstat [-afv] [options..] [delay [count]] Versatile tool for generating system resource statistics Dstat 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 file delay is the delay in seconds between each update (default: 1) count is the number of updates to display before exiting (default: unlimited)
2,默認顯示分為5個部分 第一部分 cpu部分 第二部分 磁盤讀寫 第三部分 網(wǎng)卡發(fā)送及接收 第四部分 換頁換出 第五部分 上下文切換及中斷 [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 37 3,顯示文件系統(tǒng) [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,顯示系統(tǒng)負載 [root@three57 ~]# dstat --load ---load-avg--- 1m 5m 15m 0.07 0.12 0.17 0.07 0.12 0.17 0.07 0.12 0.17 0.07 0.12 0.17^C [root@three57 ~]# 5,顯示內(nèi)存 [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:09 18-11 23:21:10 18-11 23:21:11 18-11 23:21:12 18-11 23:21:13 18-11 23:21:14 18-11 23:21:15 18-11 23:21:16 18-11 23:21:17^C [root@three57 ~]# [root@three57 ~]# dstat --time --mem ----system---- ------memory-usage----- date/time | used buff cach free 18-11 23:21:37| 540M 56.1M 1169M 113M 18-11 23:21:38| 540M 56.1M 1169M 113M 18-11 23:21:39| 540M 56.1M 1169M 113M 18-11 23:21:40| 540M 56.1M 1169M 113M^C 8,顯示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|1574090539 18-11 23:22:20| 540M 56.1M 1169M 113M|1574090540 18-11 23:22:21| 540M 56.1M 1169M 113M|1574090541 18-11 23:22:22| 540M 56.1M 1169M 113M|1574090542^C 9,顯示aio [root@three57 ~]# dstat --time --aio ----system---- async date/time | #aio 18-11 23:22:50|2661B 18-11 23:22:51|2661B 18-11 23:22:52|2661B 18-11 23:22:53|2661B 18-11 23:22:54|2661B^C 10,顯示ipc [root@three57 ~]# dstat --time --ipc ----system---- --sysv-ipc- date/time |msg sem shm 18-11 23:23:18| 0 2 5 18-11 23:23:19| 0 2 5 18-11 23:23:20| 0 2 5^C 11,顯示鎖 [root@three57 ~]# dstat --time --lock ----system---- ---file-locks-- date/time |pos lck rea wri 18-11 23:23:48| 33 5.0 0 38 18-11 23:23:49| 33 5.0 0 38 18-11 23:23:50| 33 5.0 0 38 18-11 23:23:51| 33 5.0 0 38^C 12,顯示socket [root@three57 ~]# dstat --time --socket ----system---- ------sockets------ date/time |tot tcp udp raw frg 18-11 23:24:26|391 9 7 0 0 18-11 23:24:27|391 9 7 0 0 18-11 23:24:28|391 9 7 0 0 18-11 23:24:29|391 9 7 0 0 18-11 23:24:30|391 9 7 0 0^C 13,顯示tcp [root@three57 ~]# dstat --time --tcp ----system---- ----tcp-sockets---- date/time |lis act syn tim clo 18-11 23:24:52| 12 3 0 0 0 18-11 23:24:53| 12 3 0 0 0 18-11 23:24:54| 12 3 0 0 0 18-11 23:24:55| 12 3 0 0 0 18-11 23:24:56| 12 3 0 0 0 18-11 23:24:57| 12 3 0 0 0 18-11 23:24:58| 12 3 0 0 0 18-11 23:24:59| 12 3 0 0 0^C 14,顯示所有可用插件 [root@three57 ~]# dstat --time --list internal: 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, wifi 15,重定向到一個文件 [root@three57 ~]# dstat --time --aio --output /dstat.log ----system---- async date/time | #aio 18-11 23:27:33|2661B 18-11 23:27:34|2661B 18-11 23:27:35|2661B 18-11 23:27:36|2661B 18-11 23:27:37|2661B 18-11 23:27:38|2661B 18-11 23:27:39|2661B 18-11 23:27:40|2661B 18-11 23:27:41|2661B^C [root@three57 ~]# more /dstat.log "Dstat 0.7.0 CSV output" "Author:","Dag Wieers <dag@wieers.com>",,,,"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.0 18-11 23:27:34,2661.0 18-11 23:27:35,2661.0 18-11 23:27:36,2661.0 18-11 23:27:37,2661.0 18-11 23:27:38,2661.0 18-11 23:27:39,2661.0 18-11 23:27:40,2661.0 18-11 23:27:41,2661.0
以上就是linux性能分析工具dstat是怎樣的,小編相信有部分知識點可能是我們?nèi)粘9ぷ鲿姷交蛴玫降?。希望你能通過這篇文章學(xué)到更多知識。更多詳情敬請關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道。
網(wǎng)頁題目:linux性能分析工具dstat是怎樣的
URL標題:http://jinyejixie.com/article0/jjigio.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供做網(wǎng)站、微信公眾號、App開發(fā)、企業(yè)網(wǎng)站制作、外貿(mào)網(wǎng)站建設(shè)、網(wǎng)站策劃
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)