CentOS under performance monitoring tools dstat

Original link: http://www.bkjia.com/Linuxjc/935113.html

Reference links: https://linux.cn/article-3215-1.html , http://lhflinux.blog.51cto.com/1961662/518868/

 

dstat is a can replace vmstat, iostat, netstat and multifunction products ifstat these commands. dstat overcome the limitations of these commands and adds some additional functionality, increased monitoring of items, also become more flexible. dstat can easily monitor the health of the system and for benchmarking and troubleshooting.

dstat lets you see in real time all the system resources, for example, you can compare disk utilization statistics by the current state of IDE controller, or directly to compare the throughput disk (in the same time interval) via the network bandwidth value.

Dstat form will provide a list of options and clear information to you to tell you what is the magnitude and display output unit. So better to avoid the confusion and false information. More importantly, it can make it easier for you to write plug-ins to the information you want to collect data, there has never been a way to expand.

The default output Dstat is specially designed for people to view real-time, but you can also output to a file details by CSV, or Excel and imported into Gnumeric spreadsheet is generated.

characteristic

  • A combination of vmstat, iostat, ifstat, netstat and more information
  • Real-time display statistics
  • By enabling the monitoring items in the analysis and troubleshooting and ordering
  • Modular design
  • Written using python, easier to expand an existing task
  • Easy to expand and add your counter (please contribute to that end)
  • Many extensions included speaks adding new monitoring project is very convenient
  • Statistics can be grouped block device / network device, and gives the total number of
  • You can display the current status of each device
  • Very accurate time accuracy, even if the high load is not delayed display system
  • And a display unit and accurately limits the conversion error range
  • Show different units with different colors
  • Display intermediate result delay of less than 1 second
  • It supports output CSV format and can be imported into Gnumeric and Excel to generate graphics

installation method

1. In centos may yum -y instatll dstat

2. Download the rpm package to install

 wget http://packages.sw.be/dstat/dstat-0.7.2-1.el5.rfx.noarch.rpm

 rpm -ivh dstat-0.7.2-1.el5.rfx.noarch.rpm

Instructions

Dstat basic usage is dstat input command, the output is as follows:

This is the default output display information:

By default, divided into five regions:


1, --total-cpu-usage ---- CPU usage

usr: The percentage of user space program;

sys: The percentage of system space program;

idel: idle percentage;

wai: Wait percentage of the disk I / O consumed;

hiq: Hard interruptions;

siq: soft interruptions;


2, -dsk / total- disk statistics

read: The total number of read

writ: total number of write


3, -net / total- network statistics

recv: Total received packet network

send: The total number of network contract


4, --- paging-- memory paging statistics

in: pagein (swapped)

out: page out (swapped out)

Note: The paging system activity. Paging refers to a system memory management techniques used to find the scene, a large paging indicates that the system is using a lot of swap space, usually when the system has been started when the swap space, it means that you have enough memory , or that is a dispersion value memory, ideally page in (swapped) and page out (swapped out) is 00.


5, - system-- information system

int: the number of interruptions

csw: context switching

NOTE: Interrupt (int) and context switches (CSW). This statistic makes sense only when there is a baseline for comparison. Higher statistics in this column usually indicates a large number of processes resulting in congestion, the need for the CPU concerned. Run some programs will run your server under normal circumstances, so that always show some value. 


 By default, dstat will refresh the data every second, has been refreshed and output, press Ctrl + C to exit "dstat";

 dstat There are many specific parameters, can be viewed through man dstat command,

Common parameters are as follows:

You can view dstat that can be used by all parameters dstat --list

  • -l: Displays load statistics
  • -m: display memory usage (including used, buffer, cache, free value)
  • -r: display I / O statistics
  • -s: display swap usage
  • -t: The current time is displayed in the first line
  • -fs: displays file system statistics (including the total number of files and inodes value)
  • -nocolor: do not display color (and sometimes helpful)
  • -socket: display network statistics
  • -tcp: show common TCP statistics
  • -udp: UDP interface display dynamic data and some of the current usage monitor

Of course, more than that usage, dstat comes with some plugins largely expanded its capabilities. You can see some of them to use by looking at / usr / share / dstat directory, commonly used are these:

  • --disk-util: display a disk busy time status
  • --freespace: Displays the current disk space usage
  • --proc-count: displays the number of running programs
  • --top-bio: indicates the maximum process block I / O
  • --top-cpu: graphically displays the maximum CPU usage of the process
  • --top-io: shows the maximum normal process I / O
  • --top-mem: displays take up memory processes

Application examples:

dstat default output monitor, report output time interval is 3 seconds, and the report output results 10

dstat 3 10

View all who are in occupied memory:

dstat -g -l -m -s --top-mem

Display some data about the loss of CPU resources:

dstat -c -y -l --proc-count --top-cpu

How to export a csv file

# dstat –output /tmp/sampleoutput.csv -cdn

NOTE: scv the output file, the windows can be opened with excel, and generate graphs;

 

Category: CentOS
Good text to the top follow me The paper collection
0
0
 
<< psalm: [turn] CentOS 6.5 Security Hardening and performance optimization
>> Next: [turn] Web performance pressure ApacheBench (ab) of test tools Detailed

Original link: http://www.bkjia.com/Linuxjc/935113.html

Reference links: https://linux.cn/article-3215-1.html , http://lhflinux.blog.51cto.com/1961662/518868/

 

dstat is a can replace vmstat, iostat, netstat and multifunction products ifstat these commands. dstat overcome the limitations of these commands and adds some additional functionality, increased monitoring of items, also become more flexible. dstat can easily monitor the health of the system and for benchmarking and troubleshooting.

dstat lets you see in real time all the system resources, for example, you can compare disk utilization statistics by the current state of IDE controller, or directly to compare the throughput disk (in the same time interval) via the network bandwidth value.

Dstat form will provide a list of options and clear information to you to tell you what is the magnitude and display output unit. So better to avoid the confusion and false information. More importantly, it can make it easier for you to write plug-ins to the information you want to collect data, there has never been a way to expand.

The default output Dstat is specially designed for people to view real-time, but you can also output to a file details by CSV, or Excel and imported into Gnumeric spreadsheet is generated.

characteristic

  • A combination of vmstat, iostat, ifstat, netstat and more information
  • Real-time display statistics
  • By enabling the monitoring items in the analysis and troubleshooting and ordering
  • Modular design
  • Written using python, easier to expand an existing task
  • Easy to expand and add your counter (please contribute to that end)
  • Many extensions included speaks adding new monitoring project is very convenient
  • Statistics can be grouped block device / network device, and gives the total number of
  • You can display the current status of each device
  • Very accurate time accuracy, even if the high load is not delayed display system
  • And a display unit and accurately limits the conversion error range
  • Show different units with different colors
  • Display intermediate result delay of less than 1 second
  • It supports output CSV format and can be imported into Gnumeric and Excel to generate graphics

installation method

1. In centos may yum -y instatll dstat

2. Download the rpm package to install

 wget http://packages.sw.be/dstat/dstat-0.7.2-1.el5.rfx.noarch.rpm

 rpm -ivh dstat-0.7.2-1.el5.rfx.noarch.rpm

Instructions

Dstat basic usage is dstat input command, the output is as follows:

This is the default output display information:

By default, divided into five regions:


1, --total-cpu-usage ---- CPU usage

usr: The percentage of user space program;

sys: The percentage of system space program;

idel: idle percentage;

wai: Wait percentage of the disk I / O consumed;

hiq: Hard interruptions;

siq: soft interruptions;


2, -dsk / total- disk statistics

read: The total number of read

writ: total number of write


3, -net / total- network statistics

recv: Total received packet network

send: The total number of network contract


4, --- paging-- memory paging statistics

in: pagein (swapped)

out: page out (swapped out)

Note: The paging system activity. Paging refers to a system memory management techniques used to find the scene, a large paging indicates that the system is using a lot of swap space, usually when the system has been started when the swap space, it means that you have enough memory , or that is a dispersion value memory, ideally page in (swapped) and page out (swapped out) is 00.


5, - system-- information system

int: the number of interruptions

csw: context switching

NOTE: Interrupt (int) and context switches (CSW). This statistic makes sense only when there is a baseline for comparison. Higher statistics in this column usually indicates a large number of processes resulting in congestion, the need for the CPU concerned. Run some programs will run your server under normal circumstances, so that always show some value. 


 By default, dstat will refresh the data every second, has been refreshed and output, press Ctrl + C to exit "dstat";

 dstat There are many specific parameters, can be viewed through man dstat command,

Common parameters are as follows:

You can view dstat that can be used by all parameters dstat --list

  • -l: Displays load statistics
  • -m: display memory usage (including used, buffer, cache, free value)
  • -r: display I / O statistics
  • -s: display swap usage
  • -t: The current time is displayed in the first line
  • -fs: displays file system statistics (including the total number of files and inodes value)
  • -nocolor: do not display color (and sometimes helpful)
  • -socket: display network statistics
  • -tcp: show common TCP statistics
  • -udp: UDP interface display dynamic data and some of the current usage monitor

Of course, more than that usage, dstat comes with some plugins largely expanded its capabilities. You can see some of them to use by looking at / usr / share / dstat directory, commonly used are these:

  • --disk-util: display a disk busy time status
  • --freespace: Displays the current disk space usage
  • --proc-count: displays the number of running programs
  • --top-bio: indicates the maximum process block I / O
  • --top-cpu: graphically displays the maximum CPU usage of the process
  • --top-io: shows the maximum normal process I / O
  • --top-mem: displays take up memory processes

Application examples:

dstat default output monitor, report output time interval is 3 seconds, and the report output results 10

dstat 3 10

View all who are in occupied memory:

dstat -g -l -m -s --top-mem

Display some data about the loss of CPU resources:

dstat -c -y -l --proc-count --top-cpu

How to export a csv file

# dstat –output /tmp/sampleoutput.csv -cdn

NOTE: scv the output file, the windows can be opened with excel, and generate graphs;

 

Guess you like

Origin www.cnblogs.com/seasonzone/p/11505882.html