监控linux系统资源推荐

Dstat是什么?可以说,Dstat是 vmstat,iostat,netstat,ifstat的结合体,dstat包含了他们所有没有的功能,并增加了一些额外的功能,Dstat是用于监测性能优化测试,故障诊断系统功能更方便.你可以使用Dstat可以查看实时系统的所有资源,将你的磁盘利用率同你的智能磁盘设备控制器的中断情况进行比对,或比较与磁盘吞吐量的网络带宽,都是数字比较直观。

Dstat 监测结果带颜色,看着更直观,方便。官方网站:http://packages.sw.be/dstat/

都是 rpm版本,我的是服务器是ubuntu,所以我下载源码编译的

nginx $ wget wget http://packages.sw.be/dstat/dstat-0.7.2-1.rfx.src.rpmnginx $ rpm -i dstat-0.7.2-1.rfx.src.rpm#可能会报错,不需要管。nginx $ cd rpmbuild/SOURCES/dstat-0.7.2nginx $ make installnginx $ dstat --help
Usage: dstat [-afv] [options..] [delay [count]]Versatile tool for generating system resource statisticsDstat 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,eth2 include int5 and interrupt used by eth2 -l, --load enable load stats -m, --mem enable memory stats -n, --net enable network stats -N eth1,total include eth1 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 --float force float values on screen --integer force integer values on screen --bw, --blackonwhite change colors for white background terminal --nocolor disable colors (implies --noupdate) --noheaders disable repetitive headers --noupdate disable intermediate updates --output file write CSV output to filedelay is the delay in seconds between each update (default: 1)count is the number of updates to display before exiting (default: unlimited)
nginx $ 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 0 2 97 1 0 0| 57k 167k| 0 0 | 0 0 | 40 74 0 0 100 0 0 0| 0 0 | 152B 826B| 0 0 | 8 10 0 0 100 0 0 0| 0 0 | 152B 346B| 0 0 | 9 13 0 0 100 0 0 0| 0 0 | 152B 346B| 0 0 | 8 8 0 0 100 0 0 0| 0 0 | 244B 346B| 0 0 | 9 8 0 1 99 0 0 0| 0 0 | 152B 346B| 0 0 | 8 8 0 0 100 0 0 0| 0 0 | 120B 346B| 0 0 | 8 8 0 1 99 0 0 0| 0 0 | 60B 346B| 0 0 | 9 12 0 0 100 0 0 0| 0 0 | 60B 346B| 0 0 | 7 8 0 1 99 0 0 0| 0 0 | 60B 346B| 0 0 | 8 8 0 0 100 0 0 0| 0 0 | 60B 346B| 0 0 | 6 8 0 0 100 0 0 0| 0 0 | 60B 346B| 0 0 | 7 8 0 0 100 0 0 0| 0 0 | 60B 346B| 0 0 | 8 13 0 0 100 0 0 0| 0 0 | 60B 346B| 0 0 | 6 9

常用参数:

nginx $ dstat -c --top-cpu -d --top-bio --top-latency

nginx $ dstat -cdlmnpsy

接受失败等于回归真实的自我,接受失败等于打破完美的面具,

监控linux系统资源推荐

相关文章:

你感兴趣的文章:

标签云: