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

I am just reviewing the disk IO of a XEN VM server. I stumbled across a DomU that has constant write traffic.

To narrow that traffic further down I logged in to the DomU (CentOS 5, 64 Bit) and started iostat 5. It shows sda1 active with 130-190 Blocks written per second.


sda: Whole disk (corresponds to DRBD-device in the Dom0, consist of one LV in the Dom0)
sda1: /
sda2: /var
sda3: LVM-PV for application data, contains one LV mounted as subdirectory on /var

I tried to find open file handles on /dev/sda1 by issuing lsof /dev/sda1. The output of that command is empty. Whereas the output for lsof /dev/sda2 shows lots of files, pipes, ... (as is to be expected).

How can I track down what is causing this IO?

share|improve this question
If you're using virtualization, you're shooting at your own feet. You can't really expect to be able to track down problems easily, and your best move is to hope everything will be ok. Ask directly on their ML: lists.xen.org. If there's a way to track down this IO, I suppose it'll be specific to Xen. Your approach seems correct, and I'm looking forward for real answers. – Aki Feb 7 '12 at 14:04

New kernels can do per-process I/O accounting, which you can see with iotop (yum install iotop). Also check out this link.

share|improve this answer
This seems to be a very nice tool. What repo do I have to activate to get it for el5? – Nils Feb 7 '12 at 20:48
It's in the epel repository - download.fedoraproject.org/pub/epel – Alien Life Form Feb 8 '12 at 9:11

As well as iotop, if you've got a new enough version of sysstat (not default with CentOS 5, unfortunately), you can use pidstat -d 5 to track per-process disk I/O statistics with a 5 second sample (for example).

(I should add: you'll need to do that inside the guest to see the process)

share|improve this answer
ok. I downloaded and compiled the latest stable 8.0 version. That is the first version, where pidstat appeared. Can I use some additional option to limit output to IO on /dev/sda1? – Nils Feb 8 '12 at 15:42

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.