欢迎大家分享自己的文档,请点击查阅:分享方法,![]() 如果你喜欢这文章,可以点击文章结尾处百度分享,分享到你的各种社区收藏,或推荐给朋友……
Linux性能检测工具
一:安装
wget http://packages.sw.be/dstat/dstat-0.7.2-1.el5.rfx.noarch.rpm
rpm -ivh dstat-0.7.2-1.el5.rfx.noarch.rpm
二:使用
一秒钟收集一次。默认输入dstat等于输入了dstat -cdngy 1或dstat -a 1;
[root@s3 yum.repos.d]# dstat
You did not select any stats, using -cdngy by default.
----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system--
usr sys idl wai hiq siq| read writ| recv send| in out | int csw
1 5 93 0 0 0| 360B 10k| 0 0 | 0 0 |1003 207
0 0 99 1 0 0| 0 284k|2654B 2580B| 0 0 |1027 162
0 0 100 0 0 0| 0 0 | 719B 668B| 0 0 |1015 159
0 0 100 0 0 0| 0 0 | 294B 212B| 0 0 |1005 117
0 0 100 0 0 0| 0 260k| 230B 212B| 0 0 |1055 127
dstat 3他就是3秒收集一次信息。
2.同样的dstat也可以收集指定的性能资源;使用dstat -h可以看到相应的参数。
-c, --cpu 显示CPU情况
-C 0,3,total include cpu0, cpu3 and total
-d, --disk 显示磁盘情况
-D total,hda include hda and total
-g, --page enable page stats
-i, --int enable interrupt stats
-I 5,eth2 include int5 and interrupt used by eth2
-l, --load enable load stats
-m, --mem 显示内存情况
-n, --net 显示网络情况
-N eth1,total 可以指定网络接口
-p, --proc enable process stats
-s, --swap 显示swap情况
-S swap1,total 可以指定多个swap
-t, --time enable time counter
-y, --sys enable system stats
--ipc 报告IPC消息队列和信号量的使用情况
--lock enable lock stats
--raw enable raw stats
--tcp enable tcp stats
--udp enable udp stats
--unix enable unix stats
-M stat1,stat2 enable external stats
--mods stat1,stat2
-a, --all 使用-cdngy 缺省的就是这样显示
-f, --full 使用 -C, -D, -I, -N and -S 显示
-v, --vmstat 使用-pmgdsc -D 显示
--integer show integer values
--nocolor disable colors (implies --noupdate)
--noheaders 只显示一次表头以后就不显示了,使用重定向写入文件时很有用
--noupdate disable intermediate updates
--output file 写入到CVS文件中
dstat -cdlmnpsy
在1024×768的屏幕上正好全部显示出来
别名 alias dstat='dstat -cdlmnpsy'
转载请注明linux系统运维: |