HowTo install iotop on Debian Etch

In my previous post, I introduced iotop a very cool tool that displays a table of current I/O usage by processes on the system; just as useful as top, but for I/O monitoring. Unfortunately, iotop requires Python >= 2.5 and a Linux kernel >= 2.6.20 to work, and even if the installation is very simple as presented in my last post, getting it to run on older distributions might not be so easy. This post will show how you can run iotop on debian etch, describing how we can solve the dependencies and make iotop run just fine on etch.

1. Kernel

The default etch kernel is 2.6.18 and even if this will not block us from installing iotop, there will be no result unless we run a kernel newer than 2.6.20. Luckily debian etch provides etchnhalf that made available a newer kernel 2.6.24 in etch. Another approach is to build your own kernel of course, where you will probably use the latest stable version at that time. Still if you run this on many machines it will probably wise to use the etchnhalf kernel or pack your own deb with a newer one. For our needs we will just use the 2.6.24 etchnhalf kernel:

aptitude install linux-image-2.6.24-etchnhalf.1-amd64

if you run on amd64 debian etch, or:

aptitude install linux-image-2.6.24-etchnhalf.1-686

if you use the regular i386.

Note: there are some limitations that you should be aware of (please see debian etchnhalf release notes for more details), mainly there is no xen compatible image (meaning if you use xen don’t do this), and missing of bnx2 firmware from the build-in kernel (see my post about this).

Ok, once this is done, reboot and after your system is up and running with the new kernel we can move on:

uname -a
Linux srv02 2.6.24-etchnhalf.1-686-bigmem #1 SMP Fri Dec 26 04:53:15 UTC 2008 i686 GNU/Linux

2. Python 2.5

The default version of python in debian etch is 2.4 (while for lenny it is 2.5). Still python2.5 is available in etch also, and can be installed using:

aptitude install python2.5 python2.5-minimal python2.5-dev

That’s it. Most (so I don’t say all) of the python modules in the etch repo are working only with the default python version 2.4. For example for iotop build we need setuptools, but installing python2.5-setuptools fails for some reason; anyway the idea is that we were able to install python2.5 easily from the repo, but we will have to install the rest of the extra python 2.5 modules from source and point them to python2.5. I am doing this assuming you will want to keep python2.4 as the default system python version as probably you have some tools depending on it (like we have bcfg2 for example), so we don’t mess with that.

Let’s download setuptools for python2.5 and install it:

sh setuptools-0.6c9-py2.5.egg

3. Finally iotop

All what is left is to install iotop, now that we have all the dependencies in place.

git clone git://
cd iotop

and change inside the first line to use python2.5 like this:

#!/usr/bin/env python2.5

and run setup:

./ install

hopefully this will install just fine, and you should have iotop running using the python2.5 binary.

I hope this post will be useful to users of debian etch showing them a quick way to install iotop on their existing system.

comments powered by Disqus