您好,登錄后才能下訂單哦!
本篇內容主要講解“Linux dstat命令怎么使用”,感興趣的朋友不妨來看看。本文介紹的方法操作簡單快捷,實用性強。下面就讓小編來帶大家學習“Linux dstat命令怎么使用”吧!
dstat的安裝在這里介紹三種方式
使用”綠色版”安裝
wget http://dstat.sourcearchive.com/downloads/0.7.0/dstat_0.7.0.orig.tar.gz tar -xvzf dstat_0.7.0.orig.tar.gz cd dstat-0.7.0.orig/ #使用以下方式即可使用dstat ./dstat -V
使用rpm安裝
wget http://mirror.centos.org/centos/6/os/i386/Packages/dstat-0.7.0-2.el6.noarch.rpm rpm -ivh dstat-0.7.0-2.el6.noarch.rpm #直接在系統中調用dstat即可 dstat -V
使用yum安裝
yum install dstat
dstat命令支持的參數這里就不再贅述啦,以下介紹一下個人比較常用的兩種參數
dstat -tcdrlmn –top-cpu –top=mem #查看時間、CPU、磁盤讀寫、IO、負載、內存、網絡、最高的CPU占用和最高的內存占用
----system---- ----total-cpu-usage---- -dsk/total- --io/total- ---load-avg--- ------memory-usage----- -net/total- -most-expensive- --most-expensive- date/time |usr sys idl wai hiq siq| read writ| read writ| 1m 5m 15m | used buff cach free| recv send| cpu process | memory process 19-11 21:49:25| 0 0 100 0 0 0|1055B 1810B|0.02 0.07 |0.02 0.01 0| 236M 131M 2961M 4527M| 0 0 |kipmi0 0.0|sshd: root@p4488k 19-11 21:49:26| 0 0 100 0 0 0| 0 0 | 0 0 |0.02 0.01 0| 236M 131M 2961M 4527M| 398B 1532B| |sshd: root@p4488k 19-11 21:49:27| 0 0 100 0 0 0| 0 0 | 0 0 |0.02 0.01 0| 236M 131M 2961M 4527M| 352B 542B| |sshd: root@p4488k 19-11 21:49:28| 0 0 100 0 0 0| 0 0 | 0 0 |0.02 0.01 0| 236M 131M 2961M 4527M| 850B 542B| |sshd: root@p4488k 19-11 21:49:29| 0 0 100 0 0 0| 0 0 | 0 0 |0.02 0.01 0| 236M 131M 2961M 4527M| 256B 542B| |sshd: root@p4488k
dstat -cl -C 0,1,2,3,4,5,6,7 –top-cpu #查看8顆核心,每顆核心的使用情況和CPU使用情況
-------cpu0-usage--------------cpu1-usage--------------cpu2-usage--------------cpu3-usage--------------cpu4-usage--------------cpu5-usage--------------cpu6-usage--------------cpu7-usage------ ---load-avg--- -most-expensive- usr sys idl wai hiq siq:usr sys idl wai hiq siq:usr sys idl wai hiq siq:usr sys idl wai hiq siq:usr sys idl wai hiq siq:usr sys idl wai hiq siq:usr sys idl wai hiq siq:usr sys idl wai hiq siq| 1m 5m 15m | cpu process 0 0 100 0 0 0: 0 0 100 0 0 0: 0 0 100 0 0 0: 0 0 100 0 0 0: 0 0 100 0 0 0: 0 0 100 0 0 0: 0 0 100 0 0 0: 0 0 100 0 0 0|0.07 0.02 0|kipmi0 0.0 0 0 100 0 0 0: 0 0 100 0 0 0: 0 1 99 0 0 0: 0 0 100 0 0 0: 0 0 100 0 0 0: 0 0 100 0 0 0: 0 0 100 0 0 0: 0 0 100 0 0 0|0.07 0.02 0| 0 0 100 0 0 0: 0 0 100 0 0 0: 1 1 98 0 0 0: 0 0 100 0 0 0: 0 0 100 0 0 0: 0 0 100 0 0 0: 0 0 100 0 0 0: 0 0 100 0 0 0|0.07 0.02 0|kipmi0 0.1 0 1 99 0 0 0: 0 0 100 0 0 0: 2 0 98 0 0 0: 0 0 100 0 0 0: 0 0 100 0 0 0: 0 0 100 0 0 0: 0 0 100 0 0 0: 0 0 100 0 0 0|0.07 0.02 0|events/3 0.1 0 0 100 0 0 0: 0 0 100 0 0 0: 1 1 98 0 0 0: 0 0 100 0 0 0: 0 0 100 0 0 0: 0 0 100 0 0 0: 0 0 100 0 0 0: 0 0 100 0 0 0|0.07 0.02 0| 0 0 100 0 0 0: 0 0 100 0 0 0: 1 0 99 0 0 0: 0 0 100 0 0 0: 0 0 100 0 0 0: 0 0 100 0 0 0: 0 0 100 0 0 0: 0 0 100 0 0 0|0.07 0.02 0|kipmi0 0.1
到此,相信大家對“Linux dstat命令怎么使用”有了更深的了解,不妨來實際操作一番吧!這里是億速云網站,更多相關內容可以進入相關頻道進行查詢,關注我們,繼續學習!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。