sodcalculator

10 Tech How-To

How to Check if Disk Is Busy in Linux

Guide 10-44059 · Updated · Step by step

This guide shows you how to determine whether a disk is busy in Linux, which is essential for diagnosing slow performance, spotting I/O bottlenecks, and verifying that backups or large transfers are actually progressing. You’ll learn to use built-in command-line tools that report disk activity in real time, and how to interpret their output.

What You’ll Need

  • A Linux system with a terminal (any distribution works).
  • Basic familiarity with the command line.
  • Root or sudo access (required for some tools like iostat to show all devices).

Step-by-Step

  1. Open a terminal. Press Ctrl+Alt+T or find “Terminal” in your applications menu.
  2. Check if the sysstat package is installed. Run which iostat. If it returns a path (e.g., /usr/bin/iostat), you’re ready. If not, install it: on Debian/Ubuntu use sudo apt install sysstat; on Fedora/RHEL use sudo dnf install sysstat.
  3. Use iostat to see disk utilization. Run iostat -x 1 3. This shows extended statistics every second for 3 samples. Look at the %util column. A value near 100% means the disk is heavily busy; values below 50% indicate moderate activity. The await column (average I/O time in milliseconds) also helps: higher values suggest queuing.
  4. Use vmstat for a quick system-wide view. Run vmstat 1 5. Look at the bi (blocks in) and bo (blocks out) columns. Non-zero values indicate disk I/O is happening. The wa column (I/O wait time) shows the percentage of CPU time waiting for I/O; high values (e.g., >20%) often mean the disk is a bottleneck.
  5. Use iotop to see which processes are using the disk. Run sudo iotop. This interactive tool shows a list of processes with their I/O read/write rates. Press q to quit. If iotop is not installed, install it with your package manager (e.g., sudo apt install iotop).
  6. Use pidstat for per-process I/O (from sysstat). Run pidstat -d 1 5. The KB_rd/s and KB_wr/s columns show read/write rates per process. This helps identify which application is causing the disk activity.
  7. Check the kernel I/O counters. Run cat /proc/diskstats. This shows raw counters for each disk. Look at fields 6 (reads completed) and 10 (writes completed). If these numbers are increasing rapidly when you sample twice, the disk is busy.
  8. Use dstat for a combined view (if installed). Run dstat -d 1 5. This shows disk read/write totals per second. If both are zero, the disk is idle.

Common Mistakes

  • Misreading %util as a percentage of capacity. %util is the percentage of time the disk was busy serving requests, not how full it is. A disk can be 10% full but 100% busy.
  • Forgetting that iostat shows averages since boot unless you specify an interval. Without a delay argument, iostat shows cumulative averages, which may hide current spikes. Always use iostat 1 or similar to get live data.
  • Ignoring the difference between a single disk and a RAID array. On RAID, iostat may show each member disk separately. The %util of the array device (e.g., md0) is more relevant for overall performance.
  • Using top to check disk I/O. top does not show disk I/O by default. Use iotop or pidstat instead.

Tips

  • Combine tools: start with vmstat to see if I/O is happening, then use iotop to find the culprit process.
  • For a specific disk, use iostat -x /dev/sda 1 (replace sda with your device) to focus on that disk only.
  • Use watch -n 1 'iostat -x 1 1' to get a continuously updating view.
  • If you see high await but low %util, the disk may be suffering from many small random I/O requests rather than being saturated.
  • Remember that SSDs and HDDs have different expected await values; an SSD with await of 10ms is slow, while an HDD might be fine.

Troubleshooting

  • If iostat shows “command not found”, install sysstat as described in Step 2. If you cannot install it, use vmstat and /proc/diskstats instead.
  • If iotop requires root and you don’t have sudo, you can use pidstat -d (if sysstat is installed) without root, but it may only show your own processes. Alternatively, run sudo -i to get a root shell if you know the root password.
  • If vmstat shows all zeros even when you’re copying a large file, the file may be served from cache (page cache). Use sync to force writes to disk, or use dd if=/dev/zero of=/tmp/test bs=1M count=1024 conv=fdatasync to generate real I/O.
  • If %util stays at 100% but the system feels fast, you might be looking at a virtual disk (like a cloud volume) that reports 100% due to virtualization overhead. Cross-check with vmstat wa; if it’s low, the disk may not actually be a bottleneck.
  • If you need to see historical data, use sar (from sysstat) with sar -d 1 to collect samples over time, then review later.

Frequently Asked Questions

What does “busy” mean for a disk?

It means the disk is actively processing I/O requests. A disk can be busy even if it’s not transferring data at full speed, for example when seeking on an HDD.

Is %util from iostat the same as disk usage?

No. %util is the percentage of time the disk was busy during the sample interval. Disk usage refers to how much storage space is used.

Can I check disk busyness without root?

Yes. vmstat and iostat (without the -x flag) often work without root. iotop requires root, but pidstat -d may work for your own processes.

Why does iostat show multiple devices?

It lists all block devices, including partitions and logical volumes. Use iostat -x /dev/sda to filter to a specific device.

How do I tell if a disk is busy due to reads or writes?

Look at the rkB/s and wkB/s columns in iostat output. If reads dominate, the disk is busy reading; if writes dominate, it’s writing.

What is a normal %util value?

For a healthy system, %util below 50% is generally fine. Sustained values above 80% indicate the disk is likely a performance bottleneck.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →