Linux系统分析工具之nicstat,dstat(四)

上篇博文介绍了vmstat等工具的使用,在此继续介绍其他工具,此篇主要涉及2个工具nicstat和dstat,nicstat在之前有过详细介绍,具体请看nicstat的安装及使用,在此就不再重复了。下面来看dstat。
8> nicstat:网络流量监控利器.请移步至:nicstat的安装及使用
9> dstat:通用的系统资源统计工具
用法:
  dstat [-afv] [options..] [delay [count]]
描述:
  Dstat is a versatile replacement for vmstat, iostat and ifstat. Dstat overcomes some of the limitations and adds some extra features.
选项:
 -c,--cpu 			#显示CPU状态(system, user, idle, wait, hardware interrupt, software interrupt) 
 -C 0,3,total 			#指定其中一个CPU的状态或者全部
 -d,--disk 			#显示磁盘状态(read, write)
 -D total,sda 			#指定其中一个磁盘的状态或者全部的
 -g,--page			#显示page状态(page in, page out)
 -i,--int			#显示interrupt(中断)状态
 -l,--load			#显示平均负载(1 min, 5 mins, 15mins)
 -m,--mem			#显示内存状态(used, buffers, cache, free)
 -n,--net			#网络状态(receive, send)
 -N eth1,total			#指定相应的网卡设备或全部
 -p,--proc			#线程状态 (runnable, uninterruptible, new)
 -r,--io			#IO状态(read, write requests)
 -s,--swap			#交换空间状态(used, free)
 -S swap1,total 		#include swap1 and total (when using -s/--swap)
 -t,--time			#打印出来时间
 -T,--epoch			#打印出时间计算器(seconds since epoch)
 -y,--sys			#系统状态(interrupts, context switches

 --aio 				#异步I/O状态(asynchronous I/O)
 --fs   			#文件系统(open files, inodes)
 --ipc  			#enable ipc stats (message queue, semaphores, shared memory)
 --lock 			#文件锁 (posix, flock, read, write)
 --raw  			#enable raw stats (raw sockets)
 --socket			#套接字状态(total, tcp, udp, raw, ip-fragments)	
 --tcp  			#enable tcp stats (listen, established, syn, time_wait, close)
 --udp  			#enable udp stats (listen, active)
 --unix 			#enable unix stats (datagram, stream, listen, active)
 --vm   			#enable vm stats (hard pagefaults, soft pagefaults, allocated, free)

 --plugin-name 			#enable (external) plugins by plugin name, see PLUGINS for options
 --list 			#显示内部和外部的插件名字

 -a,--all			#等同于-cdngy (default)
 -f,--full			#等同于-C, -D, -I, -N and -S discovery lists            
 -v,--vmstat			#等同于-pmgdsc -D total
	
 --float			#force float values on screen (mutual exclusive with --integer)
 --integer			#force integer values on screen (mutual exclusive with --float)

 --bw,--blackonwhite		#change colors for white background terminal
 --nocolor			#disable colors (implies --noupdate)
 --noheaders			#disable repetitive headers
 --noupdate			#disable intermediate updates when delay > 1
 --output file			#导出结果CSV文件
 --profile			#show profiling statistics when exiting dstat
更多还有关于插件选项的使用及意义请参照官网手册http://dag.wieers.com/home-made/dstat/#documentation或$ man dstat
示例:(详情参照以上)
$ dstat
$ dstat 2 3
$ dstat -c 2 3
$ dstat --output abc.csv -c 2 3
到此:基础篇的工具基本已介绍完毕,其包含uptime top or htop mpstat iostat vmstat free ping nicstat dstat,之后总结时可能会做一个索引,方便查看。另后面会继续介绍中级篇的相关分析工具。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章