1.Download & install
download links forContos and Redhat :http://pkgs.repoforge.org/dstat/
The installation is simple, as follows:
2. instructions for use
After installation can be used,Dstat is very powerful, real-time monitoring of CPU, disk, network,IO, memory and other usage.
Direct useDstat, the default is to use-cdngyparameters, shown separatelyCPU,Disk,Net,page,systeminformation, the default is1sdisplays a piece of information. You can specify the time interval at which a message is displayed at the end, such asDstat 5is not5sshow a bar,Dstat 5said no5sshow a strip, show it altogetherTenarticle.
Some of the information shown below is explained below:
1. CPU:hiq,Siq are hard interrupt and soft interrupt number respectively.
2. System:int,CSW is the number of interrupts (interrupt) and context switches ( Context Switch )
All the others are well understood.
Common parameter options can be seen with Dstat--help
[Email protected] ~]# Dstat--help
Usage:dstat [-AFV] [options:] [Delay [Count]]
Versatile tool for generating system resource statistics
Dstat 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 to white background terminal
--nocolor Disable colors (implies--noupdate)
--noheaders Disable Repetitive headers
--noupdate Disable Intermediate Updates
--output file write CSV output to file
Delay is the delay in seconds between each update (DEFAULT:1)
Count is the number of updates to display before exiting (default:unlimited)
[Email protected] ~]#
If you want to monitor swap,process,sockets,filesystem and display the monitoring time
To output the results to a file you can add --output filename
The resulting CSV file can be opened in Excel and then generated by the chart.
Through dstat --list can view dstat All parameters that can be used, which internal Yes dstat / Usr/share/dstat functions, such as the ability to monitor power ( mysql ET.
The following plug-ins are not all directly available, and some rely on other packages, such as to monitor MySQL, you must install python to connect Some of the MySQL package.
If we can look at the current most consumed IO process and the most consuming block device io process can execute the following command:
The Dstat plug-in is used here , and more functions are needed for further excavation.
Reference: Http://articles.slicehost.com/2010/11/12/using-dstat-to-check-i-o-and-swap
Http://articles.slicehost.com/2010/11/12/using-dstat-with-scripts-and-external-modules
http://dag.wieers.com/home-made/dstat/#documentation
Https://www.youtube.com/watch?v=mmF3L-3Jun8
http://xuclv.blog.51cto.com/5503169/1159817
Use of Dstat