Iostat Command Notes

Source: Internet
Author: User
Tags disk usage

Iostat: For output CPU and disk I/O-related statistics
First, the command format:
iostat[parameters [TIME] [number]
[[Email Protected]_a ~]# iostat 2 4 displays CPU and disk usage information 4 times every two seconds.]
Linux 2.6.32-573.el6.x86_64 (nginx_a) January 06, 2018 _x86 -(4 CPU)

AVG-CPU:%user%nice%system%iowait%steal%idle
0.03 0.00 0.13 0.03 0.00 99.81

Device:tps blk_read/s blk_wrtn/s Blk_read Blk_wrtn
SCD0 0.00 0.15 0.00 42936 0
SDA 0.35 5.58 5.57 1650178 1647636

AVG-CPU:%user%nice%system%iowait%steal%idle
0.00 0.00 0.25 0.00 0.00 99.75

Device:tps blk_read/s blk_wrtn/s Blk_read Blk_wrtn
SCD0 0.00 0.00 0.00 0 0
SDA 0.00 0.00 0.00 0 0

AVG-CPU:%user%nice%system%iowait%steal%idle
0.00 0.00 0.13 0.00 0.00 99.87

Device:tps blk_read/s blk_wrtn/s Blk_read Blk_wrtn
SCD0 0.00 0.00 0.00 0 0
SDA 0.00 0.00 0.00 0 0

AVG-CPU:%user%nice%system%iowait%steal%idle
0.00 0.00 0.13 0.00 0.00 99.87

Device:tps blk_read/s blk_wrtn/s Blk_read Blk_wrtn
SCD0 0.00 0.00 0.00 0 0
SDA 0.00 0.00 0.00 0 0

Second, the command parameters:
-C Display of CPU usage
-D Display disk usage
-K displays in kilobytes
-m displays in units of M.
-V Display version information
-X to display detailed information
[Email protected]_a ~]# Iostat
Linux 2.6.32-573.el6.x86_64 (nginx_a) January 06, 2018 _x86 (4 CPU)

AVG-CPU:%user%nice%system%iowait%steal%idle
0.03 0.00 0.13 0.03 0.00 99.81

Device:tps blk_read/s blk_wrtn/s Blk_read Blk_wrtn
SCD0 0.00 0.15 0.00 42936 0
SDA 0.35 5.61 5.59 1650162 1644292

%user: Percentage of CPU used at the user level
Percentage of CPU used by%nice:nice operations
%system: Percentage of CPU used at the system level (kernel)
%iowait:cpu percent occupied when waiting for hardware I/O
%steal: The percentage of the virtual CPU's unconscious wait time when the hypervisor maintains a second virtual processor
%idle:cpu Percentage of space time
Note: If the%iowait value is too high, indicating that there is a bottleneck in hard disk I/O, if the%idle value is too high, indicating that the CPU is idle, if the%idle value is too high and the system is running slower, it may be because the CPU needs to wait to allocate memory, memory problems, if the I%idle Indicates that CPU is in a high load state CPU processing ability is weak, the most necessary problem in the system is CPU resources.
TPS: Number of I/OS requested per second
BLK_READ/S: Number of blocks read in per second
BLK_WRTN/S: Number of blocks written per second
Blk_read: Total number of blocks read in
BLK_WRTN: Total number of blocks written

[[Email protected]_a ~]# iostat-x Show Details
Linux 2.6.32-573.el6.x86_64 (nginx_a) January 06, 2018 _x86 (4 CPU)

AVG-CPU:%user%nice%system%iowait%steal%idle
0.03 0.00 0.13 0.03 0.00 99.81

device:rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await SVCTM%util
Scd0 0.03 0.00 0.00 0.00 0.15 0.00 99.62 0.00 3.32 2.97 0.00
SDA 0.04 0.49 0.14 0.21 5.60 5.58 31.79 0.00 13.23 6.98 0.25

RRQM/S: Number of Merge read operations per second
WRQM/S: The number of merge write operations per second
R/S: Number of read operations completed per second
W/S: Number of write operations completed per second
RSEC/S: Number of Read sectors per second
WSEC/S: Number of write sectors per second
Avgrq-sz: Average per I/O data size
Avgqu-sz: Average I/O Queue Length
Await: Average per I/O wait time
SVCTM: Average Per Device I/O operation processing time
%util: How much time per second is spent processing I/O operations

Note: If the%util value is too high, it indicates too many I/O requests, I/O is full load, if SVCTM basic and await are the same, I/O basically no wait time, if the await is greater than SVCTM, the wait time is much higher than the processing time, the queue is too long, the IO response is slow If the avgqu-sz is too high, the IO queue is too long and the IO response may be slow.

Iostat Command Notes

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.