Common performance analysis tools under Linux

Source: Internet
Author: User
Tags disk usage


1, vmstat--virtual meomory Statistics, can monitor the operating system's memory information, process status, CPU activity, etc., but unable to conduct in-depth analysis of a process

Vmstat
-n means that the output header information is displayed only once in the periodic loop output
Delay two times the output interval
Number of times that count is counted according to the time interval specified by delay
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/73/80/wKiom1X_rPTjsHG8AAKqegoXCf4309.jpg "title=" Vmstat.png "alt=" Wkiom1x_rptjshg8aakqegoxcf4309.jpg "/>proces
The R column represents the number of processes running and waiting for CPU time slices, which, if longer than the number of system CPUs, indicates a low CPU.
Column B indicates the number of processes waiting for the resource, such as waiting for IO or memory exchange
Memory
Swap indicates the memory size of the switch to memory swap partition, if it is not 0 or larger, as long as SI, so value is 0 is OK
The cache represents the amount of memory in the page cache, which is cached by the file system and frequently accessed files. If the value is large, it indicates that there are many cache files, if the bi in IO is small, the file system efficiency is better
Io
BI represents the total amount of data read from a block device-read disk
Bo represents the total amount of data written to the block device-write disk
System
In indicates the number of device interrupts per second observed at a certain time interval
CS indicates the number of context switches produced per table
The more a value above, the more CPU time is consumed by the kernel.

Cpu
US represents the percentage of CPU time consumed by the user process. When the value of us is higher, the user process consumes more CPU time, but longer than 50%, need to consider the optimization program
SY core consumes CPU time percentage
Us+sy reference value is 80%
* * * focus on R column && CPU value of us, sy column in Procs

2. Sar is an important tool for analyzing system performance.

Sar
-a displays the health of all resource devices in the system
-U Displays the load status of all CPUs in the system during the sampling time
-P Displays the usage of the specified CPU in the current system
-D Displays the usage status of all hard drive devices during the sampling time
-R Displays the usage status within the sampling time in the system
-B Displays the buffer's usage over the sample time
-V Show process, file, node, lock table Status
-N network running state. Parameters can be followed with dev,edev,sock,full.
DEV Displays network interface information, EDEV Display network error statistics, sock display socket information
-Q Displays the size of the running queue, which is the same as the average load of the system at the time
-R Displays the activity of the process over the sampling time
-Y Displays the activity of the end device during the sampling time
-W Displays the state of the system switching activity at the sampling time
-o filename means that the command result is stored in a binary format in a file.
Interval indicates the sample interval time
Count indicates the number of samples

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/80/wKiom1X_sUWAYMy3AAUezueaXJA659.jpg "title=" Sar.png "alt=" Wkiom1x_suwaymy3aauezueaxja659.jpg "/>


3, Iostat

Iostat
-C Display CPU usage
-D Display disk usage
-X device Specifies the name of the disk to be counted
Interval specifying two time intervals for statistics
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/73/7E/wKioL1X_tseCxXaYAAIRyNcv88M628.jpg "title=" Iostat.png "alt=" Wkiol1x_tsecxxayaairyncv88m628.jpg "/>

BLK_READ/S indicates the number of data blocks read per table
BLK_WRTN/S indicates the number of data blocks written per table
If the BLK_WRTN/S value is large, it means that disk writes are frequent, blk_read/s is large, and you can consider putting the data into memory.

4. Free

5. Top

6, Netstat

Common performance analysis tools under Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.