Striving for greatness

Thoughts on emerging tech, open source, and life

The tool you wished exists actually does: iotop

You heard it here last, to use sog‘s catchphrase. Haven’t you always wanted to track down the runaway process that was sucking up all your disk I/O? Now you can, with iotop. It’s a simple Python script, not even a full-out application. iotop uses the I/O accounting in newer 2.6 kernels >=2.6.20 (check whether /proc/self/io exists to see whether you’ve got it enabled) and requires at least Python 2.5 for AF_NETLINK sockets. Here’s what it looks like (click for larger image):

iotop screenshot

It shows overall disk read and write in MB/s. Per-process, it shows disk read and write speeds as well as percentage of time spent swapping in and percentage of time spent while waiting on I/O. In other words, it rocks.

To install it on Gentoo:
emerge iotop

You might need to sync your tree because I just added it. It’s still got testing keywords, so if you’re running stable, do this:
echo =dev-lang/python-2.5* >> /etc/portage/package.keywords
echo sys-process/iotop >> /etc/portage/package.keywords


Written by Donnie Berkholz

June 26, 2008 at 10:26 am

Posted in Blog

Tagged with ,

12 Responses

Subscribe to comments with RSS.

  1. Someone hasn’t heard of atop.


    June 26, 2008 at 1:55 pm

  2. I installed it to take a look, and honestly I find it pretty ugly and harder to use with the way it displays things. For example its column labels are nonobvious, and less readable because they’re sort-of-abbreviated and have no spaces, and the same goes for the lack of separation between the units and the numbers in the data.

    Donnie Berkholz

    June 26, 2008 at 2:06 pm

  3. Wow, this is exactly what I’ve been wanting all this time!

    Regarding kernel options: I enabled TASKSTATS and its dependents, although probably only TASK_IO_ACCOUNTING is needed. Confusingly, the help text claims these options are experimental, even though they don’t depend on EXPERIMENTAL.

    Paul Collins

    June 28, 2008 at 8:36 pm

  4. missing info that would be very useful: disk seeks

    Marko Macek

    June 29, 2008 at 8:50 pm

  5. @Rudd-O

    atop?? gotta give it a try for sure


    thanks for the little utility
    I am really worried by the linuxdcpp client’s disk usage
    any comments on torrent / DC++ clients and disk usage by them??
    I think those small chunks really eat your disk



    July 1, 2008 at 2:32 pm

  6. This post isn’t really about disk usage or layout, just activity, so I don’t really have any comments on that. I don’t really use BitTorrent for anything.

    Donnie Berkholz

    July 1, 2008 at 3:04 pm

  7. I believe blktrace is good for figuring out what’s actually happening on the block device, although I have not used it myself.

    Paul Collins

    July 2, 2008 at 1:23 am

  8. Completely Off Topic, but couldn’t resist to ask.

    Did you get those fonts on a terminal running on Linux or on Mac?
    How did you get those on a Linux Box?

    Pradeep Singh

    July 7, 2008 at 1:09 am

  9. You have to buy them, and they’re expensive. TheSans Mono Condensed

    Donnie Berkholz

    July 7, 2008 at 1:14 am

  10. Hi Donnie,

    Amazing tool. I actually never felt the need for something like this, but now that it exists I can think of at least a handful of cases where it could be useful directly or indirectly. I imagine that the same infrastructure could be used for performance regression tests for example.


    Sidnei da Silva

    November 10, 2008 at 10:58 am

  11. Sidnei, thanks for the reminder that I have a blog, and I should write stuff on it. =)

    Donnie Berkholz

    November 10, 2008 at 11:01 am

  12. Nice info dude, after reading it, if run emerge iotop. this tool is The tool I wished exists , thx

    ammar wk

    November 23, 2008 at 11:38 pm

Comments are closed.

%d bloggers like this: