View the system's I/O using the Iostat command while using Iotop to sort through I/O statistics and trace to a detailed process

Source: Internet
Author: User

The first thing to check is whether the machine is using a large amount of swap space when it sees the CPU time that the I/O wait time is very high. Because the hard disk operation is much slower than RAM, when the system memory is exhausted. When you start using swap space, the performance of the system can be severely impacted.

No matter what you want to access the hard disk operation is finished with the hard disk I/O exchange. So. The first step in troubleshooting is to see if the memory is exhausted. The assumption is that the problem is resolved first.

Suppose there is plenty of RAM available. You need to understand that the process takes up most of the I/O operations.

When you are very difficult to figure out which process is consuming a large amount of I/O resources, use Iostat to find out which partition is running a large number of I/O operations.

Use of Iostat

The top display is the 1 cpu,64-bit systems. Linux kernel version number

AVG-CPU segment:
%user: Percentage of CPU used at User level execution
Percentage of CPU used by the%nice:nice operation
%system: Percentage of CPU used at System level (kernel) execution
%iowait:cpu CPU percentage consumed while waiting for hardware I/O
%IDLE:CPU Spare% of time
Device segment:

SDA: Device Name
TPS: The number of I/O requests sent per second.
BLK_READ/S: Amount of data read per second
BLK_WRTN/S: The amount of data written per second.
Blk_read: Total amount of data read in
BLK_WRTN: The total amount of data written

Iostat each of the parameters description:


-C displays only CPU statistics. The-D option is mutually exclusive.
-D displays only disk statistics. The and-c option is mutually exclusive.
-K Displays the number of disk requests per second, in the default block of units, in units.
-P Device | All
is mutually exclusive with the-X option to display statistics for block devices and system partitions. You can also specify a device name after-p, such as:
# iostat-p HDA
or Show All devices
# iostat-p All
-T prints the time to collect data when outputting data.
-V print version and help information.
-X Output extension information.

Add a number after Iostat

Iostat 4 indicates a refresh every 4 seconds

Use of Iotop



--version display version and exit
-H,--help Show help and then exit
-O,--only only shows the process or thread that is generating I/O. In addition to the transfer of participation. Can press O to take effect during execution.
-B,--batch non-interactive mode, typically used to log logs
-N NUM,--iter=num sets the number of times the monitor is measured. Default Infinity. Very useful in non-interactive mode
-D SEC,--delay=sec sets the interval for each monitor, defaults to 1 seconds, accepts non-cosmetic data such as 1.1
-P PID,--pid=pid specifies the process/thread to monitor
-u user,--user=user specifies to monitor the I/O generated by a user
-P,--processes show only processes, default Iotop show All Threads
-A,--accumulated shows cumulative I/O, not bandwidth
-K,--kilobytes uses KB units instead of human-friendly units. In non-interactive mode, script programming is practical.


-T,--time plus timestamp, non-interactive non-modal.
-Q,--quiet prohibits the first few lines, non-interactive mode.

There are three ways of specifying it.


-q Displays column names only on first monitor
-QQ never display column names.
-QQQ never displays I/O rollups.

View the system's I/O using the Iostat command while using Iotop to sort through I/O statistics and trace to a detailed process

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.