iostat

说明

The iostat command, when executed with any arguments, displays both the CPU and disk I/O utilization metrics.

选项说明

选项
说明

-c

displays the CPU utilization report

-d

displays the disk I/O utilization report

-y

omits the first report with statistics since system boot

-z

omits any devices for which there is no activity

-x

displays extra columns

The -x option displays extra columns, which include IOPS, as well as throughput metrics for performance characterization and latency analysis. Some the metrics displayed by the -x option are: average read and write request size, average I/O response time, and percentage of time the disk spent in processing I/O request.

输出列说明

列名
说明

tps

每秒的事务,称为 IOPS

kB_read/s

每秒读取的千字节数

kB_wrtn/s

每秒写入的千字节数

kB_read

读取的总千字节数

kB_wrtn

写入的总千字节数

实例演示

使用示例

不加 -N 和加 -N 结果对比

-x 选项输出结果说明

-x 输出结果

实验:判断是大 IO 还是小 IO

模拟磁盘写入

iostat 监控

计算 IO 大小

由计算结果可得出 IO 大小为 8K

Last updated