uk.comp.os.linux
[Top] [All Lists]

Re: What's accessing my hard disc?

Subject: Re: What's accessing my hard disc?
From: Nix
Date: Sun, 25 Nov 2007 15:36:32 +0000
Newsgroups: uk.comp.os.linux

On 25 Nov 2007, spike1@xxxxxxxxxxxxx spake thusly:

> David Cowie <me@xxxxxxxxxxx> did eloquently scribble:
>> gkrellm tells me how busy my hard disk and CPU are. 
>> top tells me what's using my CPU time and memory. 
>> Are there any programs (GUI or command line) that will tell me which 
>> programs are reading from and writing to my disks? Every now and again 
>> the HD will burst into life, with nothing obvious showing on top, and I'd 
>> like to know what's going on. 
>
> lsof
> (LiSt Open Files)
> It lists all processes holding file handles, all processes with open sockets
> and all processes with open (or listening) network connections.

This does not cover all entities which can write to the disk. A majority of
my drive writes are journal updates, writes over NFS, and md-thread-initiated
superblock updates. (atime updates are also not coverd but if you care about
performance you won't have many of those.)

You want the blktrace package (you might need to recompile the kernel and
enable CONFIG_BLK_DEV_IO_TRACE).

-- 
`Some people don't think performance issues are "real bugs", and I think 
such people shouldn't be allowed to program.' --- Linus Torvalds

<Prev in Thread] Current Thread [Next in Thread>