dstat是一款很实用的实时监控小工具,它功能强大,操作简单,集成参数众多,它可以查看网络,CPU使用情况,硬盘,内存等系统信息;
编译安装:
工具下载地址:wget http://dstat.sourcearchive.com/downloads/0.7.2-2/dstat_0.7.2.orig.tar.gz
yum安装:
yum -y install dstat
常用实例:
加入 dstat -d参数可以显示硬盘此时的读read写writ信息:
如果想查看网络的使用情况可以使用参数dstat -n:
-
使用dstat -m 可以查看内存,包括正在使用资源,缓存资源,所剩资源:
dstat -s查看swap交换分区的使用情况以及剩余情况:
也可以查看系统时间:dstat -t
dstat -c 查看CPU的使用信息:
当然,使用-a也可以显示更多的信息
help:
-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