A more comprehensive monitoring tool dstat under Linux

1) Tool description

dstat is a tool used to replace vmstat, iostat netstat, nfsstat and ifstat commands. It is a versatile system information statistics tool. Compared with sysstat, dstat has a colorful interface. When manually observing the performance status, the data is more conspicuous and easy Observation; and dstat supports instant refresh, such as input dstat 3, which is collected every three seconds, but the latest data will be refreshed every second. Same as sysstat, dstat can also collect specified performance resources, such as dstat -c. Display CPU usage.
 Download the installation file dstat-0.6.7-1.el*.rf.noarch.rpm: http://dag.wieers.com/rpm/packages/dstat/

2) Software installation

# cd /tmp
# rz (Upload installation package)
# rpm -Uvh dstat-0.6.7-1.el*.rf.noarch.rpm
# which dstat
 /usr/bin/dstat

3) Use example

# dstat After the
 installation is complete, execute the dstat command. By default, it will collect the data of -cpu-,-disk-,-net-, -paging-, -system-, collected once a second. The default input of dstat is equal to the input of dstat -cdngy 1 or dstat -a 1. It is recommended to use date && dstat -tclmdny 60 to monitor once a minute (pay attention to adjust the width of the display, or remove the -t option).

4) dstat option

-c, -cpu show CPU status
-C 0,3,total include cpu0, cpu3 and total
-d, -disk show disk status
-D total,hda include hda and total
-g, -page enable page stats
-i,- interrupt enable stats int
-I. 5, INT5 and interrupt eth2 Used by the include eth2
-l, -load Load enable stats
-m, -mem display memory where
-n, -net display network conditions
-N eth1, total can specify the network interface
- p, -proc enable process stats
-s, -swap display swap status
-S swap1,total Multiple swaps can be specified
-t, -time enable time counter
-y, -sys enable system stats
-ipc Report IPC message queue and semaphore Usage
-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 Use -cdngy The default is to display
-f, -full Use -C, -D, -I, -N and -S to display
-v , -vmstat Use -pmgdsc -D to display
-integer show integer values
-nocolor disable colors (implies -noupdate)
-noheaders only display the header once and then not display it, it is useful when using redirection to write files
-noupdate disable intermediate updates
-output file is written to the CVS file.
This software is very similar to vmstat, but compared with vmstat, it seems that the io part of the display is missing. dstat can only display the throughput of the disk instead of the load. dstat and almost all monitoring software Similarly, it can only monitor the entire system and cannot perform in-depth analysis of a certain process or a certain program. The parameter I often use is dstat -cdlmnpsy, do alias link alias dstat='dstat -cdlmnpsy

image.png

Guess you like

Origin blog.51cto.com/593095349/2678769