Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install and use iostat tools under Linux

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to install and use iostat tools under Linux, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Iostat in the Linux system is an acronym for input / output statistics, and the iostat tool monitors the disk operation activity of the system. It is characterized by reporting disk activity statistics as well as CPU usage. Like vmstat, iostat has a weakness that it cannot analyze a process in depth, only the overall situation of the system. Iostat belongs to the sysstat software package. It can be installed directly with yum install sysstat.

Iostat syntax

Usage: iostat [options] [[]]

Description of common options:

-c: only display system CPU statistics, that is, output avg-cpu results separately, excluding device results.-d: output Device results separately, excluding cpu results-k cpu m: output results in units of kB/mB, not sectors-x: output more detailed statistics of io devices interval/count: interval time of each output, count indicates the number of outputs, without count indicates cyclic output

Description: more options to view using man iostat

Common examples

1. Iostat. The result is the statistics from the boot of the system to the current execution time.

Meaning of output:

Avg-cpu: overall cpu usage statistics. For multicore cpu, here is the average of all cpu. Focus on the iowit value, which indicates the time CPU uses to wait for the completion of the io request.

Device: IO statistics for each disk device. Each column has the following meanings:

Device: device name in sdX tps: number of IO read and write requests issued by the process per second KB_read/s: the amount of data read from the drive per second, in K. KB_wrtn/s: the amount of data written from the drive per second, in K. KB_read: the total amount of data read in K KB_wrtn: the total amount of data written in K.

2. Iostat-x-k-d 12. Every 1s output disk IO details, a total of 2 samples.

The above columns have the following meanings:

Rrqm/s: the number of read requests to the device that were merged per second The file system merges requests to read the same block (block) wrqm/s: the number of write requests to the device per second is merged r * s: the number of reads completed / s: the number of writes per second: rkB/s: read data per second (in kB) wkB/s: data written per second (in kB) avgrq-sz: average amount of data per IO operation (number of sectors is Avgqu-sz: average queue length of IO requests waiting for processing await: average waiting time per IO request (including waiting time and processing time) (in milliseconds) svctm: average processing time of each IO request (in milliseconds)% util: the ratio of time spent on IO operations in the cycle, that is, the rate of time that the IO queue is not empty

Focus on parameters

1. Iowait% indicates that CPU waits for IO as a percentage of the entire CPU cycle. If the iowait value exceeds 50%, or is significantly greater than% system,% user and% idle, there may be a problem with IO.

2. Avgqu-sz indicates the length of the disk IO queue, that is, the number of IO waits.

3. Await indicates the waiting time for each IO request, including waiting time and processing time

4. Svctm indicates the processing time of each IO request

5.% util indicates that the disk is busy. Generally, a value above 80% indicates that the disk may be busy.

Question: what is dm-0/1/2? How did you get here?

View disk information:

It is found that there is no dm at all, so how on earth did it come from?

According to what we can know:

The primary device numbers of dm-0, dm-1 and dm-2 are 253 (the device numbers reserved for local use by the linux kernel), and the secondary device numbers are 0,1,2, respectively. These devices are in / dev/mapper.

After seeing the detailed device names of dm-0, dm-1, and dm-2, you know that these three devices are lvm devices that belong to the centos logical volume group.

Now we have found the true meaning of dm.

These are all the contents of this article entitled "how to install and use iostat tools under Linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report