View previous topic :: View next topic |
Author |
Message |
Carnildo Guru

Joined: 17 Jun 2004 Posts: 595
|
Posted: Sat Jan 31, 2009 12:12 am Post subject: What's accessing my hard drive? |
|
|
I've got a computer that works as a router, switch, and firewall. It's set up so that after it boots, it should reach a state where it doesn't need to access the hard drive any more. However, every now and then the hard drive spins up briefly. How do I figure out what's causing this? |
|
Back to top |
|
 |
Gef Apprentice

Joined: 17 May 2008 Posts: 180 Location: France
|
Posted: Sat Jan 31, 2009 12:30 am Post subject: |
|
|
Syslog ?
You can use sys-process/iotop, or something like
Code: | echo 1 > /proc/sys/vm/block_dump
cat /proc/kmsg
|
to find that "process-that-keeps-blinking-your-hdd-led". _________________ Laptop : Gentoo ~amd64
(remote) Server : Gentoo amd64 |
|
Back to top |
|
 |
zyko l33t


Joined: 01 Jun 2008 Posts: 620 Location: Munich, Germany
|
Posted: Sat Jan 31, 2009 9:22 am Post subject: |
|
|
Quote: | It's set up so that after it boots, it should reach a state where it doesn't need to access the hard drive any more. |
Do you base this on the assumption that everything will be cached in RAM eventually?
This usually doesn't work, because many applications have hard-coded file system reads/writes/syncs in order to purposefully flush caches to disk or bypass caches altogether. There are some valid reasons for doing so, although sometimes this is a symptom of sloppy coding.
If you really want to prevent disk access, you need to have no hdd device mounted at all (=run in RAM entirely, somehow). |
|
Back to top |
|
 |
Carnildo Guru

Joined: 17 Jun 2004 Posts: 595
|
Posted: Mon Feb 02, 2009 5:40 am Post subject: |
|
|
zyko wrote: | Quote: | It's set up so that after it boots, it should reach a state where it doesn't need to access the hard drive any more. |
Do you base this on the assumption that everything will be cached in RAM eventually?
This usually doesn't work, because many applications have hard-coded file system reads/writes/syncs in order to purposefully flush caches to disk or bypass caches altogether. There are some valid reasons for doing so, although sometimes this is a symptom of sloppy coding. |
What's there to write? It's a router, a switch, and a firewall. After finding what was writing to disk (ntpd updating its drift file) and dealing with it, the computer's gone 36 hours without spinning up the hard drive. |
|
Back to top |
|
 |
|