[mythtv-users] OT: How can I tell what process is writing to my hard drive?

Matt Mossholder matt+mythTV-Users at mossholder.com
Fri Jul 20 21:53:02 UTC 2007


On Fri, 2007-07-20 at 14:13 -0400, William Munson wrote:
> Bob wrote:
> > William Munson wrote:
> >   
> >> Recently my myth backend system started to have continuous low level 
> >> hard drive activity 24 hours a day. Basically a continuous flicker, not 
> >> solid on. This is not normal for this system and I want to track down 
> >> who is doing all the I/O and hopefully even what file(s). Do any of the 
> >> experts here know how to troubleshoot this kind of a problem. Is there a 
> >> command that allows monitoring of drive activity like top does for 
> >> system activity?


Here's another method that I haven't seen mentioned:

Steps
1) Setup syslog to send all events to another system, and save NONE
locally.
2) echo 1 > /proc/sys/vm/block_dump


This will cause the kernel to generate syslog entries every time a
process reads or writes from a block device. It's nice, because:

1) It tells you the process name and PID that made the call.
2) It catches the reads, as well as the writes.
3) It notifies you as the events occur, rather than searching for them
after the fact.
4) Because you've configured syslog to send all log entries to another
system, it doesn't cause any disk I/O itself to pollute the results.

I used this when I was building a digital picture frame from an old
laptop, and wanted to have a read-only filesystem. It really pinpoints
where things are coming from, and what files they are interacting with.


		--Matt



More information about the mythtv-users mailing list