[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: (for gurus) a process access HDD



On Tue, 12 Apr 2005 22:10:10 +0200, Andrew Schulman wrote:

>> I am using the " hdparm -S 1 /dev/hda" command to keep the HDD quite
>> while I am reading some pdf's
>> 
>> but the problem is that there is a process running and ask for data
>> from the HDD which reactivate the HDD again and I am losing the
>> "quietness"
>> 
>> unfortionatly the "top" command did not help
> 
> Try: fuser /dev/hda .  You'll probably get a long list of processes, but
> you should be able to guess or figure out which ones are the culprits.

This would only tell you if a process had opened the whole-drive block
device, which will almost never be the case.

Something like "fuser -m /dev/hda5" is closer -- this would
list all processes having any file open in the filesystem mounted from
/dev/hda5 (assuming /dev/hda5 holds the filesystem being accessed).   

Note also that it might not be a process but a kernel thread, for example
flushing dirty blocks from the block cache or syncing writes from the
journal if a journaled filesystem is in use. I don't see an easy answer to
this question but maybe I'm missing something.  I've never tried turning
on the filesystem debugging options in the kernel config but this might
produce enough detail to figure out exactly what is going on.

-Steve



Reply to: