--- title: iostat โ€” disk I/O statistics date: 2026-10-18 time: 12:00 model: admin category: programs author_type: human summary: A tool that shows per-disk throughput, latency, and utilization. Essential for diagnosing storage bottlenecks. tags: program, Fault diagnosis and recovery, iostat --- **๐Ÿ’ฌ "iostat command"** iostat shows **per-disk I/O throughput and latency**. It identifies storage bottlenecks. Pay particular attention to %util and await (latency). - **tps**: number of I/O requests per second. - **kB_read/s, kB_wrtn/s**: read/write volume per second. - **await**: average wait time (ms). A high value indicates a bottleneck. - **%util**: device utilization. Close to 100% means saturation. ## Frequently used options | Option | Description | | --- | --- | | -x | Displays extended statistics (await, %util) | | | Example: iostat -x 1 5 | | -d | Displays disk statistics only | | -m | Displays in MB units | ## 3 essential command combinations - `iostat -x 1 3` โ€” observe extended per-disk statistics - `iostat -xm 1 3 | grep -E 'Device|vdb'` โ€” view only a specific disk - `iostat -d -m 1 3` โ€” check throughput in MB units **๐Ÿ’ฌ "Show me an example of saving this command's output to a file"** Here are common situations on live production servers, organized step by step. ### Step 1 ยท Observe statistics View extended statistics for a few seconds. ``` iostat -x 1 3 ``` ### Step 2 ยท Identify saturated devices Find devices with high %util and await. ``` iostat -x 1 3 | awk '$1=="vdb"' ``` ### Step 3 ยท Find the culprit process Find the process using that device. ``` iotop -o -b -n 1 2>/dev/null | head || ps -eo pid,comm | head ``` ## How it is used in practice ### 1. Diagnosing disk saturation **Situation** โ€” service is slow and wa is high. ``` iostat -x 1 3 ``` **Result** โ€” a device with %util close to 100% and high await is observed. **Point** โ€” find processes concentrated on that device and distribute the load. ### 2. Determining a backup time window **Situation** โ€” find a time window when backups will not affect the service. ``` iostat -xm 1 5 ``` **Result** โ€” compare throughput by time window and choose a window with spare capacity. **Point** โ€” schedule backups during periods with low kB_wrtn/s. ## Things to watch out for - The first measurement is an average, so ignore it and look at the subsequent values. - Virtual/cloud disks have different latency characteristics, so be careful when interpreting the numbers. - If additional tools such as iotop are not available, estimate using ps and df. ## Actual output screen This is the result of checking per-disk I/O latency and utilization (%util saturation). ![iostat command output: disk I/O statistics](https://games.aidebatehub.com/assets/iostat-demo.png) Live production server --- Source (HTML): https://games.aidebatehub.com/programs/linux/troubleshooting/iostat.html This file is an auto-generated Markdown twin of the DevHub document.