Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My laptop (no VM, just plain Ubuntu with encrypted home) freezes for 3 minutes a few times per day. During these 3 minutes, the disk LED indicates intense disk activity, and I can't even move the mouse or press CTRL-ALT-F1.

I want to use iotop to find out which process is causing this.
The problem with iotop is that it shows disk usage for all processes (huge table).
How do I limit iotop's output to only the first row?

The idea is to make iotop more efficient so that it manages to compute and write to the log file even when the system is super-slow, so letting iotop display the whole table and then grepping is not a solution.

share|improve this question
Is your hard disk an SSD disk? – Nils Oct 11 '11 at 20:51
No, normal disk. – Nicolas Raoul Oct 12 '11 at 3:41
So this is not the SSD-write-back problem. I had a similar problem on a CentOS workstation with an AMD-multi-core CPU. I pinned it down to the cpuspeed-kernel-module. Does the problem vanish if you disable the power-saving-features of the CPU? – Nils Oct 12 '11 at 19:52
up vote 3 down vote accepted

Not exactly what I was looking for but close: iotop -o

So I will use:

sudo nice -20 sudo iotop -tbod10 > ~/iotop.log
share|improve this answer

Use -a to accumulate usage and -o to only show processes that did IO:

iotop -ao
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.