# Setting a drive to standby via hdparm seems to have no effec

## tilman

Hello

To spind down my harddisk whenever it is not used I sent 

hdparm -S 2 /dev/hda

to my harddisk.

The harddisk however never spins down, even though the server is mostly ideling. I suspect that there is a program or a damon regularily accesses the harddisk. The swap space is another suspect.  How can I find out which program is accesses the harddisk at a given instance in time ? 

Thanks

Tilman

----------

## poly_poly-man

iotop?

----------

## tilman

a) Tried that. I get this: 

Traceback (most recent call last):

  File "/usr/bin/iotop", line 4, in ?

    import pkg_resources

ImportError: No module named pkg_resources

Might have something to do with the python version I am using. Recommended is >= 2.5. I have 2.4.3

b) Iotop also requires the TASK_DELAY_ACCT and TASK_IO_ACCOUNTING kernel options to be set, and requires a kernel version >=2.6.20. I have a 2.6.20-gentoo-r8 running. The kernel options are not available in my .config file

- Tilman

----------

## tilman

1) I found lm-profiler. It scans all harddiskactivities for 5 minutes and then gives suggestion on programs accessing the disk. Did not really help me however. All suggested damons I require.

2) Most accesses seem come from pdflush. Setting /proc/sys/vm/laptop_mode via echo "1" > /proc/sys/vm/laptop_mode reduces hard disk activity. Writing of  "dirty pages" is delayed with this setting.

First tests look promissing. I will observe a little bit more if this does the trick...

----------

