本篇内容主要讲解“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进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。