view · edit · print · history

See also the existing page, IdentifyWhichProcessesAccessDisk

To find out which process spins up your disk, do this:

(From http://www.samwel.tk/laptop_mode/tools/faq.html)

Spinup Debugging

My disk spins up all the time and I have no clue what causes this. Can I debug this?

Yes, you can. But first, check that you have modified your syslog.conf to not sync. How you modify syslog.conf depends on which syslogd is installed. If your '/sbin/syslogd' is a symbolic link to 'busybox' then you really don't have a fully functional syslogd and should follow the 'Busybox syslog.conf' instructions. Everyone else should follow the 'syslog.conf' instructions.

Busybox syslog.conf

First stop the syslogd with the command '/etc/init.d/syslog stop' Then edit '/etc/syslog.conf' and Change the 'DESTINATION' to 'buffer' Restart the syslogd with the command '/etc/init.d/syslog start'


In /etc/syslog.conf, you have to place a dash (-) before the log file name, e.g. the line kern.* /var/log/kern.log becomes kern.* -/var/log/kern.log. You then have to either 'kill -HUP' on the syslogd process or start and stop the daemon.

Turn on disk activity debugging

 Then to debug disk activity, you can do:

echo 1 > /proc/sys/vm/block_dump

(Warning: you must disable syslogd before you do this, or you must make sure that kernel output is not logged. If you forget this, your system may get into a feedback loop, where syslogd causes disk activity, this causes kernel output, and this causes syslogd to do more disk activity, etcetera!)

  • Problem: there is no /proc/sys/vm/block_dump in Unslung 6.8.*

This enables file/disk activity debugging in the kernel. You can read the output using dmesg. When you're done, disable block dump using

echo 0 > /proc/sys/vm/block_dump

Under debianslug it is easier to accomplish. Simply install laptop-mode-tools

aptitude install laptop-mode-tools

This package contains a set of scripts which monitor your hardisk (it could set several energy saving profiles too but the NSLU2 doesnt support this).

The most interesting script is called lm-profiler. Start it with


and watch it's output. It lets you disable unneeded system services after the scan too if you want.

In OpenDebianSlug you don't get 'lm-profiler' even if you install laptop-mode-tools using apt-get. Do the following in OpenDebianSlug:

cd /root

wget http://samwel.tk/laptop_mode/tools/downloads/laptop-mode-tools_1.31.tar.gz

tar -xzvf laptop-mode-tools_1.31.tar.gz


view · edit · print · history · Last edited by fcarolo.
Based on work by twinotter, mrkzander, mk, Bart Samwel, Phil Endecott, and ST.
Originally by ST.
Page last modified on July 06, 2007, at 06:59 AM