2008-07-08 07:25:36

by Stefan Monnier

[permalink] [raw]
Subject: Keeping track of spin-down/spin-up and causes of spin-up?

I clearly remember seeing a reference to some system that allowed to
keep track of causes of disk spin-up, but Google seems to say
I'm deluded. [ Or maybe my memory confused it for the facility used by
powertop to keep track of causes of CPU wake-ups? ]

In any case, I have a machine here whose disk keeps spinning back up
on a regular basis, and I can't seem to find any correlated event.
Is there a tool that can help me track down the reason why the disk
is accessed?


Stefan


2008-07-08 07:47:32

by Tino Keitel

[permalink] [raw]
Subject: Re: Keeping track of spin-down/spin-up and causes of spin-up?

On Tue, Jul 08, 2008 at 03:25:18 -0400, Stefan Monnier wrote:
> I clearly remember seeing a reference to some system that allowed to
> keep track of causes of disk spin-up, but Google seems to say
> I'm deluded. [ Or maybe my memory confused it for the facility used by
> powertop to keep track of causes of CPU wake-ups? ]
>
> In any case, I have a machine here whose disk keeps spinning back up
> on a regular basis, and I can't seem to find any correlated event.
> Is there a tool that can help me track down the reason why the disk
> is accessed?

See Documentation/laptops/laptop-mode.txt, the notes regarding
block_dump.

Regards,
Tino

2008-07-08 08:08:40

by Elias Oltmanns

[permalink] [raw]
Subject: Re: Keeping track of spin-down/spin-up and causes of spin-up?

With reference to the subject, are you a physicist by any chance? ;-)

Stefan Monnier <[email protected]> wrote:
[...]
> In any case, I have a machine here whose disk keeps spinning back up
> on a regular basis, and I can't seem to find any correlated event.
> Is there a tool that can help me track down the reason why the disk
> is accessed?

You can do

# echo 1 > /proc/sys/vm/block_dump

temporarily, so all disk accesses will be logged in dmesg. You should
seriously consider stopping klogd first because your log files will be
swamped otherwise.

That reminds me that syslog could well be the reason for your disk to
spin up frequently. But then you might have thought of that already.

Regards,

Elias