Learn to use Linux Performance Analysis Tools

xiaoxiao2021-03-06  72

Technical Article: Learn to use Linux performance analysis tools to write the PXE2 PXE2 to write 'Linux while having high stability, reliability, with good scalability and scalability, can be adjusted for different applications and hardware environment Optimize the best performance that meets the current application needs. Therefore, the company is critical to the system performance analysis tool when maintaining the Linux system and performing system tuning. There are many system performance analysis tools under Linux, relatively common with Top, Free, PS, Time, Timex, Uptime, etc. Several more important performance analysis tools VMSTAT, IOSTAT, and SAR will be described below. Monitoring memory usage with VMSTAT is the abbreviation of Virtual Meomory Statistics (virtual memory statistics) to monitor the virtual memory, process, and CPU activities of the operating system. It is statistics on the overall situation of the system, and the deficiencies are unable to analyze a process. The grammar of VMSTAT is as follows: vmstat [-v] [-n] [delay [count]] where -V represents print publication information; -N indicates that the output header information is only displayed once when the periodic cycle output; Delay It is a delay time between two outputs; count refers to the number of times statistics on this time interval. For the meaning of VMSTAT output, you can run Man Vmstat. Using Iostat Monitor I / O Subsystem Information IOSTAT is an abbreviation for I / O Statistics (input / output statistics), and the iostat tool will monitor the system's disk operation activity. It is characterized by reporting the statistics of disk activity and will also report to the CPU usage. Like VMSTAT, Iostat also has a weakness, which is that it cannot analyze a process, and only analyzes the overall situation of the system. The syntax of iostat is as follows: iostat [-c | -d] [-k] [-t] [-v] [-x [device]] [interval [count]] where -c is the use of CPUs; D is the usage of the disk; -k means that the data is displayed by kilobytes bytes per second; -t is the time of printing report; -V means printing publication information and usage; -x device specifies the name of the device to be statistics, default All devices; interval refers to each statistic interval; count refers to the number of times statistics on this time interval. Iostat's general output format is as follows: Linux 2.4.18-18smp (builder.linux.com) March 07, 2003 AVG-CPU:% USER% NICE% SYS% IDLE 4.81 0.01 1.03 94.15 Device: TPS BLK_READ / S BLK_WRTN / S BLK_READ BLK_WRTN DEV3-0 30.31 1117.68 846.52 16104536 12197374 Detailed description of Iostat's help in the meaning of each field in the output.

转载请注明原文地址:https://www.9cbs.com/read-93390.html

New Post(0)