Preface It is said that if the people doing operation and maintenance don’t have the skills, they would feel embarrassed to operate the server. Fortunately, I am not an operation and maintenance person. I have always claimed to be a developer. However, the operation and maintenance personnel of my current employer are so incompetent that they want me, who claims to be a developer, to roll up my sleeves and do it myself. Well, there is no way. I have to pick up the previous orders and start again~~~ When it comes to operation and maintenance, monitoring disks are indispensable. When it comes to disk monitoring, we have to talk about the iostat command. This article gives a detailed summary of the iostat command that I was once very familiar with. Command Details The iostat in Linux system is the abbreviation of I/O statistics. The iostat tool will monitor the disk operation activities of the system. It features reporting of disk activity statistics, and also reports on CPU usage. Like vmstat, iostat also has a weakness, which is that it cannot perform in-depth analysis on a specific process, but only analyzes the overall situation of the system. The common command format of iostat is as follows:
The command parameters are described as follows:
The following is a detailed summary of our commonly used usage methods. Use Case Command: Description: Refresh the display every 2 seconds and display 3 times Output: [user1@Test_Server ~]$ iostat -x Linux 3.10.0-693.2.2.el7.x86_64 (jellythink) 01/05/2019 _x86_64_ (1 CPU) avg-cpu: %user %nice %system %iowait %steal %idle 1.83 0.00 0.31 0.09 0.00 97.77 Device: rrqm/s wrqm/sr/sw/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util vda 0.03 0.78 0.24 1.38 12.64 20.67 41.01 0.02 10.98 55.50 3.17 0.71 0.12 Detailed output content:
Of course, the point of the iostat command is not to view the CPU, but to monitor disk performance.
Command: Output: [jelly@jellythink ~]$ iostat -d 2 3 Linux 3.10.0-693.2.2.el7.x86_64 (jellythink) 01/05/2019 _x86_64_ (1 CPU) Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn vda 1.62 12.64 20.67 337375593 551756524 Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn vda 1.00 0.00 8.00 0 16 Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn vda 0.00 0.00 0.00 0 0 Detailed output content:
Performance monitoring indicators Having said so much and seen so much system output, what fields do we need to pay attention to in daily operation and maintenance? Now let’s talk about the key points of this article. What output content should we pay attention to in order to determine whether this server has an IO performance bottleneck.
Finally, in addition to focusing on indicators, we also need to analyze in conjunction with the deployed business. For businesses with frequent random disk reads and writes, such as image access, databases, mail servers, etc., tps is the key point. For services with frequent sequential read and write operations that require the transmission of large blocks of data, such as video on demand and file synchronization, the focus is on disk throughput. Summarize This concludes the summary of the iostat command. In our daily operation and maintenance work, we need to conduct more analysis based on actual scenarios. As a tool, mastering the basic usage of iostat is the basis. I hope that through this article, everyone can master the basic usage of the iostat command. As for the later sublimation, you need to use it more, explore more and summarize more in your work. Well, the above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. If you have any questions, you can leave a message to communicate. Thank you for your support of 123WORDPRESS.COM. You may also be interested in:
|
<<: Example of using setInterval function in React
>>: Mysql multi-condition query statement with And keyword
1. Command Introduction The ipcs command is used ...
Table of contents Case 1: Case 2: Case 3: To summ...
Experimental environment A minimally installed Ce...
This article example shares the specific code of ...
Table of contents 1. Download MySQL 1.1 Download ...
Original address: http://www.webdesignfromscratch...
Table of contents Hidden Problems Solution to ada...
Table of contents Array destructuring assignment ...
Chapter 1 Source Code Installation The installati...
Take the deployment of https://gitee.com/tengge1/...
Using the CSS3 border-image property, you can set...
WeChat applet calculator example, for your refere...
1. Rendering2. Operation steps 1. Apply for Tence...
Table of contents Install Configuration Common Mi...
Table of contents What is Flattening recursion to...